[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160921185824.18980-1-khuey@kylehuey.com>
Date: Wed, 21 Sep 2016 11:58:18 -0700
From: Kyle Huey <me@...ehuey.com>
To: Robert O'Callahan <robert@...llahan.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H . Peter Anvin" <hpa@...or.com>, x86@...nel.org,
Jeff Dike <jdike@...toit.com>,
Richard Weinberger <richard@....at>,
Andy Lutomirski <luto@...nel.org>,
Borislav Petkov <bp@...e.de>,
Dmitry Safonov <dsafonov@...tuozzo.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Peter Zijlstra <peterz@...radead.org>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Shuah Khan <shuah@...nel.org>, Len Brown <len.brown@...el.com>,
"Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org,
user-mode-linux-devel@...ts.sourceforge.net,
user-mode-linux-user@...ts.sourceforge.net,
linux-kselftest@...r.kernel.org, linux-api@...r.kernel.org
Subject: [PATCH v5 0/6] x86/arch_prctl Add ARCH_[GET|SET]_CPUID for controlling the CPUID instruction
rr (http://rr-project.org/), a userspace record-and-replay reverse-
execution debugger, would like to trap and emulate the CPUID instruction.
This would allow us to a) mask away certain hardware features that rr does
not support (e.g. RDRAND) and b) enable trace portability across machines
by providing constant results.
Newer Intel CPUs (Ivy Bridge and later) can fault when CPUID is executed at
CPL > 0. Expose this capability to userspace as a new pair of arch_prctls,
ARCH_GET_CPUID and ARCH_SET_CPUID, with two values, ARCH_CPUID_ENABLE and
ARCH_CPUID_SIGSEGV.
The following changes have been made since v4:
Patch 1:
- Fix missing include on 64bit UML.
Patch 6:
- Fix comment in the test that still referred to an earlier design of the API.
The following changes have been made since v3:
Patch 1 was split into patches 1-4, patches 2 and 3 became patches 5 and 6,
respectively.
Patch 1:
- Use SYSCALL_DEFINE in UML.
Patch 2:
- More descriptive commit message.
Patch 3:
- More decriptive commit message.
- Name the common arch_prctl function do_arch_prctl instead of
do_arch_prctl_common
Patch 4:
- Move the 32-bit syscall entry point to process_32.c, place the compat
entry point in process_64.c
Patch 5 (previously Patch 2):
- More descriptive commit message.
- Prefix the #define for the cpuid faulting bit with PLATINFO
- supports_cpuid_faulting returns bool
- Rearrange supports_cpuid_faulting to avoid linebreaks
Patch 6 (previously Patch 3):
- ARCH_GET_CPUID now takes 0 for the second argument, and returns the
result directly.
- arch_post_exec is now a #define, called from setup_new_exec
- The test now uses errx
- The test now checks that ARCH_GET_CPUID returns ARCH_CPUID_SIGSEGV after
fork()
Powered by blists - more mailing lists