Re: [PATCH 3/3] x86/efi: Use efi_switch_mm() rather than manually twiddling with cr3

2017-08-16 Thread Andy Lutomirski
On Wed, Aug 16, 2017 at 5:57 AM, Matt Fleming wrote: > On Wed, 16 Aug, at 12:03:22PM, Mark Rutland wrote: >> >> I'd expect we'd abort at a higher level, not taking any sample. i.e. >> we'd have the core overflow handler check in_funny_mm(), and if so, skip >> the sample,

[PATCH v10 1/2] efi: Introduce efi_early_memdesc_ptr to get pointer to memmap descriptor

2017-08-16 Thread Baoquan He
The existing map iteration helper for_each_efi_memory_desc_in_map can only be used after OS initializes EFI subsystem to fill data of struct efi_memory_map. Before that we also need iterate map descriptors which are stored in several intermediate structures, like struct efi_boot_memmap for arch

Re: [PATCH v9 1/2] efi: Introduce efi_early_memdesc_ptr to get pointer to memmap descriptor

2017-08-16 Thread Baoquan He
On 08/16/17 at 12:37pm, Matt Fleming wrote: > On Mon, 14 Aug, at 10:54:23PM, Baoquan He wrote: > > The existing map iteration helper for_each_efi_memory_desc_in_map can > > only be used after OS initializes EFI to fill data of struct efi_memory_map. > > Should this say "EFI subsystem"? The

Re: [PATCH 3/3] x86/efi: Use efi_switch_mm() rather than manually twiddling with cr3

2017-08-16 Thread Matt Fleming
On Wed, 16 Aug, at 12:03:22PM, Mark Rutland wrote: > > I'd expect we'd abort at a higher level, not taking any sample. i.e. > we'd have the core overflow handler check in_funny_mm(), and if so, skip > the sample, as with the skid case. FYI, this is my preferred solution for x86 too. -- To

Re: [PATCH 3/3] x86/efi: Use efi_switch_mm() rather than manually twiddling with cr3

2017-08-16 Thread Mark Rutland
On Wed, Aug 16, 2017 at 11:07:10AM +0100, Will Deacon wrote: > On Wed, Aug 16, 2017 at 10:53:38AM +0100, Mark Rutland wrote: > > On Wed, Aug 16, 2017 at 10:31:12AM +0100, Ard Biesheuvel wrote: > > > (+ Mark, Will) > > > > > > On 15 August 2017 at 22:46, Andy Lutomirski wrote: >

Re: [PATCH 3/3] x86/efi: Use efi_switch_mm() rather than manually twiddling with cr3

2017-08-16 Thread Will Deacon
On Wed, Aug 16, 2017 at 10:53:38AM +0100, Mark Rutland wrote: > On Wed, Aug 16, 2017 at 10:31:12AM +0100, Ard Biesheuvel wrote: > > (+ Mark, Will) > > > > On 15 August 2017 at 22:46, Andy Lutomirski wrote: > > > On Tue, Aug 15, 2017 at 12:18 PM, Sai Praneeth Prakhya > > >

Re: [PATCH 3/3] x86/efi: Use efi_switch_mm() rather than manually twiddling with cr3

2017-08-16 Thread Mark Rutland
On Wed, Aug 16, 2017 at 10:31:12AM +0100, Ard Biesheuvel wrote: > (+ Mark, Will) > > On 15 August 2017 at 22:46, Andy Lutomirski wrote: > > On Tue, Aug 15, 2017 at 12:18 PM, Sai Praneeth Prakhya > > wrote: > >> +/* > >> + * Makes the calling