Skip to content

Commit

Permalink
generic: 5.15: refresh hack patch
Browse files Browse the repository at this point in the history
Use 'make target/linux/refresh' to refresh hack patches.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
  • Loading branch information
Ansuel authored and dangowrt committed Mar 27, 2022
1 parent 39a7c8d commit 49cb5e5
Show file tree
Hide file tree
Showing 39 changed files with 171 additions and 172 deletions.
38 changes: 19 additions & 19 deletions target/linux/generic/hack-5.15/204-module_strip.patch
Expand Up @@ -14,15 +14,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>

--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -161,6 +161,7 @@ extern void cleanup_module(void);
@@ -164,6 +164,7 @@ extern void cleanup_module(void);

/* Generic info of form tag = "info" */
#define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
+#define MODULE_INFO_STRIP(tag, info) __MODULE_INFO_STRIP(tag, tag, info)

/* For userspace: you can also call me... */
#define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
@@ -230,12 +231,12 @@ extern void cleanup_module(void);
@@ -233,12 +234,12 @@ extern void cleanup_module(void);
* Author(s), use "Name <email>" or just "Name", for multiple
* authors use multiple MODULE_AUTHOR() statements/lines.
*/
Expand All @@ -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 \
@@ -262,7 +263,9 @@ extern typeof(name) __mod_##type##__##na
@@ -265,7 +266,9 @@ extern typeof(name) __mod_##type##__##na
*/

#if defined(MODULE) || !defined(CONFIG_SYSFS)
Expand All @@ -49,7 +49,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#else
#define MODULE_VERSION(_version) \
MODULE_INFO(version, _version); \
@@ -285,7 +288,7 @@ extern typeof(name) __mod_##type##__##na
@@ -288,7 +291,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 */
Expand All @@ -75,9 +75,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+#endif
+
#define __MODULE_INFO(tag, name, info) \
static const char __UNIQUE_ID(name)[] \
__used __section(".modinfo") __attribute__((unused, aligned(1))) \
@@ -31,7 +41,7 @@ static const char __UNIQUE_ID(name)[]
static const char __UNIQUE_ID(name)[] \
__used __section(".modinfo") __aligned(1) \
@@ -31,7 +41,7 @@
/* One for each parameter, describing how to use it. Some files do
multiple of these per line, so can't just use MODULE_INFO. */
#define MODULE_PARM_DESC(_parm, desc) \
Expand All @@ -104,23 +104,23 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
config MODULES_TREE_LOOKUP
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1285,6 +1285,7 @@ static struct module_attribute *modinfo_
@@ -1218,6 +1218,7 @@ static struct module_attribute *modinfo_

static const char vermagic[] = VERMAGIC_STRING;

+#if defined(CONFIG_MODVERSIONS) || !defined(CONFIG_MODULE_STRIPPED)
static int try_to_force_load(struct module *mod, const char *reason)
{
#ifdef CONFIG_MODULE_FORCE_LOAD
@@ -1296,6 +1297,7 @@ static int try_to_force_load(struct modu
@@ -1229,6 +1230,7 @@ static int try_to_force_load(struct modu
return -ENOEXEC;
#endif
}
+#endif

#ifdef CONFIG_MODVERSIONS

@@ -3247,9 +3249,11 @@ static int setup_load_info(struct load_i
@@ -3227,9 +3229,11 @@ static int setup_load_info(struct load_i

static int check_modinfo(struct module *mod, struct load_info *info, int flags)
{
Expand All @@ -133,7 +133,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (flags & MODULE_INIT_IGNORE_VERMAGIC)
modmagic = NULL;

@@ -3270,6 +3274,7 @@ static int check_modinfo(struct module *
@@ -3250,6 +3254,7 @@ static int check_modinfo(struct module *
mod->name);
add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK);
}
Expand All @@ -143,7 +143,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>

--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -2037,7 +2037,9 @@ static void read_symbols(const char *mod
@@ -2033,7 +2033,9 @@ static void read_symbols(const char *mod
symname = remove_dot(info.strtab + sym->st_name);

handle_symbol(mod, &info, sym, symname);
Expand All @@ -153,9 +153,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}

for (sym = info.symtab_start; sym < info.symtab_stop; sym++) {
@@ -2250,8 +2252,10 @@ static void add_header(struct buffer *b,
buf_printf(b, "\n");
@@ -2212,8 +2214,10 @@ static void add_header(struct buffer *b,
buf_printf(b, "BUILD_SALT;\n");
buf_printf(b, "BUILD_LTO_INFO;\n");
buf_printf(b, "\n");
+#ifndef CONFIG_MODULE_STRIPPED
buf_printf(b, "MODULE_INFO(vermagic, VERMAGIC_STRING);\n");
Expand All @@ -164,7 +164,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, "__section(\".gnu.linkonce.this_module\") = {\n");
@@ -2268,8 +2272,10 @@ static void add_header(struct buffer *b,
@@ -2230,8 +2234,10 @@ static void add_header(struct buffer *b,

static void add_intree_flag(struct buffer *b, int is_intree)
{
Expand All @@ -175,7 +175,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}

/* Cannot check for assembler */
@@ -2282,8 +2288,10 @@ static void add_retpoline(struct buffer
@@ -2244,8 +2250,10 @@ static void add_retpoline(struct buffer

static void add_staging_flag(struct buffer *b, const char *name)
{
Expand All @@ -186,7 +186,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}

/**
@@ -2367,11 +2375,13 @@ static void add_depends(struct buffer *b
@@ -2325,11 +2333,13 @@ static void add_depends(struct buffer *b

static void add_srcversion(struct buffer *b, struct module *mod)
{
Expand All @@ -200,9 +200,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}

static void write_buf(struct buffer *b, const char *fname)
@@ -2630,7 +2640,9 @@ int main(int argc, char **argv)
@@ -2578,7 +2588,9 @@ int main(int argc, char **argv)
add_staging_flag(&buf, mod->name);
err |= add_versions(&buf, mod);
add_versions(&buf, mod);
add_depends(&buf, mod);
+#ifndef CONFIG_MODULE_STRIPPED
add_moddevtable(&buf, mod);
Expand Down
2 changes: 1 addition & 1 deletion target/linux/generic/hack-5.15/205-kconfig-exit.patch
@@ -1,6 +1,6 @@
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -215,6 +215,8 @@ static int conf_sym(struct menu *menu)
@@ -435,6 +435,8 @@ static int conf_sym(struct menu *menu)
break;
continue;
case 0:
Expand Down
2 changes: 1 addition & 1 deletion target/linux/generic/hack-5.15/212-tools_portability.patch
Expand Up @@ -68,7 +68,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+#endif
--- a/tools/include/linux/types.h
+++ b/tools/include/linux/types.h
@@ -7,8 +7,12 @@
@@ -10,8 +10,12 @@
#define __SANE_USERSPACE_TYPES__ /* For PPC64, to get LL64 types */
#endif

Expand Down
Expand Up @@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>

--- a/include/uapi/linux/spi/spidev.h
+++ b/include/uapi/linux/spi/spidev.h
@@ -121,7 +121,7 @@ struct spi_ioc_transfer {
@@ -93,7 +93,7 @@ struct spi_ioc_transfer {

/* not all platforms use <asm-generic/ioctl.h> or _IOC_TYPECHECK() ... */
#define SPI_MSGSIZE(N) \
Expand Down
12 changes: 6 additions & 6 deletions target/linux/generic/hack-5.15/220-arm-gc_sections.patch
Expand Up @@ -12,7 +12,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
---
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -113,6 +113,7 @@ config ARM
@@ -117,6 +117,7 @@ config ARM
select HAVE_UID16
select HAVE_VIRT_CPU_ACCOUNTING_GEN
select IRQ_FORCED_THREADING
Expand All @@ -22,14 +22,14 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
select OF_EARLY_FLATTREE if OF
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -98,6 +98,7 @@ $(foreach o, $(libfdt_objs) atags_to_fdt
ifdef building_out_of_srctree
$(shell rm -f $(addprefix $(obj)/, fdt_rw.c fdt_ro.c fdt_wip.c fdt.c))
@@ -92,6 +92,7 @@ endif
ifeq ($(CONFIG_USE_OF),y)
OBJS += $(libfdt_objs) fdt_check_mem_start.o
endif
+KBUILD_CFLAGS_KERNEL := $(patsubst -f%-sections,,$(KBUILD_CFLAGS_KERNEL))

targets := vmlinux vmlinux.lds piggy_data piggy.o \
lib1funcs.o ashldi3.o bswapsdi2.o \
# -fstack-protector-strong triggers protection checks in this code,
# but it is being used too early to link to meaningful stack_chk logic.
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -75,7 +75,7 @@ SECTIONS
Expand Down
8 changes: 4 additions & 4 deletions target/linux/generic/hack-5.15/221-module_exports.patch
Expand Up @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* Align . to a 8 byte boundary equals to maximum function alignment. */
#define ALIGN_FUNCTION() . = ALIGN(8)

@@ -473,14 +483,14 @@
@@ -484,14 +494,14 @@
/* Kernel symbol table: Normal symbols */ \
__ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \
__start___ksymtab = .; \
Expand All @@ -47,7 +47,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
__stop___ksymtab_gpl = .; \
} \
\
@@ -542,7 +552,7 @@
@@ -511,7 +521,7 @@
\
/* Kernel symbol table: strings */ \
__ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) { \
Expand All @@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
} \
\
/* __*init sections */ \
@@ -1019,6 +1029,8 @@
@@ -1018,6 +1028,8 @@

#define COMMON_DISCARDS \
SANITIZER_DISCARDS \
Expand Down Expand Up @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
"__kstrtabns_" #sym ": \n" \
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -367,7 +367,7 @@ targets += $(lib-y) $(always-y) $(MAKECM
@@ -385,7 +385,7 @@ targets += $(real-dtb-y) $(lib-y) $(alwa
# Linker scripts preprocessor (.lds.S -> .lds)
# ---------------------------------------------------------------------------
quiet_cmd_cpp_lds_S = LDS $@
Expand Down
Expand Up @@ -23,7 +23,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
{ {0x02, 0x21}, "lz4", unlz4 },
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -370,7 +370,7 @@ quiet_cmd_bzip2 = BZIP2 $@
@@ -413,7 +413,7 @@ quiet_cmd_bzip2 = BZIP2 $@
# ---------------------------------------------------------------------------

quiet_cmd_lzma = LZMA $@
Expand Down
4 changes: 2 additions & 2 deletions target/linux/generic/hack-5.15/250-netfilter_depends.patch
Expand Up @@ -9,15 +9,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>

--- a/net/netfilter/Kconfig
+++ b/net/netfilter/Kconfig
@@ -228,7 +228,6 @@ config NF_CONNTRACK_FTP
@@ -243,7 +243,6 @@ config NF_CONNTRACK_FTP

config NF_CONNTRACK_H323
tristate "H.323 protocol support"
- depends on IPV6 || IPV6=n
depends on NETFILTER_ADVANCED
help
H.323 is a VoIP signalling protocol from ITU-T. As one of the most
@@ -1072,7 +1071,6 @@ config NETFILTER_XT_TARGET_SECMARK
@@ -1106,7 +1105,6 @@ config NETFILTER_XT_TARGET_SECMARK

config NETFILTER_XT_TARGET_TCPMSS
tristate '"TCPMSS" target support'
Expand Down
2 changes: 1 addition & 1 deletion target/linux/generic/hack-5.15/251-kconfig.patch
Expand Up @@ -92,7 +92,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
bool
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -418,16 +418,16 @@ config BCH_CONST_T
@@ -438,16 +438,16 @@ config BCH_CONST_T
# Textsearch support is select'ed if needed
#
config TEXTSEARCH
Expand Down
2 changes: 1 addition & 1 deletion target/linux/generic/hack-5.15/253-ksmbd-config.patch
Expand Up @@ -11,7 +11,7 @@
that can be interpreted by the ASN.1 stream decoder and used to
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -589,7 +589,7 @@ config LIBFDT
@@ -609,7 +609,7 @@ config LIBFDT
bool

config OID_REGISTRY
Expand Down
5 changes: 2 additions & 3 deletions target/linux/generic/hack-5.15/259-regmap_dynamic.patch
Expand Up @@ -94,7 +94,6 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+ select REGMAP
tristate
depends on SPI

--- a/drivers/base/regmap/Makefile
+++ b/drivers/base/regmap/Makefile
@@ -2,10 +2,14 @@
Expand Down Expand Up @@ -126,15 +125,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#include <linux/mutex.h>
#include <linux/err.h>
#include <linux/property.h>
@@ -3298,3 +3299,5 @@ static int __init regmap_initcall(void)
@@ -3341,3 +3342,5 @@ static int __init regmap_initcall(void)
return 0;
}
postcore_initcall(regmap_initcall);
+
+MODULE_LICENSE("GPL");
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -179,7 +179,7 @@ struct reg_sequence {
@@ -180,7 +180,7 @@ struct reg_sequence {
__ret ?: __tmp; \
})

Expand Down
Expand Up @@ -37,7 +37,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
tristate "Userspace cryptographic algorithm configuration"
--- a/crypto/algboss.c
+++ b/crypto/algboss.c
@@ -230,8 +230,12 @@ static int cryptomgr_schedule_test(struc
@@ -211,8 +211,12 @@ static int cryptomgr_schedule_test(struc
type = alg->cra_flags;

/* Do not test internal algorithms. */
Expand Down
4 changes: 2 additions & 2 deletions target/linux/generic/hack-5.15/280-rfkill-stubs.patch
Expand Up @@ -26,15 +26,15 @@ Signed-off-by: John Crispin <john@phrozen.org>
* @name: name of the struct -- the string is not copied internally
--- a/net/Makefile
+++ b/net/Makefile
@@ -53,7 +53,7 @@ obj-$(CONFIG_TIPC) += tipc/
@@ -52,7 +52,7 @@ obj-$(CONFIG_TIPC) += tipc/
obj-$(CONFIG_NETLABEL) += netlabel/
obj-$(CONFIG_IUCV) += iucv/
obj-$(CONFIG_SMC) += smc/
-obj-$(CONFIG_RFKILL) += rfkill/
+obj-$(CONFIG_RFKILL_FULL) += rfkill/
obj-$(CONFIG_NET_9P) += 9p/
obj-$(CONFIG_CAIF) += caif/
ifneq ($(CONFIG_DCB),)
obj-$(CONFIG_DCB) += dcb/
--- a/net/rfkill/Kconfig
+++ b/net/rfkill/Kconfig
@@ -2,7 +2,11 @@
Expand Down
Expand Up @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/arch/mips/include/asm/r4kcache.h
+++ b/arch/mips/include/asm/r4kcache.h
@@ -296,14 +296,46 @@ static inline void prot##extra##blast_##
@@ -286,14 +286,46 @@ static inline void prot##extra##blast_##
unsigned long end) \
{ \
unsigned long lsize = cpu_##desc##_line_size(); \
Expand Down
Expand Up @@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1170,6 +1170,10 @@ config MIPS_MSC
@@ -1180,6 +1180,10 @@ config MIPS_MSC
config SYNC_R4K
bool

Expand Down
Expand Up @@ -77,7 +77,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>

#include "mtdcore.h"

@@ -1000,6 +1001,8 @@ int mtd_device_parse_register(struct mtd
@@ -1002,6 +1003,8 @@ int mtd_device_parse_register(struct mtd

ret = mtd_otp_nvmem_add(mtd);

Expand Down

0 comments on commit 49cb5e5

Please sign in to comment.