[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230816173531.GMZN0I40DEFE38Zxuz@fat_crate.local>
Date: Wed, 16 Aug 2023 19:35:31 +0200
From: Borislav Petkov <bp@...en8.de>
To: Josh Poimboeuf <jpoimboe@...nel.org>
Cc: Nikolay Borisov <nik.borisov@...e.com>, X86 ML <x86@...nel.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86/srso: Correct the mitigation status when SMT is
disabled
On Wed, Aug 16, 2023 at 09:07:57AM -0700, Josh Poimboeuf wrote:
> In this case srso_show_state() is never called, so the following code
> can't run:
>
> + if (boot_cpu_has(X86_FEATURE_SRSO_NO)) {
> + if (sched_smt_active())
> + return sysfs_emit(buf, "Not affected\n");
Ofc it can. If something has set X86_FEATURE_SRSO_NO early, before the
bug bits detection happens, then you get:
$ cat /sys/devices/system/cpu/vulnerabilities/spec_rstack_overflow
Not affected
> In this case SMT is disabled, so the following code still can't run:
>
> + if (boot_cpu_has(X86_FEATURE_SRSO_NO)) {
> + if (sched_smt_active())
> + return sysfs_emit(buf, "Not affected\n");
Yes, it runs in the above case where on some future hw which might have
SRSO fixed, we'll set SRSO_NO.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists