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-next>] [day] [month] [year] [list]
Date:   Wed, 12 Dec 2018 02:37:53 +0300
From:   Alexey Dobriyan <adobriyan@...il.com>
To:     luto@...nel.org
Cc:     linux-kernel@...r.kernel.org, tglx@...utronix.de, bp@...e.de,
        thomas.lendacky@....com, hpa@...or.com, john.stultz@...aro.org,
        x86@...nel.org
Subject: Re: [RFC PATCH 4/4] x86/TSC: Use RDTSCP

> And I had a bit of a WTF moment, as in "WTF does
> RDTSC have to do with a speculation protection barrier".
> Does it actually make sense?

It doesn't. There was too much s/lfence/barrier_nospec/ apparently.

> +	asm volatile(ALTERNATIVE_3("rdtsc",
> +				   "mfence; rdtsc", X86_FEATURE_MFENCE_RDTSC,
> +				   "lfence; rdtsc", X86_FEATURE_LFENCE_RDTSC,
> +				   "rdtscp", X86_FEATURE_RDTSCP)
> +			: EAX_EDX_RET(val, low, high)
> +			/* RDTSCP clobbers ECX with MSR_TSC_AUX. */
> +			:: "ecx");

I have a question: does alternatives ordering matter? CPU can have
both features.

And other code in this file uses "c" for clobber.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ