Re: [PATCH V3 06/10] x86/entry: Preserve PKRS MSR across exceptions

2020-12-17 Thread Thomas Gleixner
On Fri, Nov 06 2020 at 15:29, ira weiny wrote: > +#ifdef CONFIG_ARCH_HAS_SUPERVISOR_PKEYS > +/* > + * PKRS is a per-logical-processor MSR which overlays additional protection > for > + * pages which have been mapped with a protection key. > + * > + * The register is not maintained with XSAVE so

[PATCH V3 06/10] x86/entry: Preserve PKRS MSR across exceptions

2020-11-06 Thread ira . weiny
From: Ira Weiny The PKRS MSR is not managed by XSAVE. It is preserved through a context switch but this support leaves exception handling code open to memory accesses during exceptions. 2 possible places for preserving this state were considered, irqentry_state_t or pt_regs.[1] pt_regs was