linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kyle Huey <me-OhBmq/TcCDJWk0Htik3J/w@public.gmane.org>
To: Robert O'Callahan <robert-7ok7fSEJICeEi8DpZVb4nw@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Dave Hansen <dave.hansen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	Andy Lutomirski <luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org>,
	Dmitry Safonov
	<0x7f454c46-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Borislav Petkov <bp-l3A5Bk7waGM@public.gmane.org>,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b@public.gmane.org
Subject: [PATCH v3] arch_prctl,x86 Add ARCH_[GET|SET]_CPUID for controlling the CPUID instruction
Date: Thu, 15 Sep 2016 16:33:21 -0700	[thread overview]
Message-ID: <20160915233324.6060-1-khuey@kylehuey.com> (raw)

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.

The following changes have been	made since v2.

Patch 1:
- Use of compat_sys_arch_prctl and separate do_arch_prctl_[common|64]
  functions to separate generic and 64-bit only arch_prctls.

Patch 2:
- The hack to suppress the mistakenly advertised CPUID faulting support in
  Xen guests is removed. Doing this for both PV and HVM guests is quite
  tricky, and likely more trouble than it's worth. Instead I'll submit a
  patch to Xen.

Patch 3:
- TIF_NOCPUID is now droppped on exec. I added the arch_post_exec hook
  as I didn't see any existing place to run arch-specific code during
  exec. The test is updated for the new exec behavior.

             reply	other threads:[~2016-09-15 23:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-15 23:33 Kyle Huey [this message]
2016-09-15 23:33 ` [PATCH v3 1/3] syscalls,x86 Expose arch_prctl on x86-32 Kyle Huey
2016-09-15 23:51   ` Andy Lutomirski
     [not found]   ` <20160915233324.6060-2-khuey-OhBmq/TcCDJWk0Htik3J/w@public.gmane.org>
2016-09-16  7:50     ` Thomas Gleixner
2016-09-16 15:56       ` Kyle Huey
2016-09-15 23:33 ` [PATCH v3 2/3] x86 Test and expose CPUID faulting capabilities in /proc/cpuinfo Kyle Huey
     [not found]   ` <20160915233324.6060-3-khuey-OhBmq/TcCDJWk0Htik3J/w@public.gmane.org>
2016-09-15 23:43     ` Andy Lutomirski
2016-09-16 10:13     ` Thomas Gleixner
     [not found] ` <20160915233324.6060-1-khuey-OhBmq/TcCDJWk0Htik3J/w@public.gmane.org>
2016-09-15 23:33   ` [PATCH v3 3/3] x86,arch_prctl Add ARCH_[GET|SET]_CPUID for controlling the CPUID instruction Kyle Huey
2016-09-16  0:07     ` Andy Lutomirski
2016-09-16  5:30       ` Kyle Huey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160915233324.6060-1-khuey@kylehuey.com \
    --to=me-ohbmq/tccdjwk0htik3j/w@public.gmane.org \
    --cc=0x7f454c46-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=bp-l3A5Bk7waGM@public.gmane.org \
    --cc=dave.hansen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org \
    --cc=robert-7ok7fSEJICeEi8DpZVb4nw@public.gmane.org \
    --cc=xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).