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: <20230927171713.GBZRRjmUDQrV9HVxv-@fat_crate.local>
Date:   Wed, 27 Sep 2023 19:17:13 +0200
From:   Borislav Petkov <bp@...en8.de>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
        "Chang S. Bae" <chang.seok.bae@...el.com>,
        Arjan van de Ven <arjan@...ux.intel.com>,
        Nikolay Borisov <nik.borisov@...e.com>
Subject: Re: [patch V3 25/30] x86/microcode: Rendezvous and load in NMI

On Tue, Sep 12, 2023 at 09:58:23AM +0200, Thomas Gleixner wrote:
> From: Thomas Gleixner <tglx@...utronix.de>
> 
> stop_machine() does not prevent the spin-waiting sibling from handling an
> NMI, which is obviously violating the whole concept of rendezvous.
> 
> Implement a static branch right in the beginning of the NMI handler which
> is NOOPed except when enabled by the late loading mechanism.
>
> The later loader enables the static branch before stop_machine() is

s/later/late/

> invoked. Each CPU has an nmi_enable in its control structure which
> indicates whether the CPU should go into the update routine.
> 
> This is required to bridge the gap between enabling the branch and actually
> being at the point where it makes sense.

Huh? "where it makes sense"?

> -static int ucode_load_cpus_stopped(void *unused)
> +static bool microcode_update_handler(void)
>  {
>  	unsigned int cpu = smp_processor_id();
>  
> @@ -430,7 +436,29 @@ static int ucode_load_cpus_stopped(void
>  	else
>  		ucode_load_secondary(cpu);
>  
> -	/* No point to wait here. The CPUs will all wait in stop_machine(). */
> +	touch_nmi_watchdog();

AFAICT, you're touching the NMI watchdog even in the !use_nmi case.

> +	return true;
> +}

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ