diff --git a/0001-mm-CONFIG_NR_ZONES_EXTENDED.patch b/0001-mm-CONFIG_NR_ZONES_EXTENDED.patch deleted file mode 100644 index 44ef366..0000000 --- a/0001-mm-CONFIG_NR_ZONES_EXTENDED.patch +++ /dev/null @@ -1,173 +0,0 @@ -From 8b368e8e961944105945fbe36f3f264252bfd19a Mon Sep 17 00:00:00 2001 -From: Dan Williams -Date: Thu, 25 Feb 2016 01:02:30 +0000 -Subject: [PATCH] mm: CONFIG_NR_ZONES_EXTENDED - -ZONE_DEVICE (merged in 4.3) and ZONE_CMA (proposed) are examples of new mm -zones that are bumping up against the current maximum limit of 4 zones, -i.e. 2 bits in page->flags. When adding a zone this equation still needs -to be satisified: - - SECTIONS_WIDTH + ZONES_WIDTH + NODES_SHIFT + LAST_CPUPID_SHIFT - <= BITS_PER_LONG - NR_PAGEFLAGS - -ZONE_DEVICE currently tries to satisfy this equation by requiring that -ZONE_DMA be disabled, but this is untenable given generic kernels want to -support ZONE_DEVICE and ZONE_DMA simultaneously. ZONE_CMA would like to -increase the amount of memory covered per section, but that limits the -minimum granularity at which consecutive memory ranges can be added via -devm_memremap_pages(). - -The trade-off of what is acceptable to sacrifice depends heavily on the -platform. For example, ZONE_CMA is targeted for 32-bit platforms where -page->flags is constrained, but those platforms likely do not care about -the minimum granularity of memory hotplug. A big iron machine with 1024 -numa nodes can likely sacrifice ZONE_DMA where a general purpose -distribution kernel can not. - -CONFIG_NR_ZONES_EXTENDED is a configuration symbol that gets selected when -the number of configured zones exceeds 4. It documents the configuration -symbols and definitions that get modified when ZONES_WIDTH is greater than -2. - -For now, it steals a bit from NODES_SHIFT. Later on it can be used to -document the definitions that get modified when a 32-bit configuration -wants more zone bits. - -Note that GFP_ZONE_TABLE poses an interesting constraint since -include/linux/gfp.h gets included by the 32-bit portion of a 64-bit build. -We need to be careful to only build the table for zones that have a -corresponding gfp_t flag. GFP_ZONES_SHIFT is introduced for this purpose. -This patch does not attempt to solve the problem of adding a new zone -that also has a corresponding GFP_ flag. - -Link: https://bugzilla.kernel.org/show_bug.cgi?id=110931 -Fixes: 033fbae988fc ("mm: ZONE_DEVICE for "device memory"") -Signed-off-by: Dan Williams -Reported-by: Mark -Cc: Mel Gorman -Cc: Rik van Riel -Cc: Joonsoo Kim -Cc: Dave Hansen -Cc: Sudip Mukherjee -Signed-off-by: Andrew Morton ---- - arch/x86/Kconfig | 6 ++++-- - include/linux/gfp.h | 33 ++++++++++++++++++++------------- - include/linux/page-flags-layout.h | 2 ++ - mm/Kconfig | 7 +++++-- - 4 files changed, 31 insertions(+), 17 deletions(-) - -diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig -index 3fef519..b94704a 100644 ---- a/arch/x86/Kconfig -+++ b/arch/x86/Kconfig -@@ -1409,8 +1409,10 @@ config NUMA_EMU - - config NODES_SHIFT - int "Maximum NUMA Nodes (as a power of 2)" if !MAXSMP -- range 1 10 -- default "10" if MAXSMP -+ range 1 10 if !NR_ZONES_EXTENDED -+ range 1 9 if NR_ZONES_EXTENDED -+ default "10" if MAXSMP && !NR_ZONES_EXTENDED -+ default "9" if MAXSMP && NR_ZONES_EXTENDED - default "6" if X86_64 - default "3" - depends on NEED_MULTIPLE_NODES -diff --git a/include/linux/gfp.h b/include/linux/gfp.h -index af1f2b2..d201d8a 100644 ---- a/include/linux/gfp.h -+++ b/include/linux/gfp.h -@@ -329,22 +329,29 @@ static inline bool gfpflags_allow_blocking(const gfp_t gfp_flags) - * 0xe => BAD (MOVABLE+DMA32+HIGHMEM) - * 0xf => BAD (MOVABLE+DMA32+HIGHMEM+DMA) - * -- * ZONES_SHIFT must be <= 2 on 32 bit platforms. -+ * GFP_ZONES_SHIFT must be <= 2 on 32 bit platforms. - */ - --#if 16 * ZONES_SHIFT > BITS_PER_LONG --#error ZONES_SHIFT too large to create GFP_ZONE_TABLE integer -+#if defined(CONFIG_ZONE_DEVICE) && (MAX_NR_ZONES-1) <= 4 -+/* ZONE_DEVICE is not a valid GFP zone specifier */ -+#define GFP_ZONES_SHIFT 2 -+#else -+#define GFP_ZONES_SHIFT ZONES_SHIFT -+#endif -+ -+#if 16 * GFP_ZONES_SHIFT > BITS_PER_LONG -+#error GFP_ZONES_SHIFT too large to create GFP_ZONE_TABLE integer - #endif - - #define GFP_ZONE_TABLE ( \ -- (ZONE_NORMAL << 0 * ZONES_SHIFT) \ -- | (OPT_ZONE_DMA << ___GFP_DMA * ZONES_SHIFT) \ -- | (OPT_ZONE_HIGHMEM << ___GFP_HIGHMEM * ZONES_SHIFT) \ -- | (OPT_ZONE_DMA32 << ___GFP_DMA32 * ZONES_SHIFT) \ -- | (ZONE_NORMAL << ___GFP_MOVABLE * ZONES_SHIFT) \ -- | (OPT_ZONE_DMA << (___GFP_MOVABLE | ___GFP_DMA) * ZONES_SHIFT) \ -- | (ZONE_MOVABLE << (___GFP_MOVABLE | ___GFP_HIGHMEM) * ZONES_SHIFT) \ -- | (OPT_ZONE_DMA32 << (___GFP_MOVABLE | ___GFP_DMA32) * ZONES_SHIFT) \ -+ (ZONE_NORMAL << 0 * GFP_ZONES_SHIFT) \ -+ | (OPT_ZONE_DMA << ___GFP_DMA * GFP_ZONES_SHIFT) \ -+ | (OPT_ZONE_HIGHMEM << ___GFP_HIGHMEM * GFP_ZONES_SHIFT) \ -+ | (OPT_ZONE_DMA32 << ___GFP_DMA32 * GFP_ZONES_SHIFT) \ -+ | (ZONE_NORMAL << ___GFP_MOVABLE * GFP_ZONES_SHIFT) \ -+ | (OPT_ZONE_DMA << (___GFP_MOVABLE | ___GFP_DMA) * GFP_ZONES_SHIFT) \ -+ | (ZONE_MOVABLE << (___GFP_MOVABLE | ___GFP_HIGHMEM) * GFP_ZONES_SHIFT) \ -+ | (OPT_ZONE_DMA32 << (___GFP_MOVABLE | ___GFP_DMA32) * GFP_ZONES_SHIFT) \ - ) - - /* -@@ -369,8 +376,8 @@ static inline enum zone_type gfp_zone(gfp_t flags) - enum zone_type z; - int bit = (__force int) (flags & GFP_ZONEMASK); - -- z = (GFP_ZONE_TABLE >> (bit * ZONES_SHIFT)) & -- ((1 << ZONES_SHIFT) - 1); -+ z = (GFP_ZONE_TABLE >> (bit * GFP_ZONES_SHIFT)) & -+ ((1 << GFP_ZONES_SHIFT) - 1); - VM_BUG_ON((GFP_ZONE_BAD >> bit) & 1); - return z; - } -diff --git a/include/linux/page-flags-layout.h b/include/linux/page-flags-layout.h -index da52366..77b078c 100644 ---- a/include/linux/page-flags-layout.h -+++ b/include/linux/page-flags-layout.h -@@ -17,6 +17,8 @@ - #define ZONES_SHIFT 1 - #elif MAX_NR_ZONES <= 4 - #define ZONES_SHIFT 2 -+#elif MAX_NR_ZONES <= 8 -+#define ZONES_SHIFT 3 - #else - #error ZONES_SHIFT -- too many zones configured adjust calculation - #endif -diff --git a/mm/Kconfig b/mm/Kconfig -index 031a329..7826216 100644 ---- a/mm/Kconfig -+++ b/mm/Kconfig -@@ -652,8 +652,6 @@ config IDLE_PAGE_TRACKING - - config ZONE_DEVICE - bool "Device memory (pmem, etc...) hotplug support" -- default !ZONE_DMA -- depends on !ZONE_DMA - depends on MEMORY_HOTPLUG - depends on MEMORY_HOTREMOVE - depends on X86_64 #arch_add_memory() comprehends device memory -@@ -667,5 +665,10 @@ config ZONE_DEVICE - - If FS_DAX is enabled, then say Y. - -+config NR_ZONES_EXTENDED -+ bool -+ default n if !64BIT -+ default y if ZONE_DEVICE && ZONE_DMA && ZONE_DMA32 -+ - config FRAME_VECTOR - bool --- -2.5.0 - diff --git a/Add-EFI-signature-data-types.patch b/Add-EFI-signature-data-types.patch index 094c5a3..2340235 100644 --- a/Add-EFI-signature-data-types.patch +++ b/Add-EFI-signature-data-types.patch @@ -18,15 +18,12 @@ diff --git a/include/linux/efi.h b/include/linux/efi.h index 8cb38cfcba74..8c274b4ea8e6 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h -@@ -647,6 +647,12 @@ void efi_native_runtime_setup(void); - EFI_GUID(0x4a67b082, 0x0a4c, 0x41cf, \ - 0xb6, 0xc7, 0x44, 0x0b, 0x29, 0xbb, 0x8c, 0x4f) +@@ -647,6 +647,9 @@ void efi_native_runtime_setup(void); + #define LINUX_EFI_ARM_SCREEN_INFO_TABLE_GUID EFI_GUID(0xe03fc20a, 0x85dc, 0x406e, 0xb9, 0x0e, 0x4a, 0xb5, 0x02, 0x37, 0x1d, 0x95) + #define LINUX_EFI_LOADER_ENTRY_GUID EFI_GUID(0x4a67b082, 0x0a4c, 0x41cf, 0xb6, 0xc7, 0x44, 0x0b, 0x29, 0xbb, 0x8c, 0x4f) -+#define EFI_CERT_SHA256_GUID \ -+ EFI_GUID( 0xc1c41626, 0x504c, 0x4092, 0xac, 0xa9, 0x41, 0xf9, 0x36, 0x93, 0x43, 0x28 ) -+ -+#define EFI_CERT_X509_GUID \ -+ EFI_GUID( 0xa5c059a1, 0x94e4, 0x4aa7, 0x87, 0xb5, 0xab, 0x15, 0x5c, 0x2b, 0xf0, 0x72 ) ++#define EFI_CERT_SHA256_GUID EFI_GUID(0xc1c41626, 0x504c, 0x4092, 0xac, 0xa9, 0x41, 0xf9, 0x36, 0x93, 0x43, 0x28) ++#define EFI_CERT_X509_GUID EFI_GUID(0xa5c059a1, 0x94e4, 0x4aa7, 0x87, 0xb5, 0xab, 0x15, 0x5c, 0x2b, 0xf0, 0x72) + typedef struct { efi_guid_t guid; diff --git a/Add-secure_modules-call.patch b/Add-secure_modules-call.patch index 5c272a9..1cbf3af 100644 --- a/Add-secure_modules-call.patch +++ b/Add-secure_modules-call.patch @@ -1,7 +1,7 @@ -From 0f6eec5ca124baf1372fb4edeacd11a002378f5e Mon Sep 17 00:00:00 2001 +From 3213f1513a744fb21b6b9e4d4f2650a204855b3e Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Fri, 9 Aug 2013 17:58:15 -0400 -Subject: [PATCH 01/20] Add secure_modules() call +Subject: [PATCH] Add secure_modules() call Provide a single call to allow kernel code to determine whether the system has been configured to either disable module loading entirely or to load @@ -17,10 +17,10 @@ Signed-off-by: Matthew Garrett 2 files changed, 16 insertions(+) diff --git a/include/linux/module.h b/include/linux/module.h -index 3daf2b3..082298a 100644 +index 0c3207d..05bd6c9 100644 --- a/include/linux/module.h +++ b/include/linux/module.h -@@ -655,6 +655,8 @@ static inline bool is_livepatch_module(struct module *mod) +@@ -641,6 +641,8 @@ static inline bool is_livepatch_module(struct module *mod) } #endif /* CONFIG_LIVEPATCH */ @@ -28,8 +28,8 @@ index 3daf2b3..082298a 100644 + #else /* !CONFIG_MODULES... */ - /* Given an address, look for it in the exception tables. */ -@@ -771,6 +773,10 @@ static inline bool module_requested_async_probing(struct module *module) + static inline struct module *__module_address(unsigned long addr) +@@ -750,6 +752,10 @@ static inline bool module_requested_async_probing(struct module *module) return false; } @@ -41,10 +41,10 @@ index 3daf2b3..082298a 100644 #ifdef CONFIG_SYSFS diff --git a/kernel/module.c b/kernel/module.c -index 5f71aa6..3c38496 100644 +index 529efae..0332fdd 100644 --- a/kernel/module.c +++ b/kernel/module.c -@@ -4199,3 +4199,13 @@ void module_layout(struct module *mod, +@@ -4279,3 +4279,13 @@ void module_layout(struct module *mod, } EXPORT_SYMBOL(module_layout); #endif @@ -59,5 +59,5 @@ index 5f71aa6..3c38496 100644 +} +EXPORT_SYMBOL(secure_modules); -- -2.5.5 +2.9.2 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