lkml.org 
[lkml]   [2021]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch V3 53/66] x86/fpu: Hook up PKRU into ptrace()
On Fri, Jun 18, 2021 at 04:19:16PM +0200, Thomas Gleixner wrote:
> From: Dave Hansen <dave.hansen@linux.intel.com>
>
> One nice thing about having PKRU be XSAVE-managed is that it gets naturally
> exposed into the XSAVE-using ABIs. Now that XSAVE will not be used to
> manage PKRU, these ABIs need to be manually enabled to deal with PKRU.
>
> ptrace() uses copy_uabi_xstate_to_kernel() to collect the tracee's
> XSTATE. As PKRU is not in the task's XSTATE buffer, use task->thread.pkru
> for filling in up the ptrace buffer.
>
> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> ---
> arch/x86/include/asm/fpu/xstate.h | 2 +-
> arch/x86/kernel/fpu/regset.c | 10 ++++------
> arch/x86/kernel/fpu/xstate.c | 25 ++++++++++++++++++-------
> 3 files changed, 23 insertions(+), 14 deletions(-)

Reviewed-by: Borislav Petkov <bp@suse.de>

--
Regards/Gruss,
Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg

\
 
 \ /
  Last update: 2021-06-22 19:02    [W:0.543 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site