generic: 6.12: manually rebuild hack patches

Manually rebuild hack patches:
 - 200-tools_portability.patch
 - 204-module_strip.patch
 - 210-darwin_scripts_include.patch
 - 251-kconfig.patch
 - 421-drivers-mtd-parsers-add-nvmem-support-to-cmdlinepart.patch
 - 610-net-page_pool-try-to-free-deferred-skbs-while-waitin.patch
 - 721-net-add-packet-mangeling.patch
 - 725-net-phy-aquantia-add-PHY_IDs-for-AQR112-variants.patch
 - 760-net-usb-r8152-add-LED-configuration-from-OF.patch
 - 800-GPIO-add-named-gpio-exports.patch
 - 901-debloat_sock_diag.patch
 - 902-debloat_proc.patch
 - 904-debloat_dma_buf.patch
 - 910-kobject_uevent.patch
 - 911-kobject_add_broadcast_uevent.patch
 - 930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
[ improve commit title ]
Link: https://github.com/openwrt/openwrt/pull/16547
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
Mieczyslaw Nalewaj
2025-04-30 11:52:08 +02:00
committed by Christian Marangi
parent 5a7de563e0
commit a4cfd32917
15 changed files with 162 additions and 256 deletions

View File

@@ -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)
@@ -233,12 +234,12 @@ extern void cleanup_module(void);
@@ -239,12 +240,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 \
@@ -265,7 +266,9 @@ extern typeof(name) __mod_##type##__##na
@@ -271,7 +272,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) \
MODULE_INFO(version, _version); \
@@ -288,7 +291,7 @@ extern typeof(name) __mod_##type##__##na
@@ -294,7 +297,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 */
@@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/kernel/module/Kconfig
+++ b/kernel/module/Kconfig
@@ -389,4 +389,11 @@ config MODULES_TREE_LOOKUP
@@ -401,4 +401,11 @@ config MODULES_TREE_LOOKUP
def_bool y
depends on PERF_EVENTS || TRACING || CFI_CLANG
@@ -102,7 +102,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
endif # MODULES
--- a/kernel/module/main.c
+++ b/kernel/module/main.c
@@ -997,6 +997,7 @@ size_t modinfo_attrs_count = ARRAY_SIZE(
@@ -999,6 +999,7 @@ size_t modinfo_attrs_count = ARRAY_SIZE(
static const char vermagic[] = VERMAGIC_STRING;
@@ -110,7 +110,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
int try_to_force_load(struct module *mod, const char *reason)
{
#ifdef CONFIG_MODULE_FORCE_LOAD
@@ -1008,6 +1009,7 @@ int try_to_force_load(struct module *mod
@@ -1010,6 +1011,7 @@ int try_to_force_load(struct module *mod
return -ENOEXEC;
#endif
}
@@ -118,7 +118,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* Parse tag=value strings from .modinfo section */
char *module_next_tag_pair(char *string, unsigned long *secsize)
@@ -2075,9 +2077,11 @@ static void module_augment_kernel_taints
@@ -2093,9 +2095,11 @@ static void module_augment_kernel_taints
static int check_modinfo(struct module *mod, struct load_info *info, int flags)
{
@@ -131,7 +131,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (flags & MODULE_INIT_IGNORE_VERMAGIC)
modmagic = NULL;
@@ -2091,6 +2095,7 @@ static int check_modinfo(struct module *
@@ -2109,6 +2113,7 @@ static int check_modinfo(struct module *
info->name, modmagic, vermagic);
return -ENOEXEC;
}
@@ -141,7 +141,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (err)
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1666,7 +1666,9 @@ static void read_symbols(const char *mod
@@ -1601,7 +1601,9 @@ static void read_symbols(const char *mod
symname = remove_dot(info.strtab + sym->st_name);
handle_symbol(mod, &info, sym, symname);
@@ -151,40 +151,31 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}
check_sec_ref(mod, &info);
@@ -1839,8 +1841,10 @@ static void add_header(struct buffer *b,
buf_printf(b, "BUILD_SALT;\n");
buf_printf(b, "BUILD_LTO_INFO;\n");
@@ -1758,7 +1760,9 @@ static void add_header(struct buffer *b,
buf_printf(b, "#include <linux/export-internal.h>\n");
buf_printf(b, "#include <linux/compiler.h>\n");
buf_printf(b, "\n");
+#ifndef CONFIG_MODULE_STRIPPED
buf_printf(b, "MODULE_INFO(vermagic, VERMAGIC_STRING);\n");
buf_printf(b, "MODULE_INFO(name, KBUILD_MODNAME);\n");
+#endif
buf_printf(b, "\n");
buf_printf(b, "__visible struct module __this_module\n");
buf_printf(b, "__section(\".gnu.linkonce.this_module\") = {\n");
@@ -1854,8 +1858,10 @@ static void add_header(struct buffer *b,
@@ -1772,11 +1776,13 @@ static void add_header(struct buffer *b,
buf_printf(b, "\t.arch = MODULE_ARCH_INIT,\n");
buf_printf(b, "};\n");
+#ifndef CONFIG_MODULE_STRIPPED
if (!external_module)
buf_printf(b, "\nMODULE_INFO(intree, \"Y\");\n");
+#endif
buf_printf(b,
"\n"
@@ -1863,8 +1869,10 @@ static void add_header(struct buffer *b,
"MODULE_INFO(retpoline, \"Y\");\n"
"#endif\n");
+#ifndef CONFIG_MODULE_STRIPPED
if (strstarts(mod->name, "drivers/staging"))
buf_printf(b, "\nMODULE_INFO(staging, \"Y\");\n");
+#endif
if (strstarts(mod->name, "tools/testing"))
buf_printf(b, "\nMODULE_INFO(test, \"Y\");\n");
@@ -1974,11 +1982,13 @@ static void add_depends(struct buffer *b
@@ -1886,11 +1892,13 @@ static void add_depends(struct buffer *b
static void add_srcversion(struct buffer *b, struct module *mod)
{
@@ -198,7 +189,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}
static void write_buf(struct buffer *b, const char *fname)
@@ -2061,7 +2071,9 @@ static void write_mod_c_file(struct modu
@@ -1973,7 +1981,9 @@ static void write_mod_c_file(struct modu
add_exported_symbols(&buf, mod);
add_versions(&buf, mod);
add_depends(&buf, mod);