Re: [RFC v2 02/26] mm/asi: Abort isolation on interrupt, exception and context switch

2019-07-12 Thread Alexandre Chartre
On 7/12/19 2:05 AM, Andy Lutomirski wrote: On Jul 11, 2019, at 8:25 AM, Alexandre Chartre wrote: Address space isolation should be aborted if there is an interrupt, an exception or a context switch. Interrupt/exception handlers and context switch code need to run with the full kernel addr

Re: [RFC v2 02/26] mm/asi: Abort isolation on interrupt, exception and context switch

2019-07-11 Thread Andy Lutomirski
> On Jul 11, 2019, at 8:25 AM, Alexandre Chartre > wrote: > > Address space isolation should be aborted if there is an interrupt, > an exception or a context switch. Interrupt/exception handlers and > context switch code need to run with the full kernel address space. > Address space isolation

Re: [RFC v2 02/26] mm/asi: Abort isolation on interrupt, exception and context switch

2019-07-11 Thread Alexandre Chartre
On 7/11/19 10:17 PM, Mike Rapoport wrote: On Thu, Jul 11, 2019 at 01:11:43PM -0700, Andi Kleen wrote: Alexandre Chartre writes: jmp paranoid_exit @@ -1182,6 +1196,16 @@ ENTRY(paranoid_entry) xorl%ebx, %ebx 1: +#ifdef CONFIG_ADDRESS_SPACE_ISOLATION + /* +

Re: [RFC v2 02/26] mm/asi: Abort isolation on interrupt, exception and context switch

2019-07-11 Thread Mike Rapoport
On Thu, Jul 11, 2019 at 01:11:43PM -0700, Andi Kleen wrote: > Alexandre Chartre writes: > > jmp paranoid_exit > > @@ -1182,6 +1196,16 @@ ENTRY(paranoid_entry) > > xorl%ebx, %ebx > > > > 1: > > +#ifdef CONFIG_ADDRESS_SPACE_ISOLATION > > + /* > > +* If address space isolatio

Re: [RFC v2 02/26] mm/asi: Abort isolation on interrupt, exception and context switch

2019-07-11 Thread Andi Kleen
Alexandre Chartre writes: > jmp paranoid_exit > @@ -1182,6 +1196,16 @@ ENTRY(paranoid_entry) > xorl%ebx, %ebx > > 1: > +#ifdef CONFIG_ADDRESS_SPACE_ISOLATION > + /* > + * If address space isolation is active then abort it and return > + * the original kernel CR

[RFC v2 02/26] mm/asi: Abort isolation on interrupt, exception and context switch

2019-07-11 Thread Alexandre Chartre
Address space isolation should be aborted if there is an interrupt, an exception or a context switch. Interrupt/exception handlers and context switch code need to run with the full kernel address space. Address space isolation is aborted by restoring the original CR3 value used before entering addr