linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v7 0/6] x86/arch_prctl Add ARCH_[GET|SET]_CPUID for controlling the CPUID instruction
@ 2016-10-19  2:03 Kyle Huey
  2016-10-19  2:03 ` [PATCH v7 1/6] x86/arch_prctl/64: Use SYSCALL_DEFINE2 to define sys_arch_prctl Kyle Huey
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Kyle Huey @ 2016-10-19  2:03 UTC (permalink / raw)
  To: Robert O'Callahan, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, x86, Jeff Dike, Richard Weinberger,
	Andy Lutomirski, Borislav Petkov, Dmitry Safonov, Peter Zijlstra,
	Dave Hansen, Boris Ostrovsky, Alexander Viro, Shuah Khan,
	Rafael J. Wysocki, Len Brown
  Cc: linux-kernel, user-mode-linux-devel, user-mode-linux-user,
	linux-kselftest, linux-api

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.

v6 did not get any feedback, so I included the changes since v5.

Since v6:
- Rebased to 4.9-rc1 (primarily over the new VDSO arch_prctls and the new pkey
  entries in the syscall table)

Since v5:

Patch 3:
- do_arch_prctl is again do_arch_prctl_common

Patch 6:
- Added static qualifiers on get/set_cpuid_mode
- Braced ifs in disable/enable_cpuid
- Renamed arch_post_exec to arch_setup_new_exec

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-10-27 22:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-19  2:03 [PATCH v7 0/6] x86/arch_prctl Add ARCH_[GET|SET]_CPUID for controlling the CPUID instruction Kyle Huey
2016-10-19  2:03 ` [PATCH v7 1/6] x86/arch_prctl/64: Use SYSCALL_DEFINE2 to define sys_arch_prctl Kyle Huey
2016-10-19  2:03 ` [PATCH v7 2/6] x86/arch_prctl/64: Rename do_arch_prctl to do_arch_prctl_64 Kyle Huey
2016-10-19  2:03 ` [PATCH v7 3/6] x86/arch_prctl: Add do_arch_prctl_common Kyle Huey
2016-10-19  2:03 ` [PATCH v7 4/6] x86/syscalls/32: Wire up arch_prctl on x86-32 Kyle Huey
2016-10-19  2:03 ` [PATCH v7 5/6] x86/cpufeature: Detect CPUID faulting support Kyle Huey
2016-10-27  8:21   ` Thomas Gleixner
2016-10-19  2:03 ` [PATCH v7 6/6] x86/arch_prctl: Add ARCH_[GET|SET]_CPUID Kyle Huey
2016-10-27 11:15   ` Thomas Gleixner
2016-10-27 22:34     ` Andy Lutomirski
2016-10-27 22:38       ` Thomas Gleixner
2016-10-25  5:30 ` [PATCH v7 0/6] x86/arch_prctl Add ARCH_[GET|SET]_CPUID for controlling the CPUID instruction Kyle Huey
2016-10-25 16:47   ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).