[PATCH V3 3/3] efi: Use efi_rts_wq to invoke EFI Runtime Services

2018-05-21 Thread Sai Praneeth Prakhya
From: Sai Praneeth Presently, when a user process requests the kernel to execute any efi_runtime_service(), kernel switches the page directory (%cr3) from swapper_pgd to efi_pgd. Other subsystems in the kernel aren't aware of this switch and they might think, user

[PATCH V3 1/3] x86/efi: Call efi_delete_dummy_variable() after creating efi_rts_wq

2018-05-21 Thread Sai Praneeth Prakhya
From: Sai Praneeth Create a workqueue named efi_rts_wq (efi runtime services workqueue), so that all efi_runtime_services() are executed in kthread context. Invoking efi_runtime_services() through efi_rts_wq means all accesses to efi_runtime_services() should be

[PATCH V3 2/3] efi: Introduce efi_queue_work() to queue any efi_runtime_service() on efi_rts_wq

2018-05-21 Thread Sai Praneeth Prakhya
From: Sai Praneeth When a process requests the kernel to execute any efi_runtime_service(), the requested efi_runtime_service (represented as an identifier) and its arguments are packed into a struct named efi_runtime_work and queued onto work queue named

[PATCH V3 0/3] Use efi_rts_wq to invoke EFI Runtime Services

2018-05-21 Thread Sai Praneeth Prakhya
From: Sai Praneeth Problem statement: -- Presently, efi_runtime_services() silently switch %cr3 from swapper_pgd to efi_pgd. As a consequence, kernel code that runs in efi_pgd (e.g., perf code via an NMI) will have incorrect user space mappings[1].

[PATCH 4.9 26/87] efi: Avoid potential crashes, fix the struct efi_pci_io_protocol_32 definition for mixed mode

2018-05-21 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Ard Biesheuvel commit 0b3225ab9407f557a8e20f23f37aa7236c10a9b1 upstream. Mixed mode allows a kernel built for x86_64 to interact with 32-bit EFI firmware, but

[PATCH 4.14 34/95] efi: Avoid potential crashes, fix the struct efi_pci_io_protocol_32 definition for mixed mode

2018-05-21 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Ard Biesheuvel commit 0b3225ab9407f557a8e20f23f37aa7236c10a9b1 upstream. Mixed mode allows a kernel built for x86_64 to interact with 32-bit EFI firmware, but

[PATCH 4.16 047/110] efi: Avoid potential crashes, fix the struct efi_pci_io_protocol_32 definition for mixed mode

2018-05-21 Thread Greg Kroah-Hartman
4.16-stable review patch. If anyone has any objections, please let me know. -- From: Ard Biesheuvel commit 0b3225ab9407f557a8e20f23f37aa7236c10a9b1 upstream. Mixed mode allows a kernel built for x86_64 to interact with 32-bit EFI firmware, but

RE: Query regarding SetVirtualAddressMap()

2018-05-21 Thread Prakhya, Sai Praneeth
> > AFAIK, ExitBootServices() means that boot services are no longer > > needed by OS/bootloader and hence firmware can terminate them. Does it > > also mean that the system is in runtime mode..? (I don't think so, as, I > > didn't > find it in UEFI spec). > > > > Yes > > > Also, could you