Messages in this thread | | | From | Kyle Huey <> | Date | Tue, 13 Sep 2016 11:42:33 -0700 | Subject | Re: [PATCH] prctl,x86 Add PR_[GET|SET]_CPUID for controlling the CPUID instruction. |
| |
On Mon, Sep 12, 2016 at 7:15 AM, Kyle Huey <me@kylehuey.com> wrote: > On Mon, Sep 12, 2016 at 2:07 AM, Borislav Petkov <bp@suse.de> wrote: >> On Sun, Sep 11, 2016 at 05:29:23PM -0700, Kyle Huey wrote: >>> @@ -2162,6 +2168,12 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3, >>> case PR_SET_TSC: >>> error = SET_TSC_CTL(arg2); >>> break; >>> + case PR_GET_CPUID: >>> + error = GET_CPUID_CTL(arg2); >>> + break; >>> + case PR_SET_CPUID: >>> + error = SET_CPUID_CTL(arg2); >>> + break; >>> case PR_TASK_PERF_EVENTS_DISABLE: >>> error = perf_event_task_disable(); >>> break; >> >> This whole fun should be in arch_prctl() as it is arch-specific. > > Yeah, I was debating about that, and did it this way because of > PR_SET_TSC. Will fix.
arch_prctl is not yet exposed on 32 bit x86, so we'll have to add that as well to do this.
- Kyle
| |