diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2018-11-01 18:01:44 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2018-12-15 14:28:48 +0100 |
commit | 9261e7447ea7b8d33b70ff6ea008f2041a88e255 (patch) | |
tree | c9af04326ac9953a33fc8fd3e852c11fc1eb4df3 /target/linux/generic/hack-4.19/204-module_strip.patch | |
parent | 52a82ce3dd901a1536c7d7d9d963e9c2d761c816 (diff) | |
download | upstream-9261e7447ea7b8d33b70ff6ea008f2041a88e255.tar.gz upstream-9261e7447ea7b8d33b70ff6ea008f2041a88e255.tar.bz2 upstream-9261e7447ea7b8d33b70ff6ea008f2041a88e255.zip |
kernel: Make the patches apply on top of 4.19
This makes the patches which were just copied in the previous commit
apply on top of kernel 4.19.
The patches in the backports-4.19 folder were checked if they are really
in kernel 4.19 based on the title and only removed if they were found in
the upstream kernel.
The following additional patches form the pending folder went into
upstream Linux 4.19:
pending-4.19/171-usb-dwc2-Fix-inefficient-copy-of-unaligned-buffers.patch
pending-4.19/190-2-5-e1000e-Fix-wrong-comment-related-to-link-detection.patch
pending-4.19/478-mtd-spi-nor-Add-support-for-XM25QH64A-and-XM25QH128A.patch
pending-4.19/479-mtd-spi-nor-add-eon-en25qh32.patch
pending-4.19/950-tty-serial-exar-generalize-rs485-setup.patch
pending-4.19/340-MIPS-mm-remove-mips_dma_mapping_error.patch
Bigger changes were introduced to the m25p80 spi nor driver, as far as I
saw it in the new code, it now has the functionality provided in this
patch:
pending-4.19/450-mtd-m25p80-allow-fallback-from-spi_flash_read-to-reg.patch
Part of this patch went upstream independent of OpenWrt:
hack-4.19/220-gc_sections.patch
This patch was reworked to match the changes done upstream.
The MIPS DMA API changed a lot, this patch was rewritten to match the
new DMA handling:
pending-4.19/341-MIPS-mm-remove-no-op-dma_map_ops-where-possible.patch
I did bigger manual changes to the following patches and I am not 100% sure if they are all correct:
pending-4.19/0931-w1-gpio-fix-problem-with-platfom-data-in-w1-gpio.patch
pending-4.19/411-mtd-partial_eraseblock_write.patch
pending-4.19/600-netfilter_conntrack_flush.patch
pending-4.19/611-netfilter_match_bypass_default_table.patch
pending-4.19/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
hack-4.19/211-host_tools_portability.patch
hack-4.19/221-module_exports.patch
hack-4.19/321-powerpc_crtsavres_prereq.patch
hack-4.19/902-debloat_proc.patch
This is based on patchset from Marko Ratkaj <marko.ratkaj@sartura.hr>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'target/linux/generic/hack-4.19/204-module_strip.patch')
-rw-r--r-- | target/linux/generic/hack-4.19/204-module_strip.patch | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/target/linux/generic/hack-4.19/204-module_strip.patch b/target/linux/generic/hack-4.19/204-module_strip.patch index db65062fcf..c30bfd5c9b 100644 --- a/target/linux/generic/hack-4.19/204-module_strip.patch +++ b/target/linux/generic/hack-4.19/204-module_strip.patch @@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/include/linux/module.h +++ b/include/linux/module.h -@@ -158,6 +158,7 @@ extern void cleanup_module(void); +@@ -160,6 +160,7 @@ extern void cleanup_module(void); /* Generic info of form tag = "info" */ #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info) @@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> /* For userspace: you can also call me... */ #define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias) -@@ -201,12 +202,12 @@ extern void cleanup_module(void); +@@ -203,12 +204,12 @@ extern void cleanup_module(void); * Author(s), use "Name <email>" or just "Name", for multiple * authors use multiple MODULE_AUTHOR() statements/lines. */ @@ -38,7 +38,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> /* Creates an alias so file2alias.c can find device table. */ #define MODULE_DEVICE_TABLE(type, name) \ extern typeof(name) __mod_##type##__##name##_device_table \ -@@ -233,7 +234,9 @@ extern typeof(name) __mod_##type##__##na +@@ -235,7 +236,9 @@ extern typeof(name) __mod_##type##__##na */ #if defined(MODULE) || !defined(CONFIG_SYSFS) @@ -49,7 +49,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> #else #define MODULE_VERSION(_version) \ static struct module_version_attribute ___modver_attr = { \ -@@ -255,7 +258,7 @@ extern typeof(name) __mod_##type##__##na +@@ -257,7 +260,7 @@ extern typeof(name) __mod_##type##__##na /* Optional firmware file (or files) needed by the module * format is simply firmware file name. Multiple firmware * files require multiple MODULE_FIRMWARE() specifiers */ @@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/init/Kconfig +++ b/init/Kconfig -@@ -1903,6 +1903,13 @@ config TRIM_UNUSED_KSYMS +@@ -1988,6 +1988,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 <nbd@nbd.name> config MODULES_TREE_LOOKUP --- a/kernel/module.c +++ b/kernel/module.c -@@ -3006,9 +3006,11 @@ static struct module *setup_load_info(st +@@ -3002,9 +3002,11 @@ static int setup_load_info(struct load_i static int check_modinfo(struct module *mod, struct load_info *info, int flags) { @@ -127,7 +127,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> if (flags & MODULE_INIT_IGNORE_VERMAGIC) modmagic = NULL; -@@ -3029,6 +3031,7 @@ static int check_modinfo(struct module * +@@ -3025,6 +3027,7 @@ static int check_modinfo(struct module * mod->name); add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK); } @@ -137,7 +137,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c -@@ -1982,7 +1982,9 @@ static void read_symbols(char *modname) +@@ -1969,7 +1969,9 @@ static void read_symbols(const char *mod symname = remove_dot(info.strtab + sym->st_name); handle_modversions(mod, &info, sym, symname); @@ -145,11 +145,11 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> handle_moddevtable(mod, &info, sym, symname); +#endif } - if (!is_vmlinux(modname) || - (is_vmlinux(modname) && vmlinux_section_warnings)) -@@ -2143,8 +2145,10 @@ static void add_header(struct buffer *b, - buf_printf(b, "#include <linux/vermagic.h>\n"); - buf_printf(b, "#include <linux/compiler.h>\n"); + if (!is_vmlinux(modname) || vmlinux_section_warnings) + check_sec_ref(mod, modname, &info); +@@ -2132,8 +2134,10 @@ static void add_header(struct buffer *b, + buf_printf(b, "\n"); + buf_printf(b, "BUILD_SALT;\n"); buf_printf(b, "\n"); +#ifndef CONFIG_MODULE_STRIPPED buf_printf(b, "MODULE_INFO(vermagic, VERMAGIC_STRING);\n"); @@ -158,7 +158,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> buf_printf(b, "\n"); buf_printf(b, "__visible struct module __this_module\n"); buf_printf(b, "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n"); -@@ -2161,8 +2165,10 @@ static void add_header(struct buffer *b, +@@ -2150,8 +2154,10 @@ static void add_header(struct buffer *b, static void add_intree_flag(struct buffer *b, int is_intree) { @@ -169,20 +169,18 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> } /* Cannot check for assembler */ -@@ -2175,10 +2181,12 @@ static void add_retpoline(struct buffer +@@ -2164,8 +2170,10 @@ static void add_retpoline(struct buffer static void add_staging_flag(struct buffer *b, const char *name) { +#ifndef CONFIG_MODULE_STRIPPED - static const char *staging_dir = "drivers/staging"; - - if (strncmp(staging_dir, name, strlen(staging_dir)) == 0) + if (strstarts(name, "drivers/staging")) buf_printf(b, "\nMODULE_INFO(staging, \"Y\");\n"); +#endif } /** -@@ -2277,11 +2285,13 @@ static void add_depends(struct buffer *b +@@ -2264,11 +2272,13 @@ static void add_depends(struct buffer *b static void add_srcversion(struct buffer *b, struct module *mod) { @@ -196,7 +194,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> } static void write_if_changed(struct buffer *b, const char *fname) -@@ -2518,7 +2528,9 @@ int main(int argc, char **argv) +@@ -2505,7 +2515,9 @@ int main(int argc, char **argv) add_staging_flag(&buf, mod->name); err |= add_versions(&buf, mod); add_depends(&buf, mod, modules); |