From f621b539512e5b6c83dd2de1bc2dba06e40cd7ea Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Sun, 18 Feb 2018 01:43:25 +0100 Subject: kernel: bump 4.9 to 4.9.82 Refresh patches. Remove upstreamed patches: - ar7/002-MIPS-AR7-ensure-the-port-type-s-FCR-value-is-used.patch - backport/040-crypto-fix-typo-in-KPP-dependency-of-CRYPTO_ECDH.patch Remove layerscape/819-Revert-dmaengine-dmatest-move-callback-wait-queue-to.patch, it is superseded by upstream commit 297c7cc4b5651b174a62925b6c961085f04979fd. Remove pending/650-pppoe_header_pad.patch, it is superseded by upstream commit 1bd21b158e07e0b8c5a2ce832305a0ebfe42c480. Update patches that no longer apply: - ar71xx/004-register_gpio_driver_earlier.patch - hack/204-module_strip.patch - pending/493-ubi-set-ROOT_DEV-to-ubiblock-rootfs-if-unset.patch Fixes CVE-2017-8824. Compile-tested: ar71xx. Runtime-tested: ar71xx. Signed-off-by: Stijn Tintel --- .../linux/generic/hack-4.9/204-module_strip.patch | 26 +++++++++++++++------- .../linux/generic/hack-4.9/902-debloat_proc.patch | 2 +- 2 files changed, 19 insertions(+), 9 deletions(-) (limited to 'target/linux/generic/hack-4.9') diff --git a/target/linux/generic/hack-4.9/204-module_strip.patch b/target/linux/generic/hack-4.9/204-module_strip.patch index e36846adb8..3dc0c88db1 100644 --- a/target/linux/generic/hack-4.9/204-module_strip.patch +++ b/target/linux/generic/hack-4.9/204-module_strip.patch @@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau --- a/init/Kconfig +++ b/init/Kconfig -@@ -2115,6 +2115,13 @@ config TRIM_UNUSED_KSYMS +@@ -2122,6 +2122,13 @@ config TRIM_UNUSED_KSYMS If unsure, or if you need to build out-of-tree modules, say N. @@ -114,7 +114,7 @@ Signed-off-by: Felix Fietkau config MODULES_TREE_LOOKUP --- a/kernel/module.c +++ b/kernel/module.c -@@ -2945,9 +2945,11 @@ static struct module *setup_load_info(st +@@ -2954,9 +2954,11 @@ static struct module *setup_load_info(st static int check_modinfo(struct module *mod, struct load_info *info, int flags) { @@ -127,14 +127,14 @@ Signed-off-by: Felix Fietkau if (flags & MODULE_INIT_IGNORE_VERMAGIC) modmagic = NULL; -@@ -2968,6 +2970,7 @@ static int check_modinfo(struct module * +@@ -2977,6 +2979,7 @@ static int check_modinfo(struct module * mod->name); add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK); } +#endif - if (get_modinfo(info, "staging")) { - add_taint_module(mod, TAINT_CRAP, LOCKDEP_STILL_OK); + check_modinfo_retpoline(mod, info); + --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1965,7 +1965,9 @@ static void read_symbols(char *modname) @@ -157,7 +157,7 @@ Signed-off-by: Felix Fietkau buf_printf(b, "\n"); buf_printf(b, "__visible struct module __this_module\n"); buf_printf(b, "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n"); -@@ -2126,16 +2130,20 @@ static void add_header(struct buffer *b, +@@ -2126,24 +2130,30 @@ static void add_header(struct buffer *b, static void add_intree_flag(struct buffer *b, int is_intree) { @@ -167,6 +167,16 @@ Signed-off-by: Felix Fietkau +#endif } + /* Cannot check for assembler */ + static void add_retpoline(struct buffer *b) + { ++#ifndef CONFIG_MODULE_STRIPPED + buf_printf(b, "\n#ifdef RETPOLINE\n"); + buf_printf(b, "MODULE_INFO(retpoline, \"Y\");\n"); + buf_printf(b, "#endif\n"); ++#endif + } + static void add_staging_flag(struct buffer *b, const char *name) { +#ifndef CONFIG_MODULE_STRIPPED @@ -178,7 +188,7 @@ Signed-off-by: Felix Fietkau } /* In kernel, this size is defined in linux/module.h; -@@ -2239,11 +2247,13 @@ static void add_depends(struct buffer *b +@@ -2247,11 +2257,13 @@ static void add_depends(struct buffer *b static void add_srcversion(struct buffer *b, struct module *mod) { @@ -192,7 +202,7 @@ Signed-off-by: Felix Fietkau } static void write_if_changed(struct buffer *b, const char *fname) -@@ -2477,7 +2487,9 @@ int main(int argc, char **argv) +@@ -2486,7 +2498,9 @@ int main(int argc, char **argv) add_staging_flag(&buf, mod->name); err |= add_versions(&buf, mod); add_depends(&buf, mod, modules); diff --git a/target/linux/generic/hack-4.9/902-debloat_proc.patch b/target/linux/generic/hack-4.9/902-debloat_proc.patch index 6216c2d4fb..f2b326fe34 100644 --- a/target/linux/generic/hack-4.9/902-debloat_proc.patch +++ b/target/linux/generic/hack-4.9/902-debloat_proc.patch @@ -132,7 +132,7 @@ Signed-off-by: Felix Fietkau do { \ --- a/ipc/msg.c +++ b/ipc/msg.c -@@ -1058,6 +1058,9 @@ void __init msg_init(void) +@@ -1061,6 +1061,9 @@ void __init msg_init(void) { msg_init_ns(&init_ipc_ns); -- cgit v1.2.3