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] [day] [month] [year] [list]
Message-ID: <87wm0zl8p2.ffs@tglx>
Date: Fri, 30 Jan 2026 11:02:33 +0100
From: Thomas Gleixner <tglx@...nel.org>
To: "Chang S. Bae" <chang.seok.bae@...el.com>, linux-kernel@...r.kernel.org
Cc: x86@...nel.org, mingo@...hat.com, bp@...en8.de,
 dave.hansen@...ux.intel.com, peterz@...radead.org, david.kaplan@....com
Subject: Re: [PATCH 1/7] stop_machine: Introduce stop_machine_nmi()

On Thu, Jan 29 2026 at 09:07, Chang S. Bae wrote:
> On 1/28/2026 12:02 AM, Thomas Gleixner wrote:
>> And this wants to become
>> 
>>      if (IS_ENABLED(CONFIG_STOMP_MACHINE_NMI) && msdata->use_nmi)
>>      	err = stop_this_cpu_nmi(msdata);
>>      else
>> 	err = msdata->fn(msdata->data);
>
> Although that config option is very clear and makes tons of sense, the 
> latter reads like a (silent) fallback path for a stop_machine_nmi() 
> invocation with CONFIG_STOMP_MACHINE_NMI=n.
>
> Maybe this might be clear to reject the NMI option right away with 
> something like:
>
> stop_machine_cpuslocked_nmi(...)
> {
> 	if (!IS_ENABLED(CONFIG_STOMP_MACHINE_NMI))
> 		return -EOPNOTSUPP;
> 	...
> };

That function should not be exposed at all when the config switch is
off. Hide it behind #ifdef CONFIG...

It really should not be used in generic code at all.

Thanks,

        tglx


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ