From: Greg Kroah-Hartman Date: Wed, 14 Dec 2022 16:01:59 +0000 (+0100) Subject: 5.4-stable patches X-Git-Tag: v5.4.228~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76614e98e9872450e604ebbe13e3d392a401b0b9;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: net-bpf-allow-tc-programs-to-call-bpf_func_skb_change_head.patch x86-smpboot-move-rcu_cpu_starting-earlier.patch --- diff --git a/queue-5.10/series b/queue-5.10/series new file mode 100644 index 00000000000..58eb11f654d --- /dev/null +++ b/queue-5.10/series @@ -0,0 +1 @@ +x86-smpboot-move-rcu_cpu_starting-earlier.patch diff --git a/queue-5.15/series b/queue-5.15/series new file mode 100644 index 00000000000..2543f952824 --- /dev/null +++ b/queue-5.15/series @@ -0,0 +1 @@ +x86-vdso-conditionally-export-__vdso_sgx_enter_enclave.patch diff --git a/queue-5.4/net-bpf-allow-tc-programs-to-call-bpf_func_skb_change_head.patch b/queue-5.4/net-bpf-allow-tc-programs-to-call-bpf_func_skb_change_head.patch new file mode 100644 index 00000000000..6064fd3ad79 --- /dev/null +++ b/queue-5.4/net-bpf-allow-tc-programs-to-call-bpf_func_skb_change_head.patch @@ -0,0 +1,42 @@ +From 6f3f65d80dac8f2bafce2213005821fccdce194c Mon Sep 17 00:00:00 2001 +From: Lorenzo Colitti +Date: Mon, 20 Apr 2020 11:34:08 -0700 +Subject: net: bpf: Allow TC programs to call BPF_FUNC_skb_change_head +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Lorenzo Colitti + +commit 6f3f65d80dac8f2bafce2213005821fccdce194c upstream. + +This allows TC eBPF programs to modify and forward (redirect) packets +from interfaces without ethernet headers (for example cellular) +to interfaces with (for example ethernet/wifi). + +The lack of this appears to simply be an oversight. + +Tested: + in active use in Android R on 4.14+ devices for ipv6 + cellular to wifi tethering offload. + +Signed-off-by: Lorenzo Colitti +Signed-off-by: Maciej Żenczykowski +Signed-off-by: Alexei Starovoitov +Cc: Nicolas Dichtel +Signed-off-by: Greg Kroah-Hartman +--- + net/core/filter.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/net/core/filter.c ++++ b/net/core/filter.c +@@ -6196,6 +6196,8 @@ tc_cls_act_func_proto(enum bpf_func_id f + return &bpf_skb_adjust_room_proto; + case BPF_FUNC_skb_change_tail: + return &bpf_skb_change_tail_proto; ++ case BPF_FUNC_skb_change_head: ++ return &bpf_skb_change_head_proto; + case BPF_FUNC_skb_get_tunnel_key: + return &bpf_skb_get_tunnel_key_proto; + case BPF_FUNC_skb_set_tunnel_key: diff --git a/queue-5.4/series b/queue-5.4/series new file mode 100644 index 00000000000..38cc3c2de06 --- /dev/null +++ b/queue-5.4/series @@ -0,0 +1,2 @@ +net-bpf-allow-tc-programs-to-call-bpf_func_skb_change_head.patch +x86-smpboot-move-rcu_cpu_starting-earlier.patch diff --git a/queue-5.4/x86-smpboot-move-rcu_cpu_starting-earlier.patch b/queue-5.4/x86-smpboot-move-rcu_cpu_starting-earlier.patch new file mode 100644 index 00000000000..ce47f308842 --- /dev/null +++ b/queue-5.4/x86-smpboot-move-rcu_cpu_starting-earlier.patch @@ -0,0 +1,84 @@ +From 29368e09392123800e5e2bf0f3eda91f16972e52 Mon Sep 17 00:00:00 2001 +From: "Paul E. McKenney" +Date: Tue, 20 Oct 2020 21:13:55 -0700 +Subject: x86/smpboot: Move rcu_cpu_starting() earlier + +From: Paul E. McKenney + +commit 29368e09392123800e5e2bf0f3eda91f16972e52 upstream. + +The call to rcu_cpu_starting() in mtrr_ap_init() is not early enough +in the CPU-hotplug onlining process, which results in lockdep splats +as follows: + +============================= +WARNING: suspicious RCU usage +5.9.0+ #268 Not tainted +----------------------------- +kernel/kprobes.c:300 RCU-list traversed in non-reader section!! + +other info that might help us debug this: + +RCU used illegally from offline CPU! +rcu_scheduler_active = 1, debug_locks = 1 +no locks held by swapper/1/0. + +stack backtrace: +CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.9.0+ #268 +Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.10.2-1ubuntu1 04/01/2014 +Call Trace: + dump_stack+0x77/0x97 + __is_insn_slot_addr+0x15d/0x170 + kernel_text_address+0xba/0xe0 + ? get_stack_info+0x22/0xa0 + __kernel_text_address+0x9/0x30 + show_trace_log_lvl+0x17d/0x380 + ? dump_stack+0x77/0x97 + dump_stack+0x77/0x97 + __lock_acquire+0xdf7/0x1bf0 + lock_acquire+0x258/0x3d0 + ? vprintk_emit+0x6d/0x2c0 + _raw_spin_lock+0x27/0x40 + ? vprintk_emit+0x6d/0x2c0 + vprintk_emit+0x6d/0x2c0 + printk+0x4d/0x69 + start_secondary+0x1c/0x100 + secondary_startup_64_no_verify+0xb8/0xbb + +This is avoided by moving the call to rcu_cpu_starting up near +the beginning of the start_secondary() function. Note that the +raw_smp_processor_id() is required in order to avoid calling into lockdep +before RCU has declared the CPU to be watched for readers. + +Link: https://lore.kernel.org/lkml/160223032121.7002.1269740091547117869.tip-bot2@tip-bot2/ +Reported-by: Qian Cai +Suggested-by: Peter Zijlstra +Signed-off-by: Paul E. McKenney +Cc: Joel Fernandes +Signed-off-by: Greg Kroah-Hartman +--- + arch/x86/kernel/cpu/mtrr/mtrr.c | 2 -- + arch/x86/kernel/smpboot.c | 1 + + 2 files changed, 1 insertion(+), 2 deletions(-) + +--- a/arch/x86/kernel/cpu/mtrr/mtrr.c ++++ b/arch/x86/kernel/cpu/mtrr/mtrr.c +@@ -794,8 +794,6 @@ void mtrr_ap_init(void) + if (!use_intel() || mtrr_aps_delayed_init) + return; + +- rcu_cpu_starting(smp_processor_id()); +- + /* + * Ideally we should hold mtrr_mutex here to avoid mtrr entries + * changed, but this routine will be called in cpu boot time, +--- a/arch/x86/kernel/smpboot.c ++++ b/arch/x86/kernel/smpboot.c +@@ -224,6 +224,7 @@ static void notrace start_secondary(void + #endif + load_current_idt(); + cpu_init(); ++ rcu_cpu_starting(raw_smp_processor_id()); + x86_cpuinit.early_percpu_clock_init(); + preempt_disable(); + smp_callin(); diff --git a/queue-6.0/series b/queue-6.0/series new file mode 100644 index 00000000000..9dfbad09367 --- /dev/null +++ b/queue-6.0/series @@ -0,0 +1,3 @@ +rtc-cmos-fix-event-handler-registration-ordering-issue.patch +rtc-cmos-fix-wake-alarm-breakage.patch +x86-vdso-conditionally-export-__vdso_sgx_enter_enclave.patch diff --git a/queue-6.1/series b/queue-6.1/series new file mode 100644 index 00000000000..2543f952824 --- /dev/null +++ b/queue-6.1/series @@ -0,0 +1 @@ +x86-vdso-conditionally-export-__vdso_sgx_enter_enclave.patch