Skip to content

Commit

Permalink
kernel: 5.18: refresh patches (coolsnowwolf#9714)
Browse files Browse the repository at this point in the history
Signed-off-by: aakkll <[email protected]>
  • Loading branch information
aakkll authored Jul 8, 2022
1 parent b98a711 commit bb92ec6
Show file tree
Hide file tree
Showing 36 changed files with 127 additions and 127 deletions.
22 changes: 11 additions & 11 deletions target/linux/generic/hack-5.18/204-module_strip.patch
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ Signed-off-by: Felix Fietkau <[email protected]>
-#define MODULE_FIRMWARE(_firmware) MODULE_INFO(firmware, _firmware)
+#define MODULE_FIRMWARE(_firmware) MODULE_INFO_STRIP(firmware, _firmware)

#define _MODULE_IMPORT_NS(ns) MODULE_INFO(import_ns, #ns)
#define MODULE_IMPORT_NS(ns) _MODULE_IMPORT_NS(ns)
#define MODULE_IMPORT_NS(ns) MODULE_INFO(import_ns, __stringify(ns))

--- a/include/linux/moduleparam.h
+++ b/include/linux/moduleparam.h
@@ -20,6 +20,16 @@
Expand Down Expand Up @@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau <[email protected]>

--- a/init/Kconfig
+++ b/init/Kconfig
@@ -2369,6 +2369,13 @@ config UNUSED_KSYMS_WHITELIST
@@ -2383,6 +2383,13 @@ config UNUSED_KSYMS_WHITELIST
one per line. The path can be absolute, or relative to the kernel
source tree.

Expand All @@ -104,7 +104,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
config MODULES_TREE_LOOKUP
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -3269,9 +3269,11 @@ static int setup_load_info(struct load_i
@@ -3273,9 +3273,11 @@ static int setup_load_info(struct load_i

static int check_modinfo(struct module *mod, struct load_info *info, int flags)
{
Expand All @@ -117,7 +117,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
if (flags & MODULE_INIT_IGNORE_VERMAGIC)
modmagic = NULL;

@@ -3292,6 +3294,7 @@ static int check_modinfo(struct module *
@@ -3296,6 +3298,7 @@ static int check_modinfo(struct module *
mod->name);
add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK);
}
Expand All @@ -127,7 +127,7 @@ Signed-off-by: Felix Fietkau <[email protected]>

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

handle_symbol(mod, &info, sym, symname);
Expand All @@ -137,7 +137,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
}

for (sym = info.symtab_start; sym < info.symtab_stop; sym++) {
@@ -2234,8 +2236,10 @@ static void add_header(struct buffer *b,
@@ -2235,8 +2237,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");
Expand All @@ -148,7 +148,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
buf_printf(b, "\n");
buf_printf(b, "__visible struct module __this_module\n");
buf_printf(b, "__section(\".gnu.linkonce.this_module\") = {\n");
@@ -2252,8 +2256,10 @@ static void add_header(struct buffer *b,
@@ -2253,8 +2257,10 @@ static void add_header(struct buffer *b,

static void add_intree_flag(struct buffer *b, int is_intree)
{
Expand All @@ -159,7 +159,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
}

/* Cannot check for assembler */
@@ -2266,8 +2272,10 @@ static void add_retpoline(struct buffer
@@ -2267,8 +2273,10 @@ static void add_retpoline(struct buffer

static void add_staging_flag(struct buffer *b, const char *name)
{
Expand All @@ -170,7 +170,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
}

/**
@@ -2347,11 +2355,13 @@ static void add_depends(struct buffer *b
@@ -2348,11 +2356,13 @@ static void add_depends(struct buffer *b

static void add_srcversion(struct buffer *b, struct module *mod)
{
Expand All @@ -184,7 +184,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
}

static void write_buf(struct buffer *b, const char *fname)
@@ -2600,7 +2610,9 @@ int main(int argc, char **argv)
@@ -2601,7 +2611,9 @@ int main(int argc, char **argv)
add_staging_flag(&buf, mod->name);
add_versions(&buf, mod);
add_depends(&buf, mod);
Expand Down
4 changes: 2 additions & 2 deletions target/linux/generic/hack-5.18/221-module_exports.patch
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
*(.modinfo) \
--- a/include/linux/export.h
+++ b/include/linux/export.h
@@ -82,6 +82,12 @@ struct kernel_symbol {
@@ -84,6 +84,12 @@ struct kernel_symbol {

#else

Expand All @@ -80,7 +80,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
/*
* For every exported symbol, do the following:
*
@@ -99,7 +105,7 @@ struct kernel_symbol {
@@ -101,7 +107,7 @@ struct kernel_symbol {
extern const char __kstrtab_##sym[]; \
extern const char __kstrtabns_##sym[]; \
__CRC_SYMBOL(sym, sec); \
Expand Down
12 changes: 6 additions & 6 deletions target/linux/generic/hack-5.18/251-kconfig.patch
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Signed-off-by: John Crispin <[email protected]>

--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -33,7 +33,7 @@ config CRYPTO_FIPS
@@ -34,7 +34,7 @@ config CRYPTO_FIPS
this is.

config CRYPTO_ALGAPI
Expand All @@ -25,7 +25,7 @@ Signed-off-by: John Crispin <[email protected]>
select CRYPTO_ALGAPI2
help
This option provides the API for cryptographic algorithms.
@@ -42,7 +42,7 @@ config CRYPTO_ALGAPI2
@@ -43,7 +43,7 @@ config CRYPTO_ALGAPI2
tristate

config CRYPTO_AEAD
Expand All @@ -34,7 +34,7 @@ Signed-off-by: John Crispin <[email protected]>
select CRYPTO_AEAD2
select CRYPTO_ALGAPI

@@ -53,7 +53,7 @@ config CRYPTO_AEAD2
@@ -54,7 +54,7 @@ config CRYPTO_AEAD2
select CRYPTO_RNG2

config CRYPTO_SKCIPHER
Expand All @@ -43,7 +43,7 @@ Signed-off-by: John Crispin <[email protected]>
select CRYPTO_SKCIPHER2
select CRYPTO_ALGAPI

@@ -63,7 +63,7 @@ config CRYPTO_SKCIPHER2
@@ -64,7 +64,7 @@ config CRYPTO_SKCIPHER2
select CRYPTO_RNG2

config CRYPTO_HASH
Expand All @@ -52,7 +52,7 @@ Signed-off-by: John Crispin <[email protected]>
select CRYPTO_HASH2
select CRYPTO_ALGAPI

@@ -72,7 +72,7 @@ config CRYPTO_HASH2
@@ -73,7 +73,7 @@ config CRYPTO_HASH2
select CRYPTO_ALGAPI2

config CRYPTO_RNG
Expand Down Expand Up @@ -92,7 +92,7 @@ Signed-off-by: John Crispin <[email protected]>
bool
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -446,16 +446,16 @@ config BCH_CONST_T
@@ -449,16 +449,16 @@ config BCH_CONST_T
# Textsearch support is select'ed if needed
#
config TEXTSEARCH
Expand Down
4 changes: 2 additions & 2 deletions target/linux/generic/hack-5.18/253-ksmbd-config.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -2401,7 +2401,7 @@ config PADATA
@@ -2415,7 +2415,7 @@ config PADATA
bool

config ASN1
Expand All @@ -11,7 +11,7 @@
that can be interpreted by the ASN.1 stream decoder and used to
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -617,7 +617,7 @@ config LIBFDT
@@ -620,7 +620,7 @@ config LIBFDT
bool

config OID_REGISTRY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <[email protected]>

--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -120,13 +120,13 @@ config CRYPTO_MANAGER
@@ -121,13 +121,13 @@ config CRYPTO_MANAGER
cbc(aes).

config CRYPTO_MANAGER2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <[email protected]>

--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -618,12 +618,13 @@ extern struct Qdisc_ops noop_qdisc_ops;
@@ -604,12 +604,13 @@ extern struct Qdisc_ops noop_qdisc_ops;
extern struct Qdisc_ops pfifo_fast_ops;
extern struct Qdisc_ops mq_qdisc_ops;
extern struct Qdisc_ops noqueue_qdisc_ops;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#define QUECTEL_VENDOR_ID 0x2c7c
/* These Quectel products use Quectel's vendor ID */
@@ -1129,6 +1131,11 @@ static const struct usb_device_id option
@@ -1133,6 +1135,11 @@ static const struct usb_device_id option
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG95, 0xff, 0, 0) },
{ USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96),
.driver_info = RSVD(4) },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Signed-off-by: John Crispin <[email protected]>

#include "gpiolib.h"
#include "gpiolib-of.h"
@@ -1053,3 +1055,72 @@ void of_gpio_dev_init(struct gpio_chip *
@@ -1058,3 +1060,72 @@ void of_gpio_dev_init(struct gpio_chip *
else
gc->of_node = gdev->dev.of_node;
}
Expand Down
10 changes: 5 additions & 5 deletions target/linux/generic/hack-5.18/904-debloat_dma_buf.patch
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <[email protected]>

--- a/drivers/base/Kconfig
+++ b/drivers/base/Kconfig
@@ -187,7 +187,7 @@ config SOC_BUS
@@ -198,7 +198,7 @@ config SOC_BUS
source "drivers/base/regmap/Kconfig"

config DMA_SHARED_BUFFER
Expand Down Expand Up @@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau <[email protected]>

dmabuf_selftests-y := \
selftest.o \
@@ -15,4 +17,6 @@
@@ -15,4 +17,6 @@ dmabuf_selftests-y := \
st-dma-fence-unwrap.o \
st-dma-resv.o

Expand All @@ -64,7 +64,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
+dma-shared-buffer-objs := $(dma-buf-objs-y)
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -1506,4 +1506,5 @@ static void __exit dma_buf_deinit(void)
@@ -1459,4 +1459,5 @@ static void __exit dma_buf_deinit(void)
kern_unmount(dma_buf_mnt);
dma_buf_uninit_sysfs_statistics();
}
Expand All @@ -73,7 +73,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
+MODULE_LICENSE("GPL");
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4175,6 +4175,7 @@ int wake_up_state(struct task_struct *p,
@@ -4287,6 +4287,7 @@ int wake_up_state(struct task_struct *p,
{
return try_to_wake_up(p, state, 0);
}
Expand All @@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
* Perform scheduler related setup for a newly forked process p.
--- a/fs/d_path.c
+++ b/fs/d_path.c
@@ -316,6 +316,7 @@ char *dynamic_dname(struct dentry *dentr
@@ -314,6 +314,7 @@ char *dynamic_dname(struct dentry *dentr
buffer += buflen - sz;
return memcpy(buffer, temp, sz);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -1162,6 +1162,9 @@ int __init early_init_dt_scan_chosen(cha
@@ -1165,6 +1165,9 @@ int __init early_init_dt_scan_chosen(cha
p = of_get_flat_dt_prop(node, "bootargs", &l);
if (p != NULL && l > 0)
strlcpy(cmdline, p, min(l, COMMAND_LINE_SIZE));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Signed-off-by: Zhi Chen <[email protected]>
#if defined(CONFIG_NF_CONNTRACK_LABELS)
--- a/net/netfilter/Kconfig
+++ b/net/netfilter/Kconfig
@@ -151,6 +151,14 @@ config NF_CONNTRACK_EVENTS
@@ -162,6 +162,14 @@ config NF_CONNTRACK_EVENTS

If unsure, say `N'.

Expand All @@ -110,7 +110,7 @@ Signed-off-by: Zhi Chen <[email protected]>
depends on NETFILTER_ADVANCED
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -2878,6 +2878,10 @@ int nf_conntrack_init_net(struct net *ne
@@ -2815,6 +2815,10 @@ int nf_conntrack_init_net(struct net *ne
nf_conntrack_helper_pernet_init(net);
nf_conntrack_proto_pernet_init(net);

Expand All @@ -133,7 +133,7 @@ Signed-off-by: Zhi Chen <[email protected]>
#include <linux/netdevice.h>
#include <linux/slab.h>
#include <linux/export.h>
@@ -167,6 +170,35 @@ static int __nf_conntrack_eventmask_repo
@@ -168,6 +171,35 @@ static int __nf_conntrack_eventmask_repo
return ret;
}

Expand Down Expand Up @@ -169,7 +169,7 @@ Signed-off-by: Zhi Chen <[email protected]>
int nf_conntrack_eventmask_report(unsigned int events, struct nf_conn *ct,
u32 portid, int report)
{
@@ -203,10 +235,52 @@ int nf_conntrack_eventmask_report(unsign
@@ -204,10 +236,52 @@ int nf_conntrack_eventmask_report(unsign

return ret;
}
Expand Down Expand Up @@ -222,15 +222,15 @@ Signed-off-by: Zhi Chen <[email protected]>
void nf_ct_deliver_cached_events(struct nf_conn *ct)
{
struct nf_conntrack_ecache *e;
@@ -232,6 +306,7 @@ void nf_ct_deliver_cached_events(struct
@@ -233,6 +307,7 @@ void nf_ct_deliver_cached_events(struct
*/
__nf_conntrack_eventmask_report(e, events, e->missed, &item);
}
+#endif
EXPORT_SYMBOL_GPL(nf_ct_deliver_cached_events);

void nf_ct_expect_event_report(enum ip_conntrack_expect_events event,
@@ -264,20 +339,43 @@ out_unlock:
@@ -265,20 +340,43 @@ out_unlock:
rcu_read_unlock();
}

Expand Down Expand Up @@ -276,7 +276,7 @@ Signed-off-by: Zhi Chen <[email protected]>
void nf_conntrack_unregister_notifier(struct net *net)
{
mutex_lock(&nf_ct_ecache_mutex);
@@ -285,6 +383,7 @@ void nf_conntrack_unregister_notifier(st
@@ -286,6 +384,7 @@ void nf_conntrack_unregister_notifier(st
mutex_unlock(&nf_ct_ecache_mutex);
/* synchronize_rcu() is called after netns pre_exit */
}
Expand All @@ -286,7 +286,7 @@ Signed-off-by: Zhi Chen <[email protected]>
void nf_conntrack_ecache_work(struct net *net, enum nf_ct_ecache_state state)
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -706,12 +706,19 @@ static size_t ctnetlink_nlmsg_size(const
@@ -712,12 +712,19 @@ static size_t ctnetlink_nlmsg_size(const
}

static int
Expand All @@ -306,7 +306,7 @@ Signed-off-by: Zhi Chen <[email protected]>
struct nf_conn *ct = item->ct;
struct sk_buff *skb;
unsigned int type;
@@ -3761,11 +3768,17 @@ static int ctnetlink_stat_exp_cpu(struct
@@ -3772,11 +3779,17 @@ static int ctnetlink_stat_exp_cpu(struct
}

#ifdef CONFIG_NF_CONNTRACK_EVENTS
Expand All @@ -324,7 +324,7 @@ Signed-off-by: Zhi Chen <[email protected]>

static const struct nfnl_callback ctnl_cb[IPCTNL_MSG_MAX] = {
[IPCTNL_MSG_CT_NEW] = {
@@ -3864,8 +3877,12 @@ static int __net_init ctnetlink_net_init
@@ -3875,8 +3888,12 @@ static int __net_init ctnetlink_net_init
static void ctnetlink_net_pre_exit(struct net *net)
{
#ifdef CONFIG_NF_CONNTRACK_EVENTS
Expand Down
Loading

0 comments on commit bb92ec6

Please sign in to comment.