Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-12 Thread Jeremy Cline
On 03/12/2018 03:55 PM, Thiebaud Weksteen wrote: > On Mon, Mar 12, 2018 at 7:33 PM Jeremy Cline wrote: > >> On 03/12/2018 02:29 PM, Thiebaud Weksteen wrote: >>> On Mon, Mar 12, 2018 at 6:30 PM Ard Biesheuvel < > ard.biesheu...@linaro.org> >>> wrote: >>> On 12 March 2018 at 17:01, Jeremy Clin

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-12 Thread Ard Biesheuvel
On 12 March 2018 at 19:55, Thiebaud Weksteen wrote: > On Mon, Mar 12, 2018 at 7:33 PM Jeremy Cline wrote: > >> On 03/12/2018 02:29 PM, Thiebaud Weksteen wrote: >> > On Mon, Mar 12, 2018 at 6:30 PM Ard Biesheuvel < > ard.biesheu...@linaro.org> >> > wrote: >> > >> >> On 12 March 2018 at 17:01, Jere

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-12 Thread Thiebaud Weksteen
On Mon, Mar 12, 2018 at 7:33 PM Jeremy Cline wrote: > On 03/12/2018 02:29 PM, Thiebaud Weksteen wrote: > > On Mon, Mar 12, 2018 at 6:30 PM Ard Biesheuvel < ard.biesheu...@linaro.org> > > wrote: > > > >> On 12 March 2018 at 17:01, Jeremy Cline wrote: > >>> On 03/12/2018 10:56 AM, Ard Biesheuvel w

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-12 Thread Jeremy Cline
On 03/12/2018 02:29 PM, Thiebaud Weksteen wrote: > On Mon, Mar 12, 2018 at 6:30 PM Ard Biesheuvel > wrote: > >> On 12 March 2018 at 17:01, Jeremy Cline wrote: >>> On 03/12/2018 10:56 AM, Ard Biesheuvel wrote: On 12 March 2018 at 14:30, Jeremy Cline wrote: > On 03/12/2018 07:08 AM, Ard

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-12 Thread Jeremy Cline
On 03/12/2018 01:30 PM, Ard Biesheuvel wrote: > On 12 March 2018 at 17:01, Jeremy Cline wrote: >> On 03/12/2018 10:56 AM, Ard Biesheuvel wrote: >>> On 12 March 2018 at 14:30, Jeremy Cline wrote: On 03/12/2018 07:08 AM, Ard Biesheuvel wrote: > On 10 March 2018 at 10:45, Thiebaud Weksteen

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-12 Thread Thiebaud Weksteen
On Mon, Mar 12, 2018 at 6:30 PM Ard Biesheuvel wrote: > On 12 March 2018 at 17:01, Jeremy Cline wrote: > > On 03/12/2018 10:56 AM, Ard Biesheuvel wrote: > >> On 12 March 2018 at 14:30, Jeremy Cline wrote: > >>> On 03/12/2018 07:08 AM, Ard Biesheuvel wrote: > On 10 March 2018 at 10:45, Thie

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-12 Thread Ard Biesheuvel
On 12 March 2018 at 17:01, Jeremy Cline wrote: > On 03/12/2018 10:56 AM, Ard Biesheuvel wrote: >> On 12 March 2018 at 14:30, Jeremy Cline wrote: >>> On 03/12/2018 07:08 AM, Ard Biesheuvel wrote: On 10 March 2018 at 10:45, Thiebaud Weksteen wrote: > On Fri, Mar 9, 2018 at 5:54 PM Jeremy

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-12 Thread Jeremy Cline
On 03/12/2018 10:56 AM, Ard Biesheuvel wrote: > On 12 March 2018 at 14:30, Jeremy Cline wrote: >> On 03/12/2018 07:08 AM, Ard Biesheuvel wrote: >>> On 10 March 2018 at 10:45, Thiebaud Weksteen wrote: On Fri, Mar 9, 2018 at 5:54 PM Jeremy Cline wrote: > On Fri, Mar 09, 2018 at 10:43

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-12 Thread Ard Biesheuvel
On 12 March 2018 at 14:30, Jeremy Cline wrote: > On 03/12/2018 07:08 AM, Ard Biesheuvel wrote: >> On 10 March 2018 at 10:45, Thiebaud Weksteen wrote: >>> On Fri, Mar 9, 2018 at 5:54 PM Jeremy Cline wrote: >>> On Fri, Mar 09, 2018 at 10:43:50AM +, Thiebaud Weksteen wrote: > Thanks a

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-12 Thread Jeremy Cline
On 03/12/2018 07:08 AM, Ard Biesheuvel wrote: > On 10 March 2018 at 10:45, Thiebaud Weksteen wrote: >> On Fri, Mar 9, 2018 at 5:54 PM Jeremy Cline wrote: >> >>> On Fri, Mar 09, 2018 at 10:43:50AM +, Thiebaud Weksteen wrote: Thanks a lot for trying out the patch! Please don't mo

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-12 Thread Ard Biesheuvel
On 10 March 2018 at 10:45, Thiebaud Weksteen wrote: > On Fri, Mar 9, 2018 at 5:54 PM Jeremy Cline wrote: > >> On Fri, Mar 09, 2018 at 10:43:50AM +, Thiebaud Weksteen wrote: >> > Thanks a lot for trying out the patch! >> > >> > Please don't modify your install at this stage, I think we are hit

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-12 Thread Paul Menzel
Dear Jarkko, On 03/12/18 11:17, Jarkko Sakkinen wrote: On Sat, 2018-03-10 at 10:45 +, Thiebaud Weksteen wrote: On Fri, Mar 9, 2018 at 5:54 PM Jeremy Cline wrote: and it's hanging at "memset(log_tbl, 0, sizeof(*log_tbl) + log_size);" Thanks. Well, it looks like the memory that is suppos

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-12 Thread Jarkko Sakkinen
On Sat, 2018-03-10 at 10:45 +, Thiebaud Weksteen wrote: > On Fri, Mar 9, 2018 at 5:54 PM Jeremy Cline wrote: > > and it's hanging at "memset(log_tbl, 0, sizeof(*log_tbl) + log_size);" > > Thanks. Well, it looks like the memory that is supposedly allocated is not > usable. I'm thinking this is

Re: [PATCH 2/5] x86/efi: Replace efi_pgd with efi_mm.pgd

2018-03-12 Thread Ingo Molnar
* Ard Biesheuvel wrote: > On 12 March 2018 at 09:26, Ingo Molnar wrote: > > > > * Ingo Molnar wrote: > > > >> > -static pgd_t *efi_pgd; > >> > - > >> > >> Hm, so there's some interaction here with: > >> > >> 116fef640859: x86/mm/dump_pagetables: Add the EFI pagetable to the > >> debugfs 'pa

[PATCH rebased 2/2] x86/efi: Use efi_switch_mm() rather than manually twiddling with %cr3

2018-03-12 Thread Ard Biesheuvel
From: Sai Praneeth Use helper function efi_switch_mm() to switch to/from efi_mm when invoking any UEFI runtime services. Likewise, we need to switch back to previous mm (mm context stolen by efi_mm) after the above calls return successfully. We can use efi_switch_mm() helper function only with x

[PATCH rebased 1/2] x86/efi: Replace efi_pgd with efi_mm.pgd

2018-03-12 Thread Ard Biesheuvel
From: Sai Praneeth Since the previous patch added support for efi_mm, let's handle efi_pgd through efi_mm and remove global variable efi_pgd. Signed-off-by: Sai Praneeth Prakhya Cc: "Lee, Chun-Yi" Cc: Borislav Petkov Cc: Tony Luck Cc: Andy Lutomirski Cc: Michael S. Tsirkin Cc: Bhupesh Shar

Re: [PATCH 2/5] x86/efi: Replace efi_pgd with efi_mm.pgd

2018-03-12 Thread Ard Biesheuvel
On 12 March 2018 at 09:26, Ingo Molnar wrote: > > * Ingo Molnar wrote: > >> > -static pgd_t *efi_pgd; >> > - >> >> Hm, so there's some interaction here with: >> >> 116fef640859: x86/mm/dump_pagetables: Add the EFI pagetable to the debugfs >> 'page_tables' directory >> >> which is in tip:x86/mm

Re: [PATCH 2/5] x86/efi: Replace efi_pgd with efi_mm.pgd

2018-03-12 Thread Ingo Molnar
* Ingo Molnar wrote: > > -static pgd_t *efi_pgd; > > - > > Hm, so there's some interaction here with: > > 116fef640859: x86/mm/dump_pagetables: Add the EFI pagetable to the debugfs > 'page_tables' directory > > which is in tip:x86/mm. > > Could you please resolve that conflict? I'll sort

Re: [PATCH 2/5] x86/efi: Replace efi_pgd with efi_mm.pgd

2018-03-12 Thread Ingo Molnar
* Ard Biesheuvel wrote: > From: Sai Praneeth > > Since the previous patch added support for efi_mm, let's handle efi_pgd > through efi_mm and remove global variable efi_pgd. > > Signed-off-by: Sai Praneeth Prakhya > Cc: "Lee, Chun-Yi" > Cc: Borislav Petkov > Cc: Tony Luck > Cc: Andy Lutom

[GIT PULL 0/5] more EFI changes for v4.17

2018-03-12 Thread Ard Biesheuvel
The following changes since commit f779ca740f25c8a6a72d951334f9efc3158a318b: efi: Make const array 'apple' static (2018-03-09 09:30:35 +0100) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-next for you to fetch changes up to a6072c

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

2018-03-12 Thread Ard Biesheuvel
From: Sai Praneeth Use helper function efi_switch_mm() to switch to/from efi_mm when invoking any UEFI runtime services. Likewise, we need to switch back to previous mm (mm context stolen by efi_mm) after the above calls return successfully. We can use efi_switch_mm() helper function only with x

[PATCH 4/5] efi/esrt: fix handling of early ESRT table mapping

2018-03-12 Thread Ard Biesheuvel
As reported by Tyler, efi_esrt_init() will return without releasing the ESRT table header mapping if it encounters a table with an unexpected version. Replacing the 'return' with 'goto err_memunmap' would fix this particular occurrence, but, as it turns out, the code is rather peculiar to begin wit

[PATCH 2/5] x86/efi: Replace efi_pgd with efi_mm.pgd

2018-03-12 Thread Ard Biesheuvel
From: Sai Praneeth Since the previous patch added support for efi_mm, let's handle efi_pgd through efi_mm and remove global variable efi_pgd. Signed-off-by: Sai Praneeth Prakhya Cc: "Lee, Chun-Yi" Cc: Borislav Petkov Cc: Tony Luck Cc: Andy Lutomirski Cc: Michael S. Tsirkin Cc: Bhupesh Shar

[PATCH 5/5] efi: use string literals for efi_char16_t variable initializers

2018-03-12 Thread Ard Biesheuvel
Now that we unambiguously build the entire kernel with -fshort-wchar, it is no longer necessary to open code efi_char16_t[] initializers as arrays of characters, and we can move to the L"xxx" notation instead. Cc: Arnd Bergmann Cc: Lukas Wunner Signed-off-by: Ard Biesheuvel --- arch/x86/boot/c

[PATCH 1/5] efi: Use efi_mm in x86 as well as ARM

2018-03-12 Thread Ard Biesheuvel
From: Sai Praneeth Presently, only ARM uses mm_struct to manage efi page tables and efi runtime region mappings. As this is the preferred approach, let's make this data structure common across architectures. Specially, for x86, using this data structure improves code maintainability and readabili