Re: Validating dma_mmap_coherent() parameters before calling (was Re: WARNING in memtype_reserve)

2020-05-14 Thread Greg KH
On Thu, May 14, 2020 at 06:17:41AM -0500, Jeremy Linton wrote: > On 5/14/20 2:46 AM, Greg KH wrote: > > On Thu, May 14, 2020 at 08:31:58AM +0200, Christoph Hellwig wrote: > > > On Thu, May 14, 2020 at 08:27:50AM +0200, Greg KH wrote: > > > > On Thu, May 14, 2020 at 08:14:17AM +0200, Christoph

Re: Validating dma_mmap_coherent() parameters before calling (was Re: WARNING in memtype_reserve)

2020-05-14 Thread Jeremy Linton
On 5/14/20 2:46 AM, Greg KH wrote: On Thu, May 14, 2020 at 08:31:58AM +0200, Christoph Hellwig wrote: On Thu, May 14, 2020 at 08:27:50AM +0200, Greg KH wrote: On Thu, May 14, 2020 at 08:14:17AM +0200, Christoph Hellwig wrote: Guys, can you please start formal thread on this? I have no idea

Re: Validating dma_mmap_coherent() parameters before calling (was Re: WARNING in memtype_reserve)

2020-05-14 Thread Jeremy Linton
On 5/14/20 6:14 AM, Christoph Hellwig wrote: On Thu, May 14, 2020 at 06:10:03AM -0500, Jeremy Linton wrote: I only need to look at the commit for 3 seconds to tell you that it is completely buggy. While using dma_mmap_coherent is fundamentally the right thing and absolutely required for

Re: Validating dma_mmap_coherent() parameters before calling (was Re: WARNING in memtype_reserve)

2020-05-14 Thread Christoph Hellwig
On Thu, May 14, 2020 at 06:10:03AM -0500, Jeremy Linton wrote: >> I only need to look at the commit for 3 seconds to tell you that it is >> completely buggy. While using dma_mmap_coherent is fundamentally the >> right thing and absolutely required for dma_alloc_* allocations, USB >> also uses

Re: Validating dma_mmap_coherent() parameters before calling (was Re: WARNING in memtype_reserve)

2020-05-14 Thread Jeremy Linton
Hi, On 5/14/20 1:31 AM, Christoph Hellwig wrote: On Thu, May 14, 2020 at 08:27:50AM +0200, Greg KH wrote: On Thu, May 14, 2020 at 08:14:17AM +0200, Christoph Hellwig wrote: Guys, can you please start formal thread on this? I have no idea where this came from and what the rationale is. Btw,

Re: WARNING in memtype_reserve

2020-05-14 Thread syzbot
Hello, syzbot has tested the proposed patch and the reproducer did not trigger crash: Reported-and-tested-by: syzbot+353be47c9ce21b68b...@syzkaller.appspotmail.com Tested on: commit: d5eeab8d Merge tag 'scsi-fixes' of git://git.kernel.org/pu.. git tree:

Re: WARNING in memtype_reserve

2020-05-14 Thread Greg KH
On Sat, May 09, 2020 at 12:20:14AM -0700, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:d5eeab8d Merge tag 'scsi-fixes' of git://git.kernel.org/pu.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=1509363210 >

Re: WARNING in memtype_reserve

2020-05-14 Thread syzbot
Hello, syzbot has tested the proposed patch and the reproducer did not trigger crash: Reported-and-tested-by: syzbot+353be47c9ce21b68b...@syzkaller.appspotmail.com Tested on: commit: d5eeab8d Merge tag 'scsi-fixes' of git://git.kernel.org/pu.. git tree:

Re: Validating dma_mmap_coherent() parameters before calling (was Re: WARNING in memtype_reserve)

2020-05-14 Thread Greg KH
On Thu, May 14, 2020 at 08:31:58AM +0200, Christoph Hellwig wrote: > On Thu, May 14, 2020 at 08:27:50AM +0200, Greg KH wrote: > > On Thu, May 14, 2020 at 08:14:17AM +0200, Christoph Hellwig wrote: > > > Guys, can you please start formal thread on this? I have no > > > idea where this came from

Re: Validating dma_mmap_coherent() parameters before calling (was Re: WARNING in memtype_reserve)

2020-05-14 Thread Christoph Hellwig
On Thu, May 14, 2020 at 08:27:50AM +0200, Greg KH wrote: > On Thu, May 14, 2020 at 08:14:17AM +0200, Christoph Hellwig wrote: > > Guys, can you please start formal thread on this? I have no > > idea where this came from and what the rationale is. Btw, if the > > pfn is crap in dma_direct_mmap

Validating dma_mmap_coherent() parameters before calling (was Re: WARNING in memtype_reserve)

2020-05-14 Thread Greg KH
On Thu, May 14, 2020 at 08:14:17AM +0200, Christoph Hellwig wrote: > Guys, can you please start formal thread on this? I have no > idea where this came from and what the rationale is. Btw, if the > pfn is crap in dma_direct_mmap then the dma_addr_t passed in is > crap, as it is derived from

Re: WARNING in memtype_reserve

2020-05-14 Thread Dmitry Vyukov
On Thu, May 14, 2020 at 8:14 AM Christoph Hellwig wrote: > > Guys, can you please start formal thread on this? I have no > idea where this came from and what the rationale is. Btw, if the > pfn is crap in dma_direct_mmap then the dma_addr_t passed in is > crap, as it is derived from that. What

Re: WARNING in memtype_reserve

2020-05-14 Thread Christoph Hellwig
Guys, can you please start formal thread on this? I have no idea where this came from and what the rationale is. Btw, if the pfn is crap in dma_direct_mmap then the dma_addr_t passed in is crap, as it is derived from that. What is the caller, and how is this triggered?

Re: WARNING in memtype_reserve

2020-05-13 Thread Greg KH
On Wed, May 13, 2020 at 06:22:58PM +0200, Thomas Gleixner wrote: > Greg KH writes: > > On Sat, May 09, 2020 at 12:00:57PM +0200, Thomas Gleixner wrote: > >> Greg KH writes: > >> > On Sat, May 09, 2020 at 12:20:14AM -0700, syzbot wrote: > >> >> memtype_reserve failed: [mem

Re: WARNING in memtype_reserve

2020-05-13 Thread Thomas Gleixner
Greg KH writes: > On Sat, May 09, 2020 at 12:00:57PM +0200, Thomas Gleixner wrote: >> Greg KH writes: >> > On Sat, May 09, 2020 at 12:20:14AM -0700, syzbot wrote: >> >> memtype_reserve failed: [mem 0xff000-0x8fff], req write-back >> >> WARNING: CPU: 1 PID: 7025 at

Re: WARNING in memtype_reserve

2020-05-13 Thread Thomas Gleixner
Alan Stern writes: > On Sat, 9 May 2020, Thomas Gleixner wrote: > >> Greg KH writes: >> > On Sat, May 09, 2020 at 12:20:14AM -0700, syzbot wrote: >> >> memtype_reserve failed: [mem 0xff000-0x8fff], req write-back >> >> WARNING: CPU: 1 PID: 7025 at arch/x86/mm/pat/memtype.c:589 >> >>

Re: WARNING in memtype_reserve

2020-05-13 Thread Greg KH
On Sat, May 09, 2020 at 12:00:57PM +0200, Thomas Gleixner wrote: > Greg KH writes: > > On Sat, May 09, 2020 at 12:20:14AM -0700, syzbot wrote: > >> memtype_reserve failed: [mem 0xff000-0x8fff], req write-back > >> WARNING: CPU: 1 PID: 7025 at arch/x86/mm/pat/memtype.c:589 > >>

Re: WARNING in memtype_reserve

2020-05-13 Thread Greg KH
On Sat, May 09, 2020 at 11:47:28PM +0800, Hillf Danton wrote: > > Sat, 09 May 2020 00:20:14 -0700 > >syzbot found the following crash on: > > > >HEAD commit:d5eeab8d Merge tag 'scsi-fixes' of git://git.kernel.org/pu.. > >git tree: upstream > >console output:

Re: WARNING in memtype_reserve

2020-05-09 Thread Jeremy Linton
Hi, On 5/9/20 2:20 AM, syzbot wrote: Hello, syzbot found the following crash on: HEAD commit:d5eeab8d Merge tag 'scsi-fixes' of git://git.kernel.org/pu.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1509363210 kernel config:

Re: WARNING in memtype_reserve

2020-05-09 Thread Alan Stern
On Sat, 9 May 2020, Thomas Gleixner wrote: > Greg KH writes: > > On Sat, May 09, 2020 at 12:20:14AM -0700, syzbot wrote: > >> memtype_reserve failed: [mem 0xff000-0x8fff], req write-back > >> WARNING: CPU: 1 PID: 7025 at arch/x86/mm/pat/memtype.c:589 > >> memtype_reserve+0x69f/0x820

Re: WARNING in memtype_reserve

2020-05-09 Thread Thomas Gleixner
Greg KH writes: > On Sat, May 09, 2020 at 12:20:14AM -0700, syzbot wrote: >> memtype_reserve failed: [mem 0xff000-0x8fff], req write-back >> WARNING: CPU: 1 PID: 7025 at arch/x86/mm/pat/memtype.c:589 >> memtype_reserve+0x69f/0x820 arch/x86/mm/pat/memtype.c:589 > > So should

Re: WARNING in memtype_reserve

2020-05-09 Thread Greg KH
On Sat, May 09, 2020 at 12:20:14AM -0700, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:d5eeab8d Merge tag 'scsi-fixes' of git://git.kernel.org/pu.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=1509363210 >

WARNING in memtype_reserve

2020-05-09 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:d5eeab8d Merge tag 'scsi-fixes' of git://git.kernel.org/pu.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1509363210 kernel config: https://syzkaller.appspot.com/x/.config?x=b0212dbee046bc1f