linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] efi: Pass secure boot mode to kernel [ver #7]
@ 2017-01-31 15:13 David Howells
  2017-01-31 15:13 ` [PATCH 2/7] arm/efi: Allow invocation of arbitrary runtime services " David Howells
                   ` (6 more replies)
  0 siblings, 7 replies; 37+ messages in thread
From: David Howells @ 2017-01-31 15:13 UTC (permalink / raw)
  To: matt, ard.biesheuvel
  Cc: linux-efi, linux-kernel, dhowells, linux-security-module,
	keyrings, linux-arm-kernel


Here's a set of patches that can determine the secure boot state of the
UEFI BIOS and pass that along to the main kernel image.  This involves
generalising ARM's efi_get_secureboot() function and making it mixed-mode
safe.

Changes:

 Ver 7:

  - Rebased on efi/next.
  - Remove the EFI_SECURE_BOOT flag bit and defer it for later.  Don't
  - Preclear boot_params->secure_boot and don't clear it in
    sanitize_boot_params()[*]
  - Don't probe for the secure-boot mode if the boot loader gives us this
    mode (ie. if boot_params->secure_boot is non-zero).
  
    [*] There's a bug in grub2 whereby it copies too much, sets the sentinel
    	byte and triggers the sanitisation.

 Ver 6:

  - Removed unnecessary variable init and trimmed comment.
  - Return efi_secureboot_mode_disabled directly rather than going to a
    place that just returns it.
  - Switched the last two patches.

 Ver 5:

  - Fix i386 compilation error (rsi should've been changed to esi).
  - Fix arm64 compilation error ('sys_table_arg' is a hidden macro parameter).

 Ver 4:

  - Use an enum to tell the kernel whether secure boot mode is enabled,
    disabled, couldn't be determined or wasn't even tried due to not being
    in EFI mode.
  - Support the UEFI-2.6 DeployedMode flag.
  - Don't clear boot_params->secure_boot in x86 sanitize_boot_params().
  - Preclear the boot_params->secure_boot on x86 head_*.S entry if we may
    not go through efi_main().

The patches can be found here also:

	http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=efi-secure-boot

at tag:

	efi-secure-boot-20170131

David
---
David Howells (6):
      x86/efi: Allow invocation of arbitrary runtime services
      arm/efi: Allow invocation of arbitrary runtime services
      efi: Add SHIM and image security database GUID definitions
      efi: Get the secure boot status
      efi: Handle secure boot from UEFI-2.6
      efi: Print the secure boot status in x86 setup_arch()

Josh Boyer (1):
      efi: Disable secure boot if shim is in insecure mode


 Documentation/x86/zero-page.txt           |    2 +
 arch/arm/include/asm/efi.h                |    1 
 arch/arm64/include/asm/efi.h              |    1 
 arch/x86/boot/compressed/eboot.c          |    7 ++
 arch/x86/boot/compressed/head_32.S        |    6 +-
 arch/x86/boot/compressed/head_64.S        |    8 +-
 arch/x86/include/asm/efi.h                |    5 +
 arch/x86/include/uapi/asm/bootparam.h     |    3 +
 arch/x86/kernel/asm-offsets.c             |    1 
 arch/x86/kernel/setup.c                   |   14 ++++
 drivers/firmware/efi/libstub/Makefile     |    2 -
 drivers/firmware/efi/libstub/arm-stub.c   |   63 ++----------------
 drivers/firmware/efi/libstub/secureboot.c |   99 +++++++++++++++++++++++++++++
 include/linux/efi.h                       |   15 ++++
 14 files changed, 161 insertions(+), 66 deletions(-)
 create mode 100644 drivers/firmware/efi/libstub/secureboot.c


^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2017-02-03 17:19 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-31 15:13 [PATCH 0/7] efi: Pass secure boot mode to kernel [ver #7] David Howells
2017-01-31 15:13 ` [PATCH 2/7] arm/efi: Allow invocation of arbitrary runtime services " David Howells
     [not found] ` <148587558696.4026.16034622623568539004.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2017-01-31 15:13   ` [PATCH 1/7] x86/efi: " David Howells
2017-01-31 15:13   ` [PATCH 3/7] efi: Add SHIM and image security database GUID definitions " David Howells
2017-01-31 15:13   ` [PATCH 5/7] efi: Disable secure boot if shim is in insecure mode " David Howells
2017-01-31 15:13 ` [PATCH 4/7] efi: Get the secure boot status " David Howells
2017-01-31 17:37   ` kbuild test robot
2017-01-31 18:04   ` kbuild test robot
     [not found]     ` <201702010101.EljWXBuB%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-01-31 18:24       ` Ard Biesheuvel
     [not found]     ` <CAKv+Gu92yTWcEguxGzMOQAvoUexCLtsVVBa2Xzz3cPPWQD9nSQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-31 18:52       ` David Howells
     [not found]         ` <10308.1485888776-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2017-01-31 20:18           ` Ard Biesheuvel
     [not found]             ` <CAKv+Gu_oUcbQ9CYLTentjoHWreVX7Y2-SN5BBcxZ_g4-pNG1yw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-01 21:48               ` Matt Fleming
     [not found]                 ` <20170201214806.GO31613-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2017-02-03  2:48                   ` Ye Xiaolong
     [not found]   ` <148587562967.4026.18171897997650345605.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2017-02-02 21:34     ` Matt Fleming
2017-01-31 15:14 ` [PATCH 6/7] efi: Handle secure boot from UEFI-2.6 " David Howells
2017-01-31 18:19   ` Ard Biesheuvel
     [not found]   ` <CAKv+Gu8dnKB1sRGb3U+XB1eoA7Eyo4qSFBtPRbvGV912xPViVw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-31 18:59     ` David Howells
     [not found]       ` <10454.1485889162-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2017-02-01 10:15         ` Ard Biesheuvel
2017-02-01 12:33       ` David Howells
2017-02-01 14:44         ` Ard Biesheuvel
2017-02-01 15:00         ` David Howells
     [not found]           ` <23750.1485961217-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2017-02-01 15:02             ` Ard Biesheuvel
     [not found]               ` <CAKv+Gu9ACE23ZMcQN3NpZ_N-CWzg=N6qFVu3_UruH0miPe=izA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-02 21:36                 ` Matt Fleming
     [not found]                   ` <20170202213626.GQ31613-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2017-02-02 21:45                     ` Ard Biesheuvel
2017-02-01 10:02   ` David Howells
2017-01-31 15:14 ` [PATCH 7/7] efi: Print the secure boot status in x86 setup_arch() " David Howells
     [not found]   ` <148587565838.4026.2835771993519594392.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2017-02-03 16:07     ` Ard Biesheuvel
2017-02-03 16:21   ` David Howells
2017-02-03 16:23     ` Ard Biesheuvel
     [not found]     ` <CAKv+Gu-=-piH7FQF92T6Yn4KUHLQ-C4CtexWe8D27Tuc3h8KdA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-03 16:27       ` David Howells
2017-02-03 16:29     ` David Howells
2017-02-03 16:29       ` Ard Biesheuvel
     [not found]         ` <CAKv+Gu-O+nWmu2s8bCrANJs0JNE4QgaM=ZkSa+bu60C=-6T-Lg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-03 17:00           ` Ard Biesheuvel
     [not found]         ` <CAKv+Gu88XuQAb7aSmJ=b+u5LDfkE=dgWMwnKUd0U=qKSQXxdrQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-03 17:19           ` David Howells
2017-01-31 16:45 ` [PATCH 0/7] efi: Pass secure boot mode to kernel " Ard Biesheuvel
2017-01-31 17:04 ` David Howells
     [not found]   ` <8425.1485882280-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2017-01-31 18:20     ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).