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  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]
Date:   Thu, 30 Aug 2018 21:25:03 -0700
From:   Linus Torvalds <>
To:     Tony Luck <>
Cc:     Thomas Gleixner <>,
        Ingo Molnar <>, Peter Anvin <>,
        Borislav Petkov <>,
        linux-edac <>,
        Linux Kernel Mailing List <>,
        "the arch/x86 maintainers" <>,
        Dan Williams <>,
        Dave Jiang <>
Subject: Re: [PATCH] x86/mce: Fix set_mce_nospec() to avoid #GP fault

On Thu, Aug 30, 2018 at 6:49 PM Tony Luck <> wrote:
> Just checking "do we have a non-canonical address" at the bottom of that
> call stack and flipping bit 63 back on again seems like a bad idea.

You could literally do something like

    /* Make it canonical in case we flipped the high bit */
    addr = (long)(addr<<1)>>1;

in the call to clflush and it magically does the right thing.

Pretty? No. But with a big comment about what is going on and why it's
done, I think it's prettier than your much bigger patch.

I dunno. It does strike me as a bit hacky, but I'd rather have a
*small*  one-liner hack that generates two instructions, than add a
complex hack that modifies the page tables three times and has a
serializing instruction in it.

Both are subtle fixes for a subtle issue, but one seems pretty
harmless in comparison.


But I'll bow to the x86 maintainers.


Powered by blists - more mailing lists