From b81045a81848ad2f51577d61c2379f27d50d71d9 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Wed, 31 May 2023 21:02:52 +0200 Subject: [PATCH 1/2] kernel: bump 6.1 to 6.1.31 All patches automatically rebased. Build system: x86_64/Fedora 38 Build-tested: ipq807x/Qnap 301W, ipq807x/Dynalink DL-WRX36 Run-tested: ipq807x/Qnap 301W, ipq807x/Dynalink DL-WRX36 Signed-off-by: Robert Marko --- include/kernel-6.1 | 4 ++-- ...ort-for-bcm6345-style-external-inter.patch | 2 +- ...202-mips-bmips-tweak-Kconfig-options.patch | 9 +++++---- .../721-net-add-packet-mangeling.patch | 2 +- .../pending-6.1/630-packet_socket_type.patch | 10 +++++----- ...T-skip-GRO-for-foreign-MAC-addresses.patch | 8 ++++---- ...ional-threading-for-backlog-processi.patch | 20 +++++++++---------- ...equest-assisted-learning-on-CPU-port.patch | 2 +- 8 files changed, 29 insertions(+), 28 deletions(-) diff --git a/include/kernel-6.1 b/include/kernel-6.1 index 34e916622a..4745a06952 100644 --- a/include/kernel-6.1 +++ b/include/kernel-6.1 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.1 = .29 -LINUX_KERNEL_HASH-6.1.29 = 1e736cc9bd6036379a1d915e518abd4c2c94ad0fd1ea0da961c3489308b8fcfb \ No newline at end of file +LINUX_VERSION-6.1 = .31 +LINUX_KERNEL_HASH-6.1.31 = e86917bba1990e967943645484182a64ba325f98b114a1906cc1d50992e073c1 \ No newline at end of file diff --git a/target/linux/bmips/patches-6.1/100-irqchip-add-support-for-bcm6345-style-external-inter.patch b/target/linux/bmips/patches-6.1/100-irqchip-add-support-for-bcm6345-style-external-inter.patch index 15d44b34d1..42aec229f9 100644 --- a/target/linux/bmips/patches-6.1/100-irqchip-add-support-for-bcm6345-style-external-inter.patch +++ b/target/linux/bmips/patches-6.1/100-irqchip-add-support-for-bcm6345-style-external-inter.patch @@ -50,7 +50,7 @@ Signed-off-by: Jonas Gorski +}; --- a/drivers/irqchip/Kconfig +++ b/drivers/irqchip/Kconfig -@@ -108,6 +108,10 @@ config I8259 +@@ -109,6 +109,10 @@ config I8259 bool select IRQ_DOMAIN diff --git a/target/linux/bmips/patches-6.1/202-mips-bmips-tweak-Kconfig-options.patch b/target/linux/bmips/patches-6.1/202-mips-bmips-tweak-Kconfig-options.patch index 3e0c67d9a4..e85056aee7 100644 --- a/target/linux/bmips/patches-6.1/202-mips-bmips-tweak-Kconfig-options.patch +++ b/target/linux/bmips/patches-6.1/202-mips-bmips-tweak-Kconfig-options.patch @@ -41,9 +41,9 @@ Signed-off-by: Álvaro Fernández Rojas help Build a generic DT-based kernel image that boots on select BCM33xx cable modem chips, BCM63xx DSL chips, and BCM7xxx set-top ---- a/drivers/irqchip/Kconfig 2023-05-30 19:59:04.671531242 +0200 -+++ b/drivers/irqchip/Kconfig 2023-05-30 19:59:55.203880697 +0200 -@@ -121,7 +121,6 @@ config BCM6345_L1_IRQ +--- a/drivers/irqchip/Kconfig ++++ b/drivers/irqchip/Kconfig +@@ -122,7 +122,6 @@ config BCM6345_L1_IRQ config BCM7038_L1_IRQ tristate "Broadcom STB 7038-style L1/L2 interrupt controller driver" depends on ARCH_BRCMSTB || BMIPS_GENERIC @@ -51,7 +51,7 @@ Signed-off-by: Álvaro Fernández Rojas select GENERIC_IRQ_CHIP select IRQ_DOMAIN select GENERIC_IRQ_EFFECTIVE_AFF_MASK if SMP -@@ -129,14 +128,12 @@ config BCM7038_L1_IRQ +@@ -130,14 +129,12 @@ config BCM7038_L1_IRQ config BCM7120_L2_IRQ tristate "Broadcom STB 7120-style L2 interrupt controller driver" depends on ARCH_BRCMSTB || BMIPS_GENERIC @@ -65,3 +65,4 @@ Signed-off-by: Álvaro Fernández Rojas - default ARCH_BCM2835 || ARCH_BRCMSTB || BMIPS_GENERIC select GENERIC_IRQ_CHIP select IRQ_DOMAIN + diff --git a/target/linux/generic/hack-6.1/721-net-add-packet-mangeling.patch b/target/linux/generic/hack-6.1/721-net-add-packet-mangeling.patch index 14a9818c3a..42ee8c2832 100644 --- a/target/linux/generic/hack-6.1/721-net-add-packet-mangeling.patch +++ b/target/linux/generic/hack-6.1/721-net-add-packet-mangeling.patch @@ -105,7 +105,7 @@ Signed-off-by: Felix Fietkau help --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -3588,6 +3588,11 @@ static int xmit_one(struct sk_buff *skb, +@@ -3590,6 +3590,11 @@ static int xmit_one(struct sk_buff *skb, if (dev_nit_active(dev)) dev_queue_xmit_nit(skb, dev); diff --git a/target/linux/generic/pending-6.1/630-packet_socket_type.patch b/target/linux/generic/pending-6.1/630-packet_socket_type.patch index 0d586a5584..6579dcb468 100644 --- a/target/linux/generic/pending-6.1/630-packet_socket_type.patch +++ b/target/linux/generic/pending-6.1/630-packet_socket_type.patch @@ -55,7 +55,7 @@ Signed-off-by: Felix Fietkau goto out; if (!net_eq(dev_net(dev), sock_net(sk))) -@@ -2129,12 +2131,12 @@ static int packet_rcv(struct sk_buff *sk +@@ -2127,12 +2129,12 @@ static int packet_rcv(struct sk_buff *sk unsigned int snaplen, res; bool is_drop_n_account = false; @@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -2261,12 +2263,12 @@ static int tpacket_rcv(struct sk_buff *s +@@ -2259,12 +2261,12 @@ static int tpacket_rcv(struct sk_buff *s BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32); BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48); @@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -3374,6 +3376,7 @@ static int packet_create(struct net *net +@@ -3372,6 +3374,7 @@ static int packet_create(struct net *net mutex_init(&po->pg_vec_lock); po->rollover = NULL; po->prot_hook.func = packet_rcv; @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau if (sock->type == SOCK_PACKET) po->prot_hook.func = packet_rcv_spkt; -@@ -4009,6 +4012,16 @@ packet_setsockopt(struct socket *sock, i +@@ -4007,6 +4010,16 @@ packet_setsockopt(struct socket *sock, i WRITE_ONCE(po->xmit, val ? packet_direct_xmit : dev_queue_xmit); return 0; } @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau default: return -ENOPROTOOPT; } -@@ -4065,6 +4078,13 @@ static int packet_getsockopt(struct sock +@@ -4063,6 +4076,13 @@ static int packet_getsockopt(struct sock case PACKET_VNET_HDR: val = po->has_vnet_hdr; break; diff --git a/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index 0494762a1a..9e508fd2e7 100644 --- a/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -7604,6 +7604,48 @@ static void __netdev_adjacent_dev_unlink +@@ -7606,6 +7606,48 @@ static void __netdev_adjacent_dev_unlink &upper_dev->adj_list.lower); } @@ -93,7 +93,7 @@ Signed-off-by: Felix Fietkau static int __netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev, bool master, void *upper_priv, void *upper_info, -@@ -7655,6 +7697,7 @@ static int __netdev_upper_dev_link(struc +@@ -7657,6 +7699,7 @@ static int __netdev_upper_dev_link(struc if (ret) return ret; @@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, &changeupper_info.info); ret = notifier_to_errno(ret); -@@ -7751,6 +7794,7 @@ static void __netdev_upper_dev_unlink(st +@@ -7753,6 +7796,7 @@ static void __netdev_upper_dev_unlink(st __netdev_adjacent_dev_unlink_neighbour(dev, upper_dev); @@ -109,7 +109,7 @@ Signed-off-by: Felix Fietkau call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, &changeupper_info.info); -@@ -8803,6 +8847,7 @@ int dev_set_mac_address(struct net_devic +@@ -8805,6 +8849,7 @@ int dev_set_mac_address(struct net_devic if (err) return err; dev->addr_assign_type = NET_ADDR_SET; diff --git a/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch b/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch index 50943469ef..ae06c9d4b9 100644 --- a/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch +++ b/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch @@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau /** * napi_disable - prevent NAPI from scheduling -@@ -3126,6 +3127,7 @@ struct softnet_data { +@@ -3127,6 +3128,7 @@ struct softnet_data { unsigned int processed; unsigned int time_squeeze; unsigned int received_rps; @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau #endif --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -4604,7 +4604,7 @@ static int napi_schedule_rps(struct soft +@@ -4606,7 +4606,7 @@ static int napi_schedule_rps(struct soft struct softnet_data *mysd = this_cpu_ptr(&softnet_data); #ifdef CONFIG_RPS @@ -39,7 +39,7 @@ Signed-off-by: Felix Fietkau sd->rps_ipi_next = mysd->rps_ipi_list; mysd->rps_ipi_list = sd; -@@ -5785,6 +5785,8 @@ static DEFINE_PER_CPU(struct work_struct +@@ -5787,6 +5787,8 @@ static DEFINE_PER_CPU(struct work_struct /* Network device is going away, flush any packets still pending */ static void flush_backlog(struct work_struct *work) { @@ -48,7 +48,7 @@ Signed-off-by: Felix Fietkau struct sk_buff *skb, *tmp; struct softnet_data *sd; -@@ -5799,8 +5801,17 @@ static void flush_backlog(struct work_st +@@ -5801,8 +5803,17 @@ static void flush_backlog(struct work_st input_queue_head_incr(sd); } } @@ -66,7 +66,7 @@ Signed-off-by: Felix Fietkau skb_queue_walk_safe(&sd->process_queue, skb, tmp) { if (skb->dev->reg_state == NETREG_UNREGISTERING) { __skb_unlink(skb, &sd->process_queue); -@@ -5808,7 +5819,16 @@ static void flush_backlog(struct work_st +@@ -5810,7 +5821,16 @@ static void flush_backlog(struct work_st input_queue_head_incr(sd); } } @@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau } static bool flush_required(int cpu) -@@ -5940,6 +5960,7 @@ static int process_backlog(struct napi_s +@@ -5942,6 +5962,7 @@ static int process_backlog(struct napi_s } rps_lock_irq_disable(sd); @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau if (skb_queue_empty(&sd->input_pkt_queue)) { /* * Inline a custom version of __napi_complete(). -@@ -5949,7 +5970,8 @@ static int process_backlog(struct napi_s +@@ -5951,7 +5972,8 @@ static int process_backlog(struct napi_s * We can use a plain write instead of clear_bit(), * and we dont need an smp_mb() memory barrier. */ @@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau again = false; } else { skb_queue_splice_tail_init(&sd->input_pkt_queue, -@@ -6365,6 +6387,55 @@ int dev_set_threaded(struct net_device * +@@ -6367,6 +6389,55 @@ int dev_set_threaded(struct net_device * } EXPORT_SYMBOL(dev_set_threaded); @@ -157,7 +157,7 @@ Signed-off-by: Felix Fietkau void netif_napi_add_weight(struct net_device *dev, struct napi_struct *napi, int (*poll)(struct napi_struct *, int), int weight) { -@@ -11137,6 +11208,9 @@ static int dev_cpu_dead(unsigned int old +@@ -11139,6 +11210,9 @@ static int dev_cpu_dead(unsigned int old raise_softirq_irqoff(NET_TX_SOFTIRQ); local_irq_enable(); @@ -167,7 +167,7 @@ Signed-off-by: Felix Fietkau #ifdef CONFIG_RPS remsd = oldsd->rps_ipi_list; oldsd->rps_ipi_list = NULL; -@@ -11440,6 +11514,7 @@ static int __init net_dev_init(void) +@@ -11442,6 +11516,7 @@ static int __init net_dev_init(void) INIT_CSD(&sd->defer_csd, trigger_rx_softirq, sd); spin_lock_init(&sd->defer_lock); diff --git a/target/linux/generic/pending-6.1/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch b/target/linux/generic/pending-6.1/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch index a9c3f60ce0..c2f48627fb 100644 --- a/target/linux/generic/pending-6.1/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch +++ b/target/linux/generic/pending-6.1/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch @@ -17,7 +17,7 @@ Signed-off-by: Tobias Waldekranz --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -6971,6 +6971,7 @@ static int mv88e6xxx_register_switch(str +@@ -6973,6 +6973,7 @@ static int mv88e6xxx_register_switch(str ds->ops = &mv88e6xxx_switch_ops; ds->ageing_time_min = chip->info->age_time_coeff; ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX; From d85013460d47b538389b08506fda49e96a1968b5 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Wed, 31 May 2023 22:51:12 +0200 Subject: [PATCH 2/2] valgrind: update to 3.21.0 Release Notes: https://valgrind.org/docs/manual/dist.news.html This improves support for the memory allocator used in musl libc 1.2.2 and later which is currently used by OpenWrt. Signed-off-by: Hauke Mehrtens --- package/devel/valgrind/Makefile | 4 +-- .../010-mips-Fix-new-syscall-numbers.patch | 30 +++++++++++++------ .../patches/100-fix_configure_check.patch | 2 +- .../patches/130-fix_arm_arch_detection.patch | 2 +- 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/package/devel/valgrind/Makefile b/package/devel/valgrind/Makefile index 372a720d01..f696b28c3c 100644 --- a/package/devel/valgrind/Makefile +++ b/package/devel/valgrind/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=valgrind -PKG_VERSION:=3.20.0 +PKG_VERSION:=3.21.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://sourceware.org/pub/valgrind/ -PKG_HASH:=8536c031dbe078d342f121fa881a9ecd205cb5a78e639005ad570011bdb9f3c6 +PKG_HASH:=10ce1618bb3e33fad16eb79552b0a3e1211762448a0d7fce11c8a6243b9ac971 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0+ diff --git a/package/devel/valgrind/patches/010-mips-Fix-new-syscall-numbers.patch b/package/devel/valgrind/patches/010-mips-Fix-new-syscall-numbers.patch index e84273c973..5967b0cada 100644 --- a/package/devel/valgrind/patches/010-mips-Fix-new-syscall-numbers.patch +++ b/package/devel/valgrind/patches/010-mips-Fix-new-syscall-numbers.patch @@ -1,11 +1,11 @@ -From 86ab9452bd10f08dbfa22d94e1155838f6f9f2e0 Mon Sep 17 00:00:00 2001 +From 82e935c564699456a766044faa39367b47cce793 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 31 Oct 2021 23:11:11 +0100 Subject: [PATCH] mips: Fix new syscall numbers The MIPS32 and MIPS64 O32 ABI are adding 4000 to all syscall numbers. The MIPS64 N64 ABI adds 5000 to each syscall and the MIPS64 N32 ABI adds -6000 to each syscall number. We can not sue the shared file for MIPS and +6000 to each syscall number. We can not use the shared file for MIPS and have to define this for each sycall separately. Without this change valgrind is not able to detect new syscalls like @@ -13,10 +13,10 @@ clock_gettime64 correctly. Signed-off-by: Hauke Mehrtens --- - include/pub_tool_vkiscnums_asm.h | 3 --- - include/vki/vki-scnums-mips32-linux.h | 36 +++++++++++++++++++++++++++ - include/vki/vki-scnums-mips64-linux.h | 32 ++++++++++++++++++++++++ - 3 files changed, 68 insertions(+), 3 deletions(-) + include/pub_tool_vkiscnums_asm.h | 3 -- + include/vki/vki-scnums-mips32-linux.h | 40 +++++++++++++++++++++++++++ + include/vki/vki-scnums-mips64-linux.h | 40 +++++++++++++++++++++++++++ + 3 files changed, 80 insertions(+), 3 deletions(-) --- a/include/pub_tool_vkiscnums_asm.h +++ b/include/pub_tool_vkiscnums_asm.h @@ -38,7 +38,7 @@ Signed-off-by: Hauke Mehrtens #elif defined(VGP_x86_freebsd) || defined(VGP_amd64_freebsd) --- a/include/vki/vki-scnums-mips32-linux.h +++ b/include/vki/vki-scnums-mips32-linux.h -@@ -401,6 +401,42 @@ +@@ -401,6 +401,46 @@ #define __NR_pkey_free (__NR_Linux + 365) #define __NR_statx (__NR_Linux + 366) @@ -73,17 +73,21 @@ Signed-off-by: Hauke Mehrtens +#define __NR_fsmount (__NR_Linux + 432) +#define __NR_fspick (__NR_Linux + 433) + ++#define __NR_pidfd_open (__NR_Linux + 434) +#define __NR_clone3 (__NR_Linux + 435) +#define __NR_close_range (__NR_Linux + 436) ++#define __NR_openat2 (__NR_Linux + 437) + +#define __NR_faccessat2 (__NR_Linux + 439) ++ ++#define __NR_epoll_pwait2 (__NR_Linux + 441) + /* * Offset of the last Linux o32 flavoured syscall */ --- a/include/vki/vki-scnums-mips64-linux.h +++ b/include/vki/vki-scnums-mips64-linux.h -@@ -363,6 +363,22 @@ +@@ -363,6 +363,26 @@ #define __NR_pkey_free (__NR_Linux + 325) #define __NR_statx (__NR_Linux + 326) @@ -98,15 +102,19 @@ Signed-off-by: Hauke Mehrtens +#define __NR_fsmount (__NR_Linux + 432) +#define __NR_fspick (__NR_Linux + 433) + ++#define __NR_pidfd_open (__NR_Linux + 434) +#define __NR_clone3 (__NR_Linux + 435) +#define __NR_close_range (__NR_Linux + 436) ++#define __NR_openat2 (__NR_Linux + 437) + +#define __NR_faccessat2 (__NR_Linux + 439) ++ ++#define __NR_epoll_pwait2 (__NR_Linux + 441) + #elif defined(VGABI_N32) /* -@@ -702,6 +718,22 @@ +@@ -702,6 +722,26 @@ #define __NR_pkey_free (__NR_Linux + 329) #define __NR_statx (__NR_Linux + 330) @@ -121,10 +129,14 @@ Signed-off-by: Hauke Mehrtens +#define __NR_fsmount (__NR_Linux + 432) +#define __NR_fspick (__NR_Linux + 433) + ++#define __NR_pidfd_open (__NR_Linux + 434) +#define __NR_clone3 (__NR_Linux + 435) +#define __NR_close_range (__NR_Linux + 436) ++#define __NR_openat2 (__NR_Linux + 437) + +#define __NR_faccessat2 (__NR_Linux + 439) ++ ++#define __NR_epoll_pwait2 (__NR_Linux + 441) + #else #error unknown mips64 abi diff --git a/package/devel/valgrind/patches/100-fix_configure_check.patch b/package/devel/valgrind/patches/100-fix_configure_check.patch index 38269bb14c..5fa51977e7 100644 --- a/package/devel/valgrind/patches/100-fix_configure_check.patch +++ b/package/devel/valgrind/patches/100-fix_configure_check.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -368,7 +368,7 @@ case "${host_os}" in +@@ -364,7 +364,7 @@ case "${host_os}" in # Ok, this is linux. Check the kernel version AC_MSG_CHECKING([for the kernel version]) diff --git a/package/devel/valgrind/patches/130-fix_arm_arch_detection.patch b/package/devel/valgrind/patches/130-fix_arm_arch_detection.patch index 957e5c930f..9a7b591e70 100644 --- a/package/devel/valgrind/patches/130-fix_arm_arch_detection.patch +++ b/package/devel/valgrind/patches/130-fix_arm_arch_detection.patch @@ -6,7 +6,7 @@ Last-Update: 2013-11-30 --- a/configure.ac +++ b/configure.ac -@@ -275,7 +275,7 @@ case "${host_cpu}" in +@@ -271,7 +271,7 @@ case "${host_cpu}" in ARCH_MAX="s390x" ;;