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: <CALMp9eRk8WvcALB4wHKo+P=dv2Xs9os6=15g_bL2Uy5+4uPTJA@mail.gmail.com>
Date:   Wed, 14 Feb 2018 16:46:46 -0800
From:   Jim Mattson <jmattson@...gle.com>
To:     David Woodhouse <dwmw@...zon.co.uk>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        KarimAllah Ahmed <karahmed@...zon.de>,
        "the arch/x86 maintainers" <x86@...nel.org>,
        kvm list <kvm@...r.kernel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Paolo Bonzini <pbonzini@...hat.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Borislav Petkov <bp@...en8.de>,
        Peter Zijlstra <peterz@...radead.org>,
        Radim Krčmář <rkrcmar@...hat.com>,
        "Van De Ven, Arjan" <arjan.van.de.ven@...el.com>,
        Dave Hansen <dave.hansen@...el.com>, mingo@...nel.org
Subject: Re: [PATCH v2 1/4] x86/speculation: Use IBRS if available before
 calling into firmware

On Wed, Feb 14, 2018 at 3:29 PM, David Woodhouse <dwmw@...zon.co.uk> wrote:

> +#define alternative_msr_write(_msr, _val, _feature)            \
> +       asm volatile(ALTERNATIVE("",                            \
> +                                "movl %[msr], %%ecx\n\t"       \
> +                                "movl %[val], %%eax\n\t"       \
> +                                "movl $0, %%edx\n\t"           \
> +                                "wrmsr",                       \
> +                                _feature)                      \
> +                    : : [msr] "i" (_msr), [val] "i" (_val)     \
> +                    : "eax", "ecx", "edx", "memory")
> +

It's not needed now, but this would be more generally useful if the
high 32 bits of the MSR value could also be specified.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ