Re: [PATCH 5/8] efi: Get the secure boot status [ver #5]

2016-12-08 Thread Lukas Wunner
On Thu, Dec 08, 2016 at 05:31:13PM +, David Howells wrote: > Lukas Wunner wrote: > > > +out_efi_err: > > > + pr_efi_err(sys_table_arg, "Could not determine UEFI Secure Boot > > > status.\n"); > > > + if (status == EFI_NOT_FOUND) > > > + return

Re: [PATCH 5/8] efi: Get the secure boot status [ver #5]

2016-12-08 Thread Lukas Wunner
On Thu, Dec 08, 2016 at 05:31:13PM +, David Howells wrote: > Lukas Wunner wrote: > > > +out_efi_err: > > > + pr_efi_err(sys_table_arg, "Could not determine UEFI Secure Boot > > > status.\n"); > > > + if (status == EFI_NOT_FOUND) > > > + return efi_secureboot_mode_disabled; > > > +

Re: [PATCH 5/8] efi: Get the secure boot status [ver #5]

2016-12-08 Thread David Howells
Lukas Wunner wrote: > > +out_efi_err: > > + pr_efi_err(sys_table_arg, "Could not determine UEFI Secure Boot > > status.\n"); > > + if (status == EFI_NOT_FOUND) > > + return efi_secureboot_mode_disabled; > > + return efi_secureboot_mode_unknown; > > +} > > In

Re: [PATCH 5/8] efi: Get the secure boot status [ver #5]

2016-12-08 Thread David Howells
Lukas Wunner wrote: > > +out_efi_err: > > + pr_efi_err(sys_table_arg, "Could not determine UEFI Secure Boot > > status.\n"); > > + if (status == EFI_NOT_FOUND) > > + return efi_secureboot_mode_disabled; > > + return efi_secureboot_mode_unknown; > > +} > > In the out_efi_err

Re: [PATCH 5/8] efi: Get the secure boot status [ver #5]

2016-12-08 Thread Lukas Wunner
On Thu, Dec 08, 2016 at 08:16:21AM +, David Howells wrote: > +/* > + * Determine whether we're in secure boot mode. > + */ > +enum efi_secureboot_mode efi_get_secureboot(efi_system_table_t > *sys_table_arg) > +{ > + u8 secboot, setupmode; > + unsigned long size; > + efi_status_t

Re: [PATCH 5/8] efi: Get the secure boot status [ver #5]

2016-12-08 Thread Lukas Wunner
On Thu, Dec 08, 2016 at 08:16:21AM +, David Howells wrote: > +/* > + * Determine whether we're in secure boot mode. > + */ > +enum efi_secureboot_mode efi_get_secureboot(efi_system_table_t > *sys_table_arg) > +{ > + u8 secboot, setupmode; > + unsigned long size; > + efi_status_t

Re: [PATCH 5/8] efi: Get the secure boot status [ver #5]

2016-12-08 Thread David Howells
How about the attached? Thanks, David --- commit 6788837a26d517d10d00138aadd338cc73d69237 Author: David Howells Date: Mon Nov 21 23:55:55 2016 + efi: Get the secure boot status Get the firmware's secure-boot status in the kernel boot wrapper and stash

Re: [PATCH 5/8] efi: Get the secure boot status [ver #5]

2016-12-08 Thread David Howells
How about the attached? Thanks, David --- commit 6788837a26d517d10d00138aadd338cc73d69237 Author: David Howells Date: Mon Nov 21 23:55:55 2016 + efi: Get the secure boot status Get the firmware's secure-boot status in the kernel boot wrapper and stash it somewhere that

Re: [PATCH 5/8] efi: Get the secure boot status [ver #5]

2016-12-07 Thread Lukas Wunner
On Wed, Dec 07, 2016 at 01:18:39PM +, David Howells wrote: > @@ -226,7 +180,7 @@ unsigned long efi_entry(void *handle, efi_system_table_t > *sys_table, > efi_guid_t loaded_image_proto = LOADED_IMAGE_PROTOCOL_GUID; > unsigned long reserve_addr = 0; > unsigned long

Re: [PATCH 5/8] efi: Get the secure boot status [ver #5]

2016-12-07 Thread Lukas Wunner
On Wed, Dec 07, 2016 at 01:18:39PM +, David Howells wrote: > @@ -226,7 +180,7 @@ unsigned long efi_entry(void *handle, efi_system_table_t > *sys_table, > efi_guid_t loaded_image_proto = LOADED_IMAGE_PROTOCOL_GUID; > unsigned long reserve_addr = 0; > unsigned long

[PATCH 5/8] efi: Get the secure boot status [ver #5]

2016-12-07 Thread David Howells
Get the firmware's secure-boot status in the kernel boot wrapper and stash it somewhere that the main kernel image can find. The efi_get_secureboot() function is extracted from the arm stub and (a) generalised so that it can be called from x86 and (b) made to use efi_call_runtime() so that it can

[PATCH 5/8] efi: Get the secure boot status [ver #5]

2016-12-07 Thread David Howells
Get the firmware's secure-boot status in the kernel boot wrapper and stash it somewhere that the main kernel image can find. The efi_get_secureboot() function is extracted from the arm stub and (a) generalised so that it can be called from x86 and (b) made to use efi_call_runtime() so that it can