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: <CANpmjNPmQYJ7pv1N3cuU8cP18u7PP_uoZD8YxwZd4jtbof9nVQ@mail.gmail.com>
Date: Mon, 4 Nov 2024 13:16:48 +0100
From: Marco Elver <elver@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Vlastimil Babka <vbabka@...e.cz>, 
	syzbot <syzbot+39f85d612b7c20d8db48@...kaller.appspotmail.com>, 
	Liam.Howlett@...cle.com, akpm@...ux-foundation.org, jannh@...gle.com, 
	linux-kernel@...r.kernel.org, linux-mm@...ck.org, lorenzo.stoakes@...cle.com, 
	syzkaller-bugs@...glegroups.com, 
	Sebastian Andrzej Siewior <bigeasy@...utronix.de>, Andrey Konovalov <andreyknvl@...il.com>, 
	kasan-dev <kasan-dev@...glegroups.com>, Andrey Ryabinin <ryabinin.a.a@...il.com>, 
	Alexander Potapenko <glider@...gle.com>, Waiman Long <longman@...hat.com>, dvyukov@...gle.com, 
	vincenzo.frascino@....com, paulmck@...nel.org, frederic@...nel.org, 
	neeraj.upadhyay@...nel.org, joel@...lfernandes.org, josh@...htriplett.org, 
	boqun.feng@...il.com, urezki@...il.com, rostedt@...dmis.org, 
	mathieu.desnoyers@...icios.com, jiangshanlai@...il.com, 
	qiang.zhang1211@...il.com, mingo@...hat.com, juri.lelli@...hat.com, 
	vincent.guittot@...aro.org, dietmar.eggemann@....com, bsegall@...gle.com, 
	mgorman@...e.de, vschneid@...hat.com, tj@...nel.org, cl@...ux.com, 
	penberg@...nel.org, rientjes@...gle.com, iamjoonsoo.kim@....com, 
	roman.gushchin@...ux.dev, 42.hyeyoo@...il.com, rcu@...r.kernel.org
Subject: Re: [syzbot] [mm?] WARNING: locking bug in __rmqueue_pcplist

On Mon, 4 Nov 2024 at 12:45, Peter Zijlstra <peterz@...radead.org> wrote:
>
> On Mon, Nov 04, 2024 at 12:25:03PM +0100, Vlastimil Babka wrote:
> > On 11/4/24 12:11, Vlastimil Babka wrote:
>
> > >>  __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4771
> > >>  alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265
> > >>  stack_depot_save_flags+0x666/0x830 lib/stackdepot.c:627
> > >>  kasan_save_stack+0x4f/0x60 mm/kasan/common.c:48
> > >>  __kasan_record_aux_stack+0xac/0xc0 mm/kasan/generic.c:544
> > >>  task_work_add+0xd9/0x490 kernel/task_work.c:77
> > >
> > > It seems the decision if stack depot is allowed to allocate here depends on
> > > TWAF_NO_ALLOC added only recently. So does it mean it doesn't work as intended?
> >
> > I guess __run_posix_cpu_timers() needs to pass TWAF_NO_ALLOC too?
>
> Yeah, or we just accept that kasan_record_aux_stack() is a horrible
> thing and shouldn't live in functions that try their bestest to
> locklessly setup async work at all.
>
> That thing has only ever caused trouble :/
>
> Also see 156172a13ff0.
>
> How about we do the below at the very least?

I'd be in favor, it simplifies things. And stack depot should be able
to replenish its pool sufficiently in the "non-aux" cases i.e. regular
allocations.

Worst case we fail to record some aux stacks, but I think that's only
really bad if there's a bug around one of these allocations. In
general the probabilities of this being a regression are extremely
small - same as I argued back in
https://lore.kernel.org/all/20210913112609.2651084-1-elver@google.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ