From: Jann Horn <jann@thejh.net> To: Andy Lutomirski <luto@amacapital.net> Cc: Kyle Huey <me@kylehuey.com>, Thomas Gleixner <tglx@linutronix.de>, John Stultz <john.stultz@linaro.org>, Ingo Molnar <mingo@redhat.com>, Michal Hocko <mhocko@suse.com>, Andrew Morton <akpm@linux-foundation.org>, "Michael S. Tsirkin" <mst@redhat.com>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>, Vlastimil Babka <vbabka@suse.cz>, "Luis R. Rodriguez" <mcgrof@kernel.org>, Mateusz Guzik <mguzik@redhat.com>, Alex Thorlton <athorlton@sgi.com>, "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>, Dmitry Vyukov <dvyukov@google.com>, Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>, Jiri Slaby <jslaby@suse.cz>, Andrey Ryabinin <aryabinin@virtuozzo.com>, Ben Segall <bsegall@google.com>, "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@kernel.org>, Denys Vlasenko <dvlasenk@redhat.com>, Paul Gortmaker <paul.gortmaker@windriver.com>, Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>, "Robert O'Callahan" <robert@ocallahan.org>, "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <linux-kernel@vger.kernel.org>, Juergen Gross <jgross@suse.com>, Linux API <linux-api@vger.kernel.org>, Fenghua Yu <fenghua.yu@intel.com>, Kees Cook <keescook@chromium.org>, "Peter Zijlstra (Intel)" <peterz@infradead.org>, Borislav Petkov <bp@suse.de>, Len Brown <len.brown@intel.com>, Huang Rui <ray.huang@amd.com>, "H. Peter Anvin" <hpa@zytor.com> Subject: Re: [PATCH] prctl,x86 Add PR_[GET|SET]_CPUID for controlling the CPUID instruction. Date: Mon, 12 Sep 2016 19:56:56 +0200 [thread overview] Message-ID: <20160912175656.GA8935@laptop.thejh.net> (raw) In-Reply-To: <CALCETrVJAib918qn9CL4Tvyfok-8eAHimYDabXUF=1Nsxo4-Pw@mail.gmail.com> On Mon, Sep 12, 2016 at 09:56:11AM -0700, Andy Lutomirski wrote: > On Sep 11, 2016 5:29 PM, "Kyle Huey" <me@kylehuey.com> wrote: > > > > 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. > > > > Intel supports faulting on the CPUID instruction in newer processors. Bit > > 31 of MSR_PLATFORM_INFO advertises support for this feature. It is > > documented in detail in Section 2.3.2 of > > http://www.intel.com/content/dam/www/public/us/en/documents/application-notes/virtualization-technology-flexmigration-application-note.pdf. [...] > If this bit is preserved on fork(), then no_new_privs must be checked > (or it must be cleared on "unsafe" exec, but that's nasty). I think you mean "preserved on execve()"?
WARNING: multiple messages have this Message-ID (diff)
From: Jann Horn <jann-XZ1E9jl8jIdeoWH0uzbU5w@public.gmane.org> To: Andy Lutomirski <luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org> Cc: Kyle Huey <me-OhBmq/TcCDJWk0Htik3J/w@public.gmane.org>, Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>, John Stultz <john.stultz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>, Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>, Michal Hocko <mhocko-IBi9RG/b67k@public.gmane.org>, Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>, "Michael S. Tsirkin" <mst-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>, Alexander Shishkin <alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>, Aravind Gopalakrishnan <Aravind.Gopalakrishnan-5C7GfCeVMHo@public.gmane.org>, Vlastimil Babka <vbabka-AlSwsSmVLrQ@public.gmane.org>, "Luis R. Rodriguez" <mcgrof-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>, Mateusz Guzik <mguzik-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>, Alex Thorlton <athorlton-sJ/iWh9BUns@public.gmane.org>, "Rafael J. Wysocki" <rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>, Dmitry Vyukov <dvyukov-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>, Vladimir Zapolskiy <vladimir_zapolskiy-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>, Jiri Slaby <jslaby-AlSwsSmVLrQ@public.gmane.org>, Andrey Ryabinin <aryabinin-5HdwGun5lf+gSpxsJD1C4w@public.gmane.org>, Ben Segall <bsegall-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>, mainta Subject: Re: [PATCH] prctl,x86 Add PR_[GET|SET]_CPUID for controlling the CPUID instruction. Date: Mon, 12 Sep 2016 19:56:56 +0200 [thread overview] Message-ID: <20160912175656.GA8935@laptop.thejh.net> (raw) In-Reply-To: <CALCETrVJAib918qn9CL4Tvyfok-8eAHimYDabXUF=1Nsxo4-Pw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> On Mon, Sep 12, 2016 at 09:56:11AM -0700, Andy Lutomirski wrote: > On Sep 11, 2016 5:29 PM, "Kyle Huey" <me-OhBmq/TcCDJWk0Htik3J/w@public.gmane.org> wrote: > > > > 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. > > > > Intel supports faulting on the CPUID instruction in newer processors. Bit > > 31 of MSR_PLATFORM_INFO advertises support for this feature. It is > > documented in detail in Section 2.3.2 of > > http://www.intel.com/content/dam/www/public/us/en/documents/application-notes/virtualization-technology-flexmigration-application-note.pdf. [...] > If this bit is preserved on fork(), then no_new_privs must be checked > (or it must be cleared on "unsafe" exec, but that's nasty). I think you mean "preserved on execve()"?
next prev parent reply other threads:[~2016-09-12 17:57 UTC|newest] Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-09-12 0:29 [PATCH] prctl,x86 Add PR_[GET|SET]_CPUID for controlling the CPUID instruction Kyle Huey 2016-09-12 0:29 ` Kyle Huey 2016-09-12 9:07 ` Borislav Petkov 2016-09-12 9:07 ` Borislav Petkov 2016-09-12 14:15 ` Kyle Huey 2016-09-12 14:15 ` Kyle Huey 2016-09-12 14:34 ` Borislav Petkov 2016-09-12 14:34 ` Borislav Petkov 2016-09-12 14:34 ` Borislav Petkov 2016-09-13 18:42 ` Kyle Huey 2016-09-13 18:42 ` Kyle Huey 2016-09-12 16:56 ` Andy Lutomirski 2016-09-12 16:56 ` Andy Lutomirski 2016-09-12 17:18 ` Borislav Petkov 2016-09-12 17:18 ` Borislav Petkov 2016-09-12 17:56 ` Jann Horn [this message] 2016-09-12 17:56 ` Jann Horn 2016-09-12 21:07 ` Andy Lutomirski 2016-09-12 21:07 ` Andy Lutomirski 2016-09-14 6:13 ` Kyle Huey 2016-09-14 6:13 ` Kyle Huey 2016-09-14 18:52 ` Andy Lutomirski 2016-09-14 18:52 ` Andy Lutomirski 2016-09-14 19:22 ` Andrew Cooper 2016-09-14 19:22 ` Andrew Cooper 2016-09-14 19:23 ` Boris Ostrovsky 2016-09-14 19:23 ` Boris Ostrovsky 2016-09-14 19:28 ` Andrew Cooper 2016-09-14 19:28 ` Andrew Cooper 2016-09-14 19:36 ` Andy Lutomirski 2016-09-14 19:36 ` Andy Lutomirski 2016-09-14 19:42 ` Andrew Cooper 2016-09-14 19:42 ` Andrew Cooper 2016-09-14 19:42 ` [PATCH] prctl, x86 " Andrew Cooper 2016-09-12 17:37 ` [PATCH] prctl,x86 " Andi Kleen 2016-09-12 18:25 ` Henrique de Moraes Holschuh
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=20160912175656.GA8935@laptop.thejh.net \ --to=jann@thejh.net \ --cc=Aravind.Gopalakrishnan@amd.com \ --cc=akpm@linux-foundation.org \ --cc=alexander.shishkin@linux.intel.com \ --cc=aryabinin@virtuozzo.com \ --cc=athorlton@sgi.com \ --cc=bp@suse.de \ --cc=bsegall@google.com \ --cc=dvlasenk@redhat.com \ --cc=dvyukov@google.com \ --cc=fenghua.yu@intel.com \ --cc=hpa@zytor.com \ --cc=jgross@suse.com \ --cc=john.stultz@linaro.org \ --cc=jslaby@suse.cz \ --cc=keescook@chromium.org \ --cc=len.brown@intel.com \ --cc=linux-api@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=luto@amacapital.net \ --cc=mcgrof@kernel.org \ --cc=me@kylehuey.com \ --cc=mguzik@redhat.com \ --cc=mhocko@suse.com \ --cc=mingo@redhat.com \ --cc=mst@redhat.com \ --cc=paul.gortmaker@windriver.com \ --cc=peterz@infradead.org \ --cc=rafael.j.wysocki@intel.com \ --cc=ray.huang@amd.com \ --cc=robert@ocallahan.org \ --cc=srinivas.pandruvada@linux.intel.com \ --cc=tglx@linutronix.de \ --cc=vbabka@suse.cz \ --cc=vladimir_zapolskiy@mentor.com \ --cc=x86@kernel.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.