Re: [PATCH 4/4] x86, efi: Map runtime services 1:1

2013-06-10 Thread Borislav Petkov
On Thu, Jun 06, 2013 at 12:38:10PM -0700, H. Peter Anvin wrote: On 06/06/2013 12:36 PM, Borislav Petkov wrote: On Thu, Jun 06, 2013 at 12:28:20PM -0700, H. Peter Anvin wrote: Or we could materialize mappings for this specific PGD. However, adding a read of %cr3 in __do_page_fault sounds

Re: [PATCH 4/4] x86, efi: Map runtime services 1:1

2013-06-06 Thread H. Peter Anvin
On 06/06/2013 08:58 AM, Borislav Petkov wrote: -- diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 654be4ae3047..7a6129afdff1 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c @@ -1021,6 +1021,9 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code)

Re: [PATCH 4/4] x86, efi: Map runtime services 1:1

2013-06-06 Thread Borislav Petkov
On Thu, Jun 06, 2013 at 12:28:20PM -0700, H. Peter Anvin wrote: Or we could materialize mappings for this specific PGD. However, adding a read of %cr3 in __do_page_fault sounds expensive. Yes, I think we want to make sure all mappings are there when we do an EFI runtime call so that we never

[PATCH 4/4] x86, efi: Map runtime services 1:1

2013-06-02 Thread Borislav Petkov
From: Borislav Petkov b...@suse.de Due to the braindead design of EFI, we cannot map runtime services more than once for the duration of a booted system. Thus, if we want to use EFI runtime services in a kexec'ed kernel, maybe the only possible and sensible approach would be to map them 1:1 so