lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180224082625.GA9681@kroah.com>
Date:   Sat, 24 Feb 2018 09:26:25 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Nathan Chancellor <natechancellor@...il.com>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        syzbot+76e7efc4748495855a4d@...kaller.appspotmail.com,
        syzbot <syzkaller@...glegroups.com>,
        Laura Abbott <labbott@...hat.com>
Subject: Re: [PATCH 4.4 013/193] staging: android: ion: Add __GFP_NOWARN for
 system contig heap

On Fri, Feb 23, 2018 at 01:46:08PM -0700, Nathan Chancellor wrote:
> On Fri, Feb 23, 2018 at 07:24:06PM +0100, Greg Kroah-Hartman wrote:
> > 4.4-stable review patch.  If anyone has any objections, please let me know.
> > 
> > ------------------
> > 
> > From: Laura Abbott <labbott@...hat.com>
> > 
> > commit 0c75f10312a35b149b2cebb1832316b35c2337ca upstream.
> > 
> > syzbot reported a warning from Ion:
> > 
> >   WARNING: CPU: 1 PID: 3485 at mm/page_alloc.c:3926
> > 
> >   ...
> >    __alloc_pages_nodemask+0x9fb/0xd80 mm/page_alloc.c:4252
> >   alloc_pages_current+0xb6/0x1e0 mm/mempolicy.c:2036
> >   alloc_pages include/linux/gfp.h:492 [inline]
> >   ion_system_contig_heap_allocate+0x40/0x2c0
> >   drivers/staging/android/ion/ion_system_heap.c:374
> >   ion_buffer_create drivers/staging/android/ion/ion.c:93 [inline]
> >   ion_alloc+0x2c1/0x9e0 drivers/staging/android/ion/ion.c:420
> >   ion_ioctl+0x26d/0x380 drivers/staging/android/ion/ion-ioctl.c:84
> >   vfs_ioctl fs/ioctl.c:46 [inline]
> >   do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686
> >   SYSC_ioctl fs/ioctl.c:701 [inline]
> >   SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
> > 
> > This is a warning about attempting to allocate order > MAX_ORDER. This
> > is coming from a userspace Ion allocation request. Since userspace is
> > free to request however much memory it wants (and the kernel is free to
> > deny its allocation), silence the allocation attempt with __GFP_NOWARN
> > in case it fails.
> > 
> > Reported-by: syzbot+76e7efc4748495855a4d@...kaller.appspotmail.com
> > Reported-by: syzbot <syzkaller@...glegroups.com>
> > Signed-off-by: Laura Abbott <labbott@...hat.com>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> > 
> > ---
> >  drivers/staging/android/ion/ion_system_heap.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > --- a/drivers/staging/android/ion/ion_system_heap.c
> > +++ b/drivers/staging/android/ion/ion_system_heap.c
> > @@ -336,7 +336,7 @@ static int ion_system_contig_heap_alloca
> >  	if (align > (PAGE_SIZE << order))
> >  		return -EINVAL;
> >  
> > -	page = alloc_pages(low_order_gfp_flags, order);
> > +	page = alloc_pages(low_order_gfp_flags | __GFP_NOWARN, order);
> >  	if (!page)
> >  		return -ENOMEM;
> >  
> > 
> >
> 
> This commit is not necessary as __GFP_NOWARN is still in the global
> low_order_gfp_flags since commit d2805d7fff5b ("staging: ion: remove
> __GFP_NOWARN when use low order gfp flags") did not show up until 4.9.
> This also applies to 3.18.

Ah, good catch, now fixed by dropping this patch from 4.4.y and 3.18.y,
thanks.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ