[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACT4Y+Y_kg1J00iBL=sMr5AP7U4RXuBizusvQG52few2NcJ6dg@mail.gmail.com>
Date: Tue, 7 Jun 2022 09:15:09 +0200
From: Dmitry Vyukov <dvyukov@...gle.com>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: Greg KH <gregkh@...uxfoundation.org>,
Alan Stern <stern@...land.harvard.edu>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
syzbot <syzbot+dd3c97de244683533381@...kaller.appspotmail.com>,
hdanton@...a.com, lenb@...nel.org, linux-acpi@...r.kernel.org,
linux-kernel@...r.kernel.org, rafael.j.wysocki@...el.com,
rafael@...nel.org, rjw@...ysocki.net,
syzkaller-bugs@...glegroups.com, linux-usb@...r.kernel.org,
Linux-MM <linux-mm@...ck.org>
Subject: Re: [syzbot] general protection fault in __device_attach
On Mon, 6 Jun 2022 at 14:39, Dan Carpenter <dan.carpenter@...cle.com> wrote:
>
> On Sat, Jun 04, 2022 at 10:32:46AM +0200, 'Dmitry Vyukov' via syzkaller-bugs wrote:
> > On Fri, 3 Jun 2022 at 18:12, Greg KH <gregkh@...uxfoundation.org> wrote:
> > >
> > > But again, is this a "real and able to be triggered from userspace"
> > > problem, or just fault-injection-induced?
> >
> > Then this is something to fix in the fault injection subsystem.
> > Testing systems shouldn't be reporting false positives.
> > What allocations cannot fail in real life? Is it <=page_size?
> >
>
> Apparently in 2014, anything less than *EIGHT?!!* pages succeeded!
>
> https://lwn.net/Articles/627419/
>
> I have been on the look out since that article and never seen anyone
> mention it changing. I think we should ignore that and say that
> anything over PAGE_SIZE can fail. Possibly we could go smaller than
> PAGE_SIZE...
+linux-mm for GFP expertise re what allocations cannot possibly fail
and should be excluded from fault injection.
Interesting, thanks for the link.
PAGE_SIZE looks like a good start. Once we have the predicate in
place, we can refine it later when/if we have more inputs.
But I wonder about GFP flags. They definitely have some impact on allocations.
If GFP_ACCOUNT is set, all allocations can fail, right?
If GFP_DMA/DMA32 is set, allocations can fail, right? What about other zones?
If GFP_NORETRY is set, allocations can fail?
What about GFP_NOMEMALLOC and GFP_ATOMIC?
What about GFP_IO/GFP_FS/GFP_DIRECT_RECLAIM/GFP_KSWAPD_RECLAIM? At
least some of these need to be set for allocations to not fail? Which
ones?
Any other flags are required to be set/unset for allocations to not fail?
FTR here is quick link to flags list:
https://elixir.bootlin.com/linux/v5.19-rc1/source/include/linux/gfp.h#L32
Powered by blists - more mailing lists