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: <ZbL99b6ywZUqG3YK@slm.duckdns.org>
Date: Thu, 25 Jan 2024 14:33:57 -1000
From: Tejun Heo <tj@...nel.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Mikulas Patocka <mpatocka@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org,
	dm-devel@...ts.linux.dev, Mike Snitzer <msnitzer@...hat.com>,
	Ignat Korchagin <ignat@...udflare.com>,
	Damien Le Moal <damien.lemoal@....com>,
	Bob Liu <bob.liu@...cle.com>, Hou Tao <houtao1@...wei.com>,
	Nathan Huckleberry <nhuck@...gle.com>,
	Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH] softirq: fix memory corruption when freeing
 tasklet_struct

Hello, Linus.

On Thu, Jan 25, 2024 at 11:51:28AM -0800, Linus Torvalds wrote:
..
> So we could have a per-cpu 'atomic_wq' that things can be scheduled
> on, and that runs from softirqs just like tasklets, and shares the
> workqueue queueing infrastructure but doesn't use the workqueue
> threads.
> 
> Yes, the traditional use of workqueues is to be able to sleep and do
> things in process context, so that sounds a bit odd, but let's face
> it, we
> 
>  (a) already have multiple classes of workqueues
> 
>  (b) avoiding deep - and possibly recursive - stack depths is another
> reason people use workqueues
> 
>  (c) avoiding interrupt context is a real concern, even if you don't
> want to sleep
> 
> and I really *really* would like to get rid of tasklets entirely.
> 
> They started as this very specific hardcoded softirq thing used by
> some drivers, and then the notion was generalized.
> 
> And I think it was generalized badly, as shown by this example.
> 
> I have added Tejun to the cc, so that he can throw his hands up in
> horror and say "Linus, you're crazy, your drug-fueled idea would be
> horrid because of Xyz".
> 
> But *maybe* Tejun has been taking the same drugs I have, and goes
> "yeah, that would fit well".
> 
> Tejun? Please tell me I'm not on some bad crack..

That doesn't sound too crazy to me. I need to think more about how flush /
cancel paths would look but hopefully it won't be too bad. I'll hack up
something and see how things look.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ