Re: [PATCH V7 08/18] x86/entry: Preserve PKRS MSR across exceptions

2021-12-07 Thread Thomas Gleixner
Ira, On Mon, Dec 06 2021 at 17:54, Ira Weiny wrote: > On Thu, Nov 25, 2021 at 03:12:47PM +0100, Thomas Gleixner wrote: >> > +.macro __call_ext_ptregs cfunc annotate_retpoline_safe:req >> > +#ifdef CONFIG_ARCH_ENABLE_SUPERVISOR_PKEYS >> > + /* add space for extended_pt_regs */ >> > + subq$EXT

Re: [PATCH V7 08/18] x86/entry: Preserve PKRS MSR across exceptions

2021-12-06 Thread Ira Weiny
On Mon, Dec 06, 2021 at 05:54:23PM -0800, 'Ira Weiny' wrote: [snip] > > > > Though, if you look at the xen_pv_evtchn_do_upcall() part where you > > added this extra invocation you might figure out that adding > > pkrs_restore_irq() to irqentry_exit_cond_resched() and explicitely to > > the 'else

Re: [PATCH V7 08/18] x86/entry: Preserve PKRS MSR across exceptions

2021-12-06 Thread Ira Weiny
Thomas, Thanks for the review. Sorry for being so late to respond I was sick all last week and so it took me longer to figure out some of this stuff. On Thu, Nov 25, 2021 at 03:12:47PM +0100, Thomas Gleixner wrote: > Ira, > > On Tue, Aug 03 2021 at 21:32, ira weiny wrote: > > +/* > > + * __call

Re: [PATCH V7 08/18] x86/entry: Preserve PKRS MSR across exceptions

2021-12-02 Thread Andy Lutomirski
On 11/12/21 16:50, Ira Weiny wrote: On Tue, Aug 03, 2021 at 09:32:21PM -0700, 'Ira Weiny' wrote: 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 possibl

Re: [PATCH V7 08/18] x86/entry: Preserve PKRS MSR across exceptions

2021-11-25 Thread Thomas Gleixner
Ira, On Tue, Aug 03 2021 at 21:32, ira weiny wrote: > +/* > + * __call_ext_ptregs - Helper macro to call into C with extended pt_regs > + * @cfunc: C function to be called > + * > + * This will ensure that extended_ptregs is added and removed as needed > during > + * a call into C code.

Re: [PATCH V7 08/18] x86/entry: Preserve PKRS MSR across exceptions

2021-11-25 Thread Thomas Gleixner
On Fri, Nov 12 2021 at 16:50, Ira Weiny wrote: > On Tue, Aug 03, 2021 at 09:32:21PM -0700, 'Ira Weiny' wrote: >> 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 duri

Re: [PATCH V7 08/18] x86/entry: Preserve PKRS MSR across exceptions

2021-11-12 Thread Ira Weiny
On Tue, Aug 03, 2021 at 09:32:21PM -0700, 'Ira Weiny' wrote: > 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 t