Messages in this thread | | | Date | Tue, 22 Jun 2021 19:15:23 +0200 | From | Borislav Petkov <> | Subject | Re: [patch V3 57/66] x86/pkru: Remove xstate fiddling from write_pkru() |
| |
On Fri, Jun 18, 2021 at 04:19:20PM +0200, Thomas Gleixner wrote: > The PKRU value of a task is stored in task->thread.pkru when the task is > scheduled out. PKRU is restored on schedule in from there. So keeping the > XSAVE buffer up to date is a pointless exercise. > > Remove the xstate fiddling and cleanup all related functions. > > Signed-off-by: Thomas Gleixner <tglx@linutronix.de> > --- > arch/x86/include/asm/pkru.h | 17 ++++------------- > arch/x86/include/asm/special_insns.h | 14 +------------- > arch/x86/kvm/x86.c | 4 ++-- > 3 files changed, 7 insertions(+), 28 deletions(-)
Yap, untangling PKRU from XSAVE makes the related code a lot nicer, I gotta say.
Reviewed-by: Borislav Petkov <bp@suse.de>
-- Regards/Gruss, Boris.
SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg
| |