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] [day] [month] [year] [list]
Date:   Tue, 08 Oct 2019 07:35:00 -0000
From:   "tip-bot2 for Babu Moger" <tip-bot2@...utronix.de>
To:     linux-tip-commits@...r.kernel.org
Cc:     Babu Moger <babu.moger@....com>, Borislav Petkov <bp@...e.de>,
        Aaron Lewis <aaronlewis@...gle.com>, ak@...ux.intel.com,
        Fenghua Yu <fenghua.yu@...el.com>,
        "H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        "Peter Zijlstra (Intel)" <peterz@...radead.org>,
        robert.hu@...ux.intel.com, Thomas Gleixner <tglx@...utronix.de>,
        Thomas Hellstrom <thellstrom@...are.com>,
        "x86-ml" <x86@...nel.org>, Ingo Molnar <mingo@...nel.org>,
        Borislav Petkov <bp@...en8.de>, linux-kernel@...r.kernel.org
Subject: [tip: x86/cpu] x86/cpufeatures: Add feature bit RDPRU on AMD

The following commit has been merged into the x86/cpu branch of tip:

Commit-ID:     9d40b85bb46a99bc95dad3a07787da93b0a018e9
Gitweb:        https://git.kernel.org/tip/9d40b85bb46a99bc95dad3a07787da93b0a018e9
Author:        Babu Moger <babu.moger@....com>
AuthorDate:    Mon, 07 Oct 2019 15:48:39 -05:00
Committer:     Borislav Petkov <bp@...e.de>
CommitterDate: Tue, 08 Oct 2019 09:28:37 +02:00

x86/cpufeatures: Add feature bit RDPRU on AMD

AMD Zen 2 introduces a new RDPRU instruction which is used to give
access to some processor registers that are typically only accessible
when the privilege level is zero.

ECX is used as the implicit register to specify which register to read.
RDPRU places the specified register’s value into EDX:EAX.

For example, the RDPRU instruction can be used to read MPERF and APERF
at CPL > 0.

Add the feature bit so it is visible in /proc/cpuinfo.

Details are available in the AMD64 Architecture Programmer’s Manual:
https://www.amd.com/system/files/TechDocs/24594.pdf

Signed-off-by: Babu Moger <babu.moger@....com>
Signed-off-by: Borislav Petkov <bp@...e.de>
Cc: Aaron Lewis <aaronlewis@...gle.com>
Cc: ak@...ux.intel.com
Cc: Fenghua Yu <fenghua.yu@...el.com>
Cc: "H. Peter Anvin" <hpa@...or.com>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: "Peter Zijlstra (Intel)" <peterz@...radead.org>
Cc: robert.hu@...ux.intel.com
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Thomas Hellstrom <thellstrom@...are.com>
Cc: x86-ml <x86@...nel.org>
Link: https://lkml.kernel.org/r/20191007204839.5727.10803.stgit@localhost.localdomain
---
 arch/x86/include/asm/cpufeatures.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h
index 0652d3e..1db10a1 100644
--- a/arch/x86/include/asm/cpufeatures.h
+++ b/arch/x86/include/asm/cpufeatures.h
@@ -292,6 +292,7 @@
 #define X86_FEATURE_CLZERO		(13*32+ 0) /* CLZERO instruction */
 #define X86_FEATURE_IRPERF		(13*32+ 1) /* Instructions Retired Count */
 #define X86_FEATURE_XSAVEERPTR		(13*32+ 2) /* Always save/restore FP error pointers */
+#define X86_FEATURE_RDPRU		(13*32+ 4) /* Read processor register at user level */
 #define X86_FEATURE_WBNOINVD		(13*32+ 9) /* WBNOINVD instruction */
 #define X86_FEATURE_AMD_IBPB		(13*32+12) /* "" Indirect Branch Prediction Barrier */
 #define X86_FEATURE_AMD_IBRS		(13*32+14) /* "" Indirect Branch Restricted Speculation */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ