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: <3908561D78D1C84285E8C5FCA982C28F7F5E3E80@ORSMSX115.amr.corp.intel.com>
Date:   Tue, 14 Apr 2020 18:00:21 +0000
From:   "Luck, Tony" <tony.luck@...el.com>
To:     Peter Zijlstra <peterz@...radead.org>,
        "Park, Kyung Min" <kyung.min.park@...el.com>
CC:     "x86@...nel.org" <x86@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "hpa@...or.com" <hpa@...or.com>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "ak@...ux.intel.com" <ak@...ux.intel.com>,
        "Raj, Ashok" <ashok.raj@...el.com>,
        "Shankar, Ravi V" <ravi.v.shankar@...el.com>,
        "Yu, Fenghua" <fenghua.yu@...el.com>
Subject: RE: [PATCH v3 3/3] x86/delay: Introduce TPAUSE delay

>> +static inline void __tpause(u32 ecx, u32 edx, u32 eax)
>> +{
>> +	/* "tpause %ecx, %edx, %eax;" */
>> +	asm volatile(".byte 0x66, 0x0f, 0xae, 0xf1\t\n"
>> +		     :
>> +		     : "c"(ecx), "d"(edx), "a"(eax));
>> +}
>
> Can we please get a comment stating from what binutils version this
> opcode has a mnemonic? That way, when we raise the minimum binutils
> version we can easily grep and find such things.

Or maybe use arch/x86/Kconfig.assembler to set up a CONFIG_AS_TPAUSE?

Then the code can read something like (syntax may need fixing)

#ifdef CONFIG_AS_TPAUSE
		asm volatile("tpause %ecx\n", : : "c"(ecx), "d"(edx), "a"(eax));
#else
		asm volatile(".byte hex gibberish ...
#endif

-Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ