diff --git a/Add-EFI-signature-data-types.patch b/Add-EFI-signature-data-types.patch index dd18408..094c5a3 100644 --- a/Add-EFI-signature-data-types.patch +++ b/Add-EFI-signature-data-types.patch @@ -1,7 +1,7 @@ -From 6fb2a60e6bfb5ce2d3a4964e7b47ac5c7ecd6f82 Mon Sep 17 00:00:00 2001 +From 5216de8394ff599e41c8540c0572368c18c51459 Mon Sep 17 00:00:00 2001 From: Dave Howells Date: Tue, 23 Oct 2012 09:30:54 -0400 -Subject: [PATCH] Add EFI signature data types +Subject: [PATCH 4/9] Add EFI signature data types Add the data types that are used for containing hashes, keys and certificates for cryptographic verification. @@ -15,10 +15,10 @@ Signed-off-by: David Howells 1 file changed, 20 insertions(+) diff --git a/include/linux/efi.h b/include/linux/efi.h -index fb0734f..b80227a 100644 +index 8cb38cfcba74..8c274b4ea8e6 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h -@@ -653,6 +653,12 @@ void efi_native_runtime_setup(void); +@@ -647,6 +647,12 @@ void efi_native_runtime_setup(void); EFI_GUID(0x4a67b082, 0x0a4c, 0x41cf, \ 0xb6, 0xc7, 0x44, 0x0b, 0x29, 0xbb, 0x8c, 0x4f) @@ -31,7 +31,7 @@ index fb0734f..b80227a 100644 typedef struct { efi_guid_t guid; u64 table; -@@ -885,6 +891,20 @@ typedef struct { +@@ -879,6 +885,20 @@ typedef struct { efi_memory_desc_t entry[0]; } efi_memory_attributes_table_t; diff --git a/Add-an-EFI-signature-blob-parser-and-key-loader.patch b/Add-an-EFI-signature-blob-parser-and-key-loader.patch index 78f482b..3697a4b 100644 --- a/Add-an-EFI-signature-blob-parser-and-key-loader.patch +++ b/Add-an-EFI-signature-blob-parser-and-key-loader.patch @@ -1,7 +1,7 @@ -From 8cd53548ce7b88b08cc6345c8fca7d28d1f3a7f2 Mon Sep 17 00:00:00 2001 +From e36a2d65e25fdf42b50aa5dc17583d7bfd09c4c4 Mon Sep 17 00:00:00 2001 From: Dave Howells Date: Tue, 23 Oct 2012 09:36:28 -0400 -Subject: [PATCH 16/20] Add an EFI signature blob parser and key loader. +Subject: [PATCH 5/9] Add an EFI signature blob parser and key loader. X.509 certificates are loaded into the specified keyring as asymmetric type keys. @@ -17,7 +17,7 @@ Signed-off-by: David Howells create mode 100644 crypto/asymmetric_keys/efi_parser.c diff --git a/crypto/asymmetric_keys/Kconfig b/crypto/asymmetric_keys/Kconfig -index e28e912..94024e8 100644 +index e28e912000a7..94024e8aedaa 100644 --- a/crypto/asymmetric_keys/Kconfig +++ b/crypto/asymmetric_keys/Kconfig @@ -60,4 +60,12 @@ config SIGNED_PE_FILE_VERIFICATION @@ -34,7 +34,7 @@ index e28e912..94024e8 100644 + endif # ASYMMETRIC_KEY_TYPE diff --git a/crypto/asymmetric_keys/Makefile b/crypto/asymmetric_keys/Makefile -index 6516855..c099fe1 100644 +index 6516855bec18..c099fe15ed6d 100644 --- a/crypto/asymmetric_keys/Makefile +++ b/crypto/asymmetric_keys/Makefile @@ -10,6 +10,7 @@ asymmetric_keys-y := \ @@ -47,7 +47,7 @@ index 6516855..c099fe1 100644 # X.509 Certificate handling diff --git a/crypto/asymmetric_keys/efi_parser.c b/crypto/asymmetric_keys/efi_parser.c new file mode 100644 -index 0000000..636feb1 +index 000000000000..636feb18b733 --- /dev/null +++ b/crypto/asymmetric_keys/efi_parser.c @@ -0,0 +1,108 @@ @@ -160,10 +160,10 @@ index 0000000..636feb1 + return 0; +} diff --git a/include/linux/efi.h b/include/linux/efi.h -index b80227a..18443e3 100644 +index 8c274b4ea8e6..ff1877145aa4 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h -@@ -1050,6 +1050,10 @@ extern int efi_memattr_apply_permissions(struct mm_struct *mm, +@@ -1044,6 +1044,10 @@ extern int efi_memattr_apply_permissions(struct mm_struct *mm, char * __init efi_md_typeattr_format(char *buf, size_t size, const efi_memory_desc_t *md); diff --git a/Add-option-to-automatically-enforce-module-signature.patch b/Add-option-to-automatically-enforce-module-signature.patch index d3fab02..aa19833 100644 --- a/Add-option-to-automatically-enforce-module-signature.patch +++ b/Add-option-to-automatically-enforce-module-signature.patch @@ -1,7 +1,8 @@ -From 8802c7e62531b3867580068ee8b50415b966d22c Mon Sep 17 00:00:00 2001 +From 0000dc9edd5997cc49b8893a9d5407f89dfa1307 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Fri, 9 Aug 2013 18:36:30 -0400 -Subject: [PATCH 10/20] Add option to automatically enforce module signatures when in Secure Boot mode +Subject: [PATCH] Add option to automatically enforce module signatures when in + Secure Boot mode UEFI Secure Boot provides a mechanism for ensuring that the firmware will only load signed bootloaders and kernels. Certain use cases may also @@ -11,16 +12,16 @@ that enforces this automatically when enabled. Signed-off-by: Matthew Garrett --- Documentation/x86/zero-page.txt | 2 ++ - arch/x86/Kconfig | 10 ++++++ + arch/x86/Kconfig | 11 ++++++ arch/x86/boot/compressed/eboot.c | 66 +++++++++++++++++++++++++++++++++++ arch/x86/include/uapi/asm/bootparam.h | 3 +- arch/x86/kernel/setup.c | 6 ++++ include/linux/module.h | 6 ++++ kernel/module.c | 7 ++++ - 7 files changed, 99 insertions(+), 1 deletion(-) + 7 files changed, 100 insertions(+), 1 deletion(-) diff --git a/Documentation/x86/zero-page.txt b/Documentation/x86/zero-page.txt -index 95a4d34..b8527c6 100644 +index 95a4d34af3fd..b8527c6b7646 100644 --- a/Documentation/x86/zero-page.txt +++ b/Documentation/x86/zero-page.txt @@ -31,6 +31,8 @@ Offset Proto Name Meaning @@ -33,15 +34,16 @@ index 95a4d34..b8527c6 100644 290/040 ALL edd_mbr_sig_buffer EDD MBR signatures 2D0/A00 ALL e820_map E820 memory map table diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig -index 2dc18605..a701d09 100644 +index 0a7b885964ba..29b8ba9ae713 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig -@@ -1785,6 +1785,16 @@ config EFI_MIXED +@@ -1776,6 +1776,17 @@ config EFI_MIXED If unsure, say N. +config EFI_SECURE_BOOT_SIG_ENFORCE -+ def_bool n ++ def_bool n ++ depends on EFI + prompt "Force module signing when UEFI Secure Boot is enabled" + ---help--- + UEFI Secure Boot provides a mechanism for ensuring that the @@ -54,7 +56,7 @@ index 2dc18605..a701d09 100644 def_bool y prompt "Enable seccomp to safely compute untrusted bytecode" diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c -index 52fef60..6b8b9a7 100644 +index 52fef606bc54..6b8b9a775b46 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c @@ -12,6 +12,7 @@ @@ -145,7 +147,7 @@ index 52fef60..6b8b9a7 100644 setup_efi_pci(boot_params); diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h -index 3292543..b61f853 100644 +index c18ce67495fa..2b3e5427097b 100644 --- a/arch/x86/include/uapi/asm/bootparam.h +++ b/arch/x86/include/uapi/asm/bootparam.h @@ -134,7 +134,8 @@ struct boot_params { @@ -159,10 +161,10 @@ index 3292543..b61f853 100644 * The sentinel is set to a nonzero value (0xff) in header.S. * diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c -index 2367ae0..1a78bf7 100644 +index c4e7b3991b60..bdb9881c7afd 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c -@@ -1146,6 +1146,12 @@ void __init setup_arch(char **cmdline_p) +@@ -1152,6 +1152,12 @@ void __init setup_arch(char **cmdline_p) io_delay_init(); @@ -176,7 +178,7 @@ index 2367ae0..1a78bf7 100644 * Parse the ACPI tables for possible boot-time SMP configuration. */ diff --git a/include/linux/module.h b/include/linux/module.h -index ab13009..e072b84 100644 +index 082298a09df1..38d0597f7615 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -273,6 +273,12 @@ const struct exception_table_entry *search_exception_tables(unsigned long add); @@ -193,10 +195,10 @@ index ab13009..e072b84 100644 extern int modules_disabled; /* for sysctl */ diff --git a/kernel/module.c b/kernel/module.c -index 392ac8c..676c578 100644 +index 3c384968f553..ea484f3a35b2 100644 --- a/kernel/module.c +++ b/kernel/module.c -@@ -4081,6 +4081,13 @@ void module_layout(struct module *mod, +@@ -4200,6 +4200,13 @@ void module_layout(struct module *mod, EXPORT_SYMBOL(module_layout); #endif diff --git a/Add-sysrq-option-to-disable-secure-boot-mode.patch b/Add-sysrq-option-to-disable-secure-boot-mode.patch index 4600848..3cecd13 100644 --- a/Add-sysrq-option-to-disable-secure-boot-mode.patch +++ b/Add-sysrq-option-to-disable-secure-boot-mode.patch @@ -1,7 +1,7 @@ -From 16d2ba5d5bc46e67e6aa7a3d113fbcc18c217388 Mon Sep 17 00:00:00 2001 +From e27a9a98dcf3ff95568593026da065a72ad21b92 Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Fri, 30 Aug 2013 09:28:51 -0400 -Subject: [PATCH 20/20] Add sysrq option to disable secure boot mode +Subject: [PATCH 9/9] Add sysrq option to disable secure boot mode Bugzilla: N/A Upstream-status: Fedora mustard @@ -16,7 +16,7 @@ Upstream-status: Fedora mustard 7 files changed, 64 insertions(+), 9 deletions(-) diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c -index f93826b8522c..41679b1aca83 100644 +index a666b6c29c77..7732c769937b 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -70,6 +70,11 @@ @@ -31,7 +31,7 @@ index f93826b8522c..41679b1aca83 100644 #include