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: <j2k25hhxv42zuakbqc2miptypxee6j3vwkb5a4yz4vutj6swhv@c6ejjddjn6oq>
Date: Mon, 9 Dec 2024 09:12:44 +0900
From: Koichiro Den <koichiro.den@...onical.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: linux-kernel@...r.kernel.org, peterz@...radead.org
Subject: Re: [PATCH] cpu/hotplug: ensure the starting section runs fully
 regardless of target

On Sun, Dec 08, 2024 at 09:34:37PM +0100, Thomas Gleixner wrote:
> On Sat, Dec 07 2024 at 23:47, Koichiro Den wrote:
> >  static int take_cpu_down(void *_param)
> >  {
> >  	struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state);
> > -	enum cpuhp_state target = max((int)st->target, CPUHP_AP_OFFLINE);
> >  	int err, cpu = smp_processor_id();
> >  
> >  	/* Ensure this CPU doesn't handle any more interrupts. */
> > @@ -1285,8 +1284,9 @@ static int take_cpu_down(void *_param)
> >  
> >  	/*
> >  	 * Invoke the former CPU_DYING callbacks. DYING must not fail!
> > +	 * Regardless of st->target, it must run through to CPUHP_AP_OFFLINE.
> >  	 */
> > -	cpuhp_invoke_callback_range_nofail(false, cpu, st, target);
> > +	cpuhp_invoke_callback_range_nofail(false, cpu, st, CPUHP_AP_OFFLINE);
> 
> This is really the wrong place. This want's to be enforced at the sysfs
> interface already and reject writes which are between AP_OFFLINE and
> AP_ONLINE.
>   
> It's utterly confusing to write a particular target and then magically
> end up at some other state.

Ok, I'll send v2. Thanks for the review.

-Koichiro Den

> 
> Thanks,
> 
>         tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ