lkml.org 
[lkml]   [2023]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] x86/srso: Disable the mitigation on unaffected configurations
    On Mon, Aug 14, 2023 at 01:08:13PM -0700, Josh Poimboeuf wrote:
    > Tangentially, the 'cpu_smt_control == CPU_SMT_DISABLED' check is wrong,
    > as SMT could still get enabled at runtime and SRSO would be exposed.

    Well, even if it gets exposed, I don't think we can safely enable the
    mitigation at runtime as alternatives have run already.

    I guess I could use CPU_SMT_FORCE_DISABLED here.

    > Also is there a reason to re-use the hardware SRSO_NO bit

    Not a hardware bit - this is set by software - it is only allocated in
    the CPUID leaf for easier interaction with guests.

    > rather than clear the bug bit?

    We don't clear the X86_BUGs. Ever. The logic is that if the CPU matches
    an affected CPU, that flag remains to show that it is potentially
    affected.

    /sys/devices/system/cpu/vulnerabilities/ tells you what the actual state
    is.

    > That seems cleaner, then you wouldn't need this hack:

    Not a hack. This is just like the other "not affected" feature flags.

    --
    Regards/Gruss,
    Boris.

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

    \
     
     \ /
      Last update: 2023-08-14 22:27    [W:2.467 / U:0.264 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site