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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <3f474d49-bf07-4a2c-aa38-093373bd5bf5@bytedance.com>
Date: Mon, 9 Feb 2026 15:56:23 +0800
From: "Chuyi Zhou" <zhouchuyi@...edance.com>
To: "Peter Zijlstra" <peterz@...radead.org>
Cc: <tglx@...utronix.de>, <mingo@...hat.com>, <luto@...nel.org>, 
	<paulmck@...nel.org>, <muchun.song@...ux.dev>, <bp@...en8.de>, 
	<dave.hansen@...ux.intel.com>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 05/11] smp: Enable preemption early in smp_call_function_many_cond

在 2026/2/5 17:52, Peter Zijlstra 写道:
> On Tue, Feb 03, 2026 at 07:23:55PM +0800, Chuyi Zhou wrote:
> 
>> +	/*
>> +	 * Prevent the current CPU from going offline.
>> +	 * Being migrated to another CPU and calling csd_lock_wait() may cause
>> +	 * UAF due to smpcfd_dead_cpu() during the current CPU offline process.
>> +	 */
>> +	migrate_disable();
> 
> This is horrible crap. migrate_disable() is *NOT* supposed to be used to
> serialize cpu hotplug.



Here we can use rcu_read_lock to replace migrate_disable/cpus_read_lock, 
and in smpcfd_dead_cpu(), wait for all rcu read critical sections to 
exit before releasing percpu csd data.

This allows csd_lock_wait() to be preemptible and migratable, while 
avoiding concurrency issues between smpcfd_dead_cpu() and csd_lock_wait.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ