--- /dev/null
+From 42602e3a06f8e5b9a059344e305c9bee2dcc87c8 Mon Sep 17 00:00:00 2001
+From: Jason Xing <kernelxing@tencent.com>
+Date: Tue, 29 Oct 2024 15:46:27 +0800
+Subject: bpf: handle implicit declaration of function gettid in bpf_iter.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Jason Xing <kernelxing@tencent.com>
+
+commit 42602e3a06f8e5b9a059344e305c9bee2dcc87c8 upstream.
+
+As we can see from the title, when I compiled the selftests/bpf, I
+saw the error:
+implicit declaration of function ‘gettid’ ; did you mean ‘getgid’? [-Werror=implicit-function-declaration]
+ skel->bss->tid = gettid();
+ ^~~~~~
+ getgid
+
+Directly call the syscall solves this issue.
+
+Signed-off-by: Jason Xing <kernelxing@tencent.com>
+Reviewed-by: Alan Maguire <alan.maguire@oracle.com>
+Tested-by: Alan Maguire <alan.maguire@oracle.com>
+Link: https://lore.kernel.org/r/20241029074627.80289-1-kerneljasonxing@gmail.com
+Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
+Cc: Alan Maguire <alan.maguire@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/testing/selftests/bpf/prog_tests/bpf_iter.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/tools/testing/selftests/bpf/prog_tests/bpf_iter.c
++++ b/tools/testing/selftests/bpf/prog_tests/bpf_iter.c
+@@ -226,7 +226,7 @@ static void test_task_common_nocheck(str
+ ASSERT_OK(pthread_create(&thread_id, NULL, &do_nothing_wait, NULL),
+ "pthread_create");
+
+- skel->bss->tid = gettid();
++ skel->bss->tid = syscall(SYS_gettid);
+
+ do_dummy_read_opts(skel->progs.dump_task, opts);
+
+@@ -255,10 +255,10 @@ static void *run_test_task_tid(void *arg
+ union bpf_iter_link_info linfo;
+ int num_unknown_tid, num_known_tid;
+
+- ASSERT_NEQ(getpid(), gettid(), "check_new_thread_id");
++ ASSERT_NEQ(getpid(), syscall(SYS_gettid), "check_new_thread_id");
+
+ memset(&linfo, 0, sizeof(linfo));
+- linfo.task.tid = gettid();
++ linfo.task.tid = syscall(SYS_gettid);
+ opts.link_info = &linfo;
+ opts.link_info_len = sizeof(linfo);
+ test_task_common(&opts, 0, 1);
--- /dev/null
+From c71bc6da6198a6d88df86094f1052bb581951d65 Mon Sep 17 00:00:00 2001
+From: Hangbin Liu <liuhangbin@gmail.com>
+Date: Thu, 10 Oct 2024 04:00:25 +0000
+Subject: netdevsim: print human readable IP address
+
+From: Hangbin Liu <liuhangbin@gmail.com>
+
+commit c71bc6da6198a6d88df86094f1052bb581951d65 upstream.
+
+Currently, IPSec addresses are printed in hexadecimal format, which is
+not user-friendly. e.g.
+
+ # cat /sys/kernel/debug/netdevsim/netdevsim0/ports/0/ipsec
+ SA count=2 tx=20
+ sa[0] rx ipaddr=0x00000000 00000000 00000000 0100a8c0
+ sa[0] spi=0x00000101 proto=0x32 salt=0x0adecc3a crypt=1
+ sa[0] key=0x3167608a ca4f1397 43565909 941fa627
+ sa[1] tx ipaddr=0x00000000 00000000 00000000 00000000
+ sa[1] spi=0x00000100 proto=0x32 salt=0x0adecc3a crypt=1
+ sa[1] key=0x3167608a ca4f1397 43565909 941fa627
+
+This patch updates the code to print the IPSec address in a human-readable
+format for easier debug. e.g.
+
+ # cat /sys/kernel/debug/netdevsim/netdevsim0/ports/0/ipsec
+ SA count=4 tx=40
+ sa[0] tx ipaddr=0.0.0.0
+ sa[0] spi=0x00000100 proto=0x32 salt=0x0adecc3a crypt=1
+ sa[0] key=0x3167608a ca4f1397 43565909 941fa627
+ sa[1] rx ipaddr=192.168.0.1
+ sa[1] spi=0x00000101 proto=0x32 salt=0x0adecc3a crypt=1
+ sa[1] key=0x3167608a ca4f1397 43565909 941fa627
+ sa[2] tx ipaddr=::
+ sa[2] spi=0x00000100 proto=0x32 salt=0x0adecc3a crypt=1
+ sa[2] key=0x3167608a ca4f1397 43565909 941fa627
+ sa[3] rx ipaddr=2000::1
+ sa[3] spi=0x00000101 proto=0x32 salt=0x0adecc3a crypt=1
+ sa[3] key=0x3167608a ca4f1397 43565909 941fa627
+
+Reviewed-by: Simon Horman <horms@kernel.org>
+Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
+Link: https://patch.msgid.link/20241010040027.21440-2-liuhangbin@gmail.com
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
+---
+ drivers/net/netdevsim/ipsec.c | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/netdevsim/ipsec.c
++++ b/drivers/net/netdevsim/ipsec.c
+@@ -39,10 +39,14 @@ static ssize_t nsim_dbg_netdev_ops_read(
+ if (!sap->used)
+ continue;
+
+- p += scnprintf(p, bufsize - (p - buf),
+- "sa[%i] %cx ipaddr=0x%08x %08x %08x %08x\n",
+- i, (sap->rx ? 'r' : 't'), sap->ipaddr[0],
+- sap->ipaddr[1], sap->ipaddr[2], sap->ipaddr[3]);
++ if (sap->xs->props.family == AF_INET6)
++ p += scnprintf(p, bufsize - (p - buf),
++ "sa[%i] %cx ipaddr=%pI6c\n",
++ i, (sap->rx ? 'r' : 't'), &sap->ipaddr);
++ else
++ p += scnprintf(p, bufsize - (p - buf),
++ "sa[%i] %cx ipaddr=%pI4\n",
++ i, (sap->rx ? 'r' : 't'), &sap->ipaddr[3]);
+ p += scnprintf(p, bufsize - (p - buf),
+ "sa[%i] spi=0x%08x proto=0x%x salt=0x%08x crypt=%d\n",
+ i, be32_to_cpu(sap->xs->id.spi),
--- /dev/null
+From 53916d5fd3c0b658de3463439dd2b7ce765072cb Mon Sep 17 00:00:00 2001
+From: Juri Lelli <juri.lelli@redhat.com>
+Date: Fri, 15 Nov 2024 11:48:29 +0000
+Subject: sched/deadline: Check bandwidth overflow earlier for hotplug
+
+From: Juri Lelli <juri.lelli@redhat.com>
+
+commit 53916d5fd3c0b658de3463439dd2b7ce765072cb upstream.
+
+Currently we check for bandwidth overflow potentially due to hotplug
+operations at the end of sched_cpu_deactivate(), after the cpu going
+offline has already been removed from scheduling, active_mask, etc.
+This can create issues for DEADLINE tasks, as there is a substantial
+race window between the start of sched_cpu_deactivate() and the moment
+we possibly decide to roll-back the operation if dl_bw_deactivate()
+returns failure in cpuset_cpu_inactive(). An example is a throttled
+task that sees its replenishment timer firing while the cpu it was
+previously running on is considered offline, but before
+dl_bw_deactivate() had a chance to say no and roll-back happened.
+
+Fix this by directly calling dl_bw_deactivate() first thing in
+sched_cpu_deactivate() and do the required calculation in the former
+function considering the cpu passed as an argument as offline already.
+
+By doing so we also simplify sched_cpu_deactivate(), as there is no need
+anymore for any kind of roll-back if we fail early.
+
+Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Reviewed-by: Phil Auld <pauld@redhat.com>
+Tested-by: Waiman Long <longman@redhat.com>
+Link: https://lore.kernel.org/r/Zzc1DfPhbvqDDIJR@jlelli-thinkpadt14gen4.remote.csb
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ kernel/sched/core.c | 22 +++++++---------------
+ kernel/sched/deadline.c | 12 ++++++++++--
+ 2 files changed, 17 insertions(+), 17 deletions(-)
+
+--- a/kernel/sched/core.c
++++ b/kernel/sched/core.c
+@@ -8091,19 +8091,14 @@ static void cpuset_cpu_active(void)
+ cpuset_update_active_cpus();
+ }
+
+-static int cpuset_cpu_inactive(unsigned int cpu)
++static void cpuset_cpu_inactive(unsigned int cpu)
+ {
+ if (!cpuhp_tasks_frozen) {
+- int ret = dl_bw_deactivate(cpu);
+-
+- if (ret)
+- return ret;
+ cpuset_update_active_cpus();
+ } else {
+ num_cpus_frozen++;
+ partition_sched_domains(1, NULL, NULL);
+ }
+- return 0;
+ }
+
+ static inline void sched_smt_present_inc(int cpu)
+@@ -8165,6 +8160,11 @@ int sched_cpu_deactivate(unsigned int cp
+ struct rq *rq = cpu_rq(cpu);
+ int ret;
+
++ ret = dl_bw_deactivate(cpu);
++
++ if (ret)
++ return ret;
++
+ /*
+ * Remove CPU from nohz.idle_cpus_mask to prevent participating in
+ * load balancing when not active
+@@ -8210,15 +8210,7 @@ int sched_cpu_deactivate(unsigned int cp
+ return 0;
+
+ sched_update_numa(cpu, false);
+- ret = cpuset_cpu_inactive(cpu);
+- if (ret) {
+- sched_smt_present_inc(cpu);
+- sched_set_rq_online(rq, cpu);
+- balance_push_set(cpu, false);
+- set_cpu_active(cpu, true);
+- sched_update_numa(cpu, true);
+- return ret;
+- }
++ cpuset_cpu_inactive(cpu);
+ sched_domains_numa_masks_clear(cpu);
+ return 0;
+ }
+--- a/kernel/sched/deadline.c
++++ b/kernel/sched/deadline.c
+@@ -3511,6 +3511,13 @@ static int dl_bw_manage(enum dl_bw_reque
+ break;
+ case dl_bw_req_deactivate:
+ /*
++ * cpu is not off yet, but we need to do the math by
++ * considering it off already (i.e., what would happen if we
++ * turn cpu off?).
++ */
++ cap -= arch_scale_cpu_capacity(cpu);
++
++ /*
+ * cpu is going offline and NORMAL tasks will be moved away
+ * from it. We can thus discount dl_server bandwidth
+ * contribution as it won't need to be servicing tasks after
+@@ -3527,9 +3534,10 @@ static int dl_bw_manage(enum dl_bw_reque
+ if (dl_b->total_bw - fair_server_bw > 0) {
+ /*
+ * Leaving at least one CPU for DEADLINE tasks seems a
+- * wise thing to do.
++ * wise thing to do. As said above, cpu is not offline
++ * yet, so account for that.
+ */
+- if (dl_bw_cpus(cpu))
++ if (dl_bw_cpus(cpu) - 1)
+ overflow = __dl_overflow(dl_b, cap, fair_server_bw, 0);
+ else
+ overflow = 1;
--- /dev/null
+From d4742f6ed7ea6df56e381f82ba4532245fa1e561 Mon Sep 17 00:00:00 2001
+From: Juri Lelli <juri.lelli@redhat.com>
+Date: Thu, 14 Nov 2024 14:28:10 +0000
+Subject: sched/deadline: Correctly account for allocated bandwidth during hotplug
+
+From: Juri Lelli <juri.lelli@redhat.com>
+
+commit d4742f6ed7ea6df56e381f82ba4532245fa1e561 upstream.
+
+For hotplug operations, DEADLINE needs to check that there is still enough
+bandwidth left after removing the CPU that is going offline. We however
+fail to do so currently.
+
+Restore the correct behavior by restructuring dl_bw_manage() a bit, so
+that overflow conditions (not enough bandwidth left) are properly
+checked. Also account for dl_server bandwidth, i.e. discount such
+bandwidth in the calculation since NORMAL tasks will be anyway moved
+away from the CPU as a result of the hotplug operation.
+
+Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Reviewed-by: Phil Auld <pauld@redhat.com>
+Tested-by: Waiman Long <longman@redhat.com>
+Link: https://lore.kernel.org/r/20241114142810.794657-3-juri.lelli@redhat.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ kernel/sched/core.c | 2 +-
+ kernel/sched/deadline.c | 48 +++++++++++++++++++++++++++++++++++++++---------
+ kernel/sched/sched.h | 2 +-
+ 3 files changed, 41 insertions(+), 11 deletions(-)
+
+--- a/kernel/sched/core.c
++++ b/kernel/sched/core.c
+@@ -8094,7 +8094,7 @@ static void cpuset_cpu_active(void)
+ static int cpuset_cpu_inactive(unsigned int cpu)
+ {
+ if (!cpuhp_tasks_frozen) {
+- int ret = dl_bw_check_overflow(cpu);
++ int ret = dl_bw_deactivate(cpu);
+
+ if (ret)
+ return ret;
+--- a/kernel/sched/deadline.c
++++ b/kernel/sched/deadline.c
+@@ -3475,29 +3475,31 @@ int dl_cpuset_cpumask_can_shrink(const s
+ }
+
+ enum dl_bw_request {
+- dl_bw_req_check_overflow = 0,
++ dl_bw_req_deactivate = 0,
+ dl_bw_req_alloc,
+ dl_bw_req_free
+ };
+
+ static int dl_bw_manage(enum dl_bw_request req, int cpu, u64 dl_bw)
+ {
+- unsigned long flags;
++ unsigned long flags, cap;
+ struct dl_bw *dl_b;
+ bool overflow = 0;
++ u64 fair_server_bw = 0;
+
+ rcu_read_lock_sched();
+ dl_b = dl_bw_of(cpu);
+ raw_spin_lock_irqsave(&dl_b->lock, flags);
+
+- if (req == dl_bw_req_free) {
++ cap = dl_bw_capacity(cpu);
++ switch (req) {
++ case dl_bw_req_free:
+ __dl_sub(dl_b, dl_bw, dl_bw_cpus(cpu));
+- } else {
+- unsigned long cap = dl_bw_capacity(cpu);
+-
++ break;
++ case dl_bw_req_alloc:
+ overflow = __dl_overflow(dl_b, cap, 0, dl_bw);
+
+- if (req == dl_bw_req_alloc && !overflow) {
++ if (!overflow) {
+ /*
+ * We reserve space in the destination
+ * root_domain, as we can't fail after this point.
+@@ -3506,6 +3508,34 @@ static int dl_bw_manage(enum dl_bw_reque
+ */
+ __dl_add(dl_b, dl_bw, dl_bw_cpus(cpu));
+ }
++ break;
++ case dl_bw_req_deactivate:
++ /*
++ * cpu is going offline and NORMAL tasks will be moved away
++ * from it. We can thus discount dl_server bandwidth
++ * contribution as it won't need to be servicing tasks after
++ * the cpu is off.
++ */
++ if (cpu_rq(cpu)->fair_server.dl_server)
++ fair_server_bw = cpu_rq(cpu)->fair_server.dl_bw;
++
++ /*
++ * Not much to check if no DEADLINE bandwidth is present.
++ * dl_servers we can discount, as tasks will be moved out the
++ * offlined CPUs anyway.
++ */
++ if (dl_b->total_bw - fair_server_bw > 0) {
++ /*
++ * Leaving at least one CPU for DEADLINE tasks seems a
++ * wise thing to do.
++ */
++ if (dl_bw_cpus(cpu))
++ overflow = __dl_overflow(dl_b, cap, fair_server_bw, 0);
++ else
++ overflow = 1;
++ }
++
++ break;
+ }
+
+ raw_spin_unlock_irqrestore(&dl_b->lock, flags);
+@@ -3514,9 +3544,9 @@ static int dl_bw_manage(enum dl_bw_reque
+ return overflow ? -EBUSY : 0;
+ }
+
+-int dl_bw_check_overflow(int cpu)
++int dl_bw_deactivate(int cpu)
+ {
+- return dl_bw_manage(dl_bw_req_check_overflow, cpu, 0);
++ return dl_bw_manage(dl_bw_req_deactivate, cpu, 0);
+ }
+
+ int dl_bw_alloc(int cpu, u64 dl_bw)
+--- a/kernel/sched/sched.h
++++ b/kernel/sched/sched.h
+@@ -362,7 +362,7 @@ extern void __getparam_dl(struct task_st
+ extern bool __checkparam_dl(const struct sched_attr *attr);
+ extern bool dl_param_changed(struct task_struct *p, const struct sched_attr *attr);
+ extern int dl_cpuset_cpumask_can_shrink(const struct cpumask *cur, const struct cpumask *trial);
+-extern int dl_bw_check_overflow(int cpu);
++extern int dl_bw_deactivate(int cpu);
+ extern s64 dl_scaled_delta_exec(struct rq *rq, struct sched_dl_entity *dl_se, s64 delta_exec);
+ /*
+ * SCHED_DEADLINE supports servers (nested scheduling) with the following
--- /dev/null
+From 41d4200b7103152468552ee50998cda914102049 Mon Sep 17 00:00:00 2001
+From: Juri Lelli <juri.lelli@redhat.com>
+Date: Thu, 14 Nov 2024 14:28:09 +0000
+Subject: sched/deadline: Restore dl_server bandwidth on non-destructive root domain changes
+
+From: Juri Lelli <juri.lelli@redhat.com>
+
+commit 41d4200b7103152468552ee50998cda914102049 upstream.
+
+When root domain non-destructive changes (e.g., only modifying one of
+the existing root domains while the rest is not touched) happen we still
+need to clear DEADLINE bandwidth accounting so that it's then properly
+restored, taking into account DEADLINE tasks associated to each cpuset
+(associated to each root domain). After the introduction of dl_servers,
+we fail to restore such servers contribution after non-destructive
+changes (as they are only considered on destructive changes when
+runqueues are attached to the new domains).
+
+Fix this by making sure we iterate over the dl_servers attached to
+domains that have not been destroyed and add their bandwidth
+contribution back correctly.
+
+Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Reviewed-by: Phil Auld <pauld@redhat.com>
+Tested-by: Waiman Long <longman@redhat.com>
+Link: https://lore.kernel.org/r/20241114142810.794657-2-juri.lelli@redhat.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ kernel/sched/deadline.c | 17 ++++++++++++++---
+ kernel/sched/topology.c | 8 +++++---
+ 2 files changed, 19 insertions(+), 6 deletions(-)
+
+--- a/kernel/sched/deadline.c
++++ b/kernel/sched/deadline.c
+@@ -2975,11 +2975,22 @@ void dl_add_task_root_domain(struct task
+
+ void dl_clear_root_domain(struct root_domain *rd)
+ {
+- unsigned long flags;
++ int i;
+
+- raw_spin_lock_irqsave(&rd->dl_bw.lock, flags);
++ guard(raw_spinlock_irqsave)(&rd->dl_bw.lock);
+ rd->dl_bw.total_bw = 0;
+- raw_spin_unlock_irqrestore(&rd->dl_bw.lock, flags);
++
++ /*
++ * dl_server bandwidth is only restored when CPUs are attached to root
++ * domains (after domains are created or CPUs moved back to the
++ * default root doamin).
++ */
++ for_each_cpu(i, rd->span) {
++ struct sched_dl_entity *dl_se = &cpu_rq(i)->fair_server;
++
++ if (dl_server(dl_se) && cpu_active(i))
++ rd->dl_bw.total_bw += dl_se->dl_bw;
++ }
+ }
+
+ #endif /* CONFIG_SMP */
+--- a/kernel/sched/topology.c
++++ b/kernel/sched/topology.c
+@@ -2721,9 +2721,11 @@ void partition_sched_domains_locked(int
+
+ /*
+ * This domain won't be destroyed and as such
+- * its dl_bw->total_bw needs to be cleared. It
+- * will be recomputed in function
+- * update_tasks_root_domain().
++ * its dl_bw->total_bw needs to be cleared.
++ * Tasks contribution will be then recomputed
++ * in function dl_update_tasks_root_domain(),
++ * dl_servers contribution in function
++ * dl_restore_server_root_domain().
+ */
+ rd = cpu_rq(cpumask_any(doms_cur[i]))->rd;
+ dl_clear_root_domain(rd);
--- /dev/null
+From 4b7c05598a644782b8451e415bb56f31e5c9d3ee Mon Sep 17 00:00:00 2001
+From: Jiri Olsa <jolsa@kernel.org>
+Date: Tue, 24 Sep 2024 13:07:30 +0200
+Subject: selftests/bpf: Fix uprobe consumer test
+
+From: Jiri Olsa <jolsa@kernel.org>
+
+commit 4b7c05598a644782b8451e415bb56f31e5c9d3ee upstream.
+
+With newly merged code the uprobe behaviour is slightly different
+and affects uprobe consumer test.
+
+We no longer need to check if the uprobe object is still preserved
+after removing last uretprobe, because it stays as long as there's
+pending/installed uretprobe instance.
+
+This allows to run uretprobe consumers registered 'after' uprobe was
+hit even if previous uretprobe got unregistered before being hit.
+
+The uprobe object will be now removed after the last uprobe ref is
+released and in such case it's held by ri->uprobe (return instance)
+which is released after the uretprobe is hit.
+
+Reported-by: Ihor Solodrai <ihor.solodrai@pm.me>
+Signed-off-by: Jiri Olsa <jolsa@kernel.org>
+Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
+Tested-by: Ihor Solodrai <ihor.solodrai@pm.me>
+Closes: https://lore.kernel.org/bpf/w6U8Z9fdhjnkSp2UaFaV1fGqJXvfLEtDKEUyGDkwmoruDJ_AgF_c0FFhrkeKW18OqiP-05s9yDKiT6X-Ns-avN_ABf0dcUkXqbSJN1TQSXo=@pm.me/
+Signed-off-by: Alexei Starovoitov <ast@kernel.org>
+Cc: Alan Maguire <alan.maguire@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/testing/selftests/bpf/prog_tests/uprobe_multi_test.c | 9 +--------
+ 1 file changed, 1 insertion(+), 8 deletions(-)
+
+--- a/tools/testing/selftests/bpf/prog_tests/uprobe_multi_test.c
++++ b/tools/testing/selftests/bpf/prog_tests/uprobe_multi_test.c
+@@ -869,21 +869,14 @@ static void consumer_test(struct uprobe_
+ fmt = "prog 0/1: uprobe";
+ } else {
+ /*
+- * uprobe return is tricky ;-)
+- *
+ * to trigger uretprobe consumer, the uretprobe needs to be installed,
+ * which means one of the 'return' uprobes was alive when probe was hit:
+ *
+ * idxs: 2/3 uprobe return in 'installed' mask
+- *
+- * in addition if 'after' state removes everything that was installed in
+- * 'before' state, then uprobe kernel object goes away and return uprobe
+- * is not installed and we won't hit it even if it's in 'after' state.
+ */
+ unsigned long had_uretprobes = before & 0b1100; /* is uretprobe installed */
+- unsigned long probe_preserved = before & after; /* did uprobe go away */
+
+- if (had_uretprobes && probe_preserved && test_bit(idx, after))
++ if (had_uretprobes && test_bit(idx, after))
+ val++;
+ fmt = "idx 2/3: uretprobe";
+ }
--- /dev/null
+From 3ec920bb978ccdc68a7dfb304d303d598d038cb1 Mon Sep 17 00:00:00 2001
+From: Hangbin Liu <liuhangbin@gmail.com>
+Date: Thu, 10 Oct 2024 04:00:27 +0000
+Subject: selftests: rtnetlink: update netdevsim ipsec output format
+
+From: Hangbin Liu <liuhangbin@gmail.com>
+
+commit 3ec920bb978ccdc68a7dfb304d303d598d038cb1 upstream.
+
+After the netdevsim update to use human-readable IP address formats for
+IPsec, we can now use the source and destination IPs directly in testing.
+Here is the result:
+ # ./rtnetlink.sh -t kci_test_ipsec_offload
+ PASS: ipsec_offload
+
+Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
+Acked-by: Stanislav Fomichev <sdf@fomichev.me>
+Link: https://patch.msgid.link/20241010040027.21440-4-liuhangbin@gmail.com
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/testing/selftests/net/rtnetlink.sh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/tools/testing/selftests/net/rtnetlink.sh
++++ b/tools/testing/selftests/net/rtnetlink.sh
+@@ -809,10 +809,10 @@ kci_test_ipsec_offload()
+ # does driver have correct offload info
+ run_cmd diff $sysfsf - << EOF
+ SA count=2 tx=3
+-sa[0] tx ipaddr=0x00000000 00000000 00000000 00000000
++sa[0] tx ipaddr=$dstip
+ sa[0] spi=0x00000009 proto=0x32 salt=0x61626364 crypt=1
+ sa[0] key=0x34333231 38373635 32313039 36353433
+-sa[1] rx ipaddr=0x00000000 00000000 00000000 037ba8c0
++sa[1] rx ipaddr=$srcip
+ sa[1] spi=0x00000009 proto=0x32 salt=0x61626364 crypt=1
+ sa[1] key=0x34333231 38373635 32313039 36353433
+ EOF
drm-v3d-stop-active-perfmon-if-it-is-being-destroyed.patch
drm-xe-tracing-fix-a-potential-tp_printk-uaf.patch
drm-renesas-rz-du-increase-supported-resolutions.patch
+netdevsim-print-human-readable-ip-address.patch
+selftests-rtnetlink-update-netdevsim-ipsec-output-format.patch
+sched-deadline-restore-dl_server-bandwidth-on-non-destructive-root-domain-changes.patch
+sched-deadline-correctly-account-for-allocated-bandwidth-during-hotplug.patch
+sched-deadline-check-bandwidth-overflow-earlier-for-hotplug.patch
+x86-static-call-remove-early_boot_irqs_disabled-check-to-fix-xen-pvh-dom0.patch
+bpf-handle-implicit-declaration-of-function-gettid-in-bpf_iter.c.patch
+selftests-bpf-fix-uprobe-consumer-test.patch
+wifi-rtw89-pci-disable-pcie-wake-bit-when-pcie-deinit.patch
--- /dev/null
+From 9c1df813e08832c3836c254bc8a2f83ff22dbc06 Mon Sep 17 00:00:00 2001
+From: Ping-Ke Shih <pkshih@realtek.com>
+Date: Mon, 11 Nov 2024 14:38:35 +0800
+Subject: wifi: rtw89: pci: disable PCIE wake bit when PCIE deinit
+
+From: Ping-Ke Shih <pkshih@realtek.com>
+
+commit 9c1df813e08832c3836c254bc8a2f83ff22dbc06 upstream.
+
+The PCIE wake bit is to control PCIE wake signal to host. When PCIE is
+going down, clear this bit to prevent waking up host unexpectedly.
+
+Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
+Link: https://patch.msgid.link/20241111063835.15454-1-pkshih@realtek.com
+Signed-off-by: Zenm Chen <zenmchen@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/wireless/realtek/rtw89/pci.c | 17 ++++++++++++++---
+ drivers/net/wireless/realtek/rtw89/pci.h | 11 +++++++++++
+ drivers/net/wireless/realtek/rtw89/pci_be.c | 2 ++
+ 3 files changed, 27 insertions(+), 3 deletions(-)
+
+--- a/drivers/net/wireless/realtek/rtw89/pci.c
++++ b/drivers/net/wireless/realtek/rtw89/pci.c
+@@ -2492,7 +2492,7 @@ static int rtw89_pci_dphy_delay(struct r
+ PCIE_DPHY_DLY_25US, PCIE_PHY_GEN1);
+ }
+
+-static void rtw89_pci_power_wake(struct rtw89_dev *rtwdev, bool pwr_up)
++static void rtw89_pci_power_wake_ax(struct rtw89_dev *rtwdev, bool pwr_up)
+ {
+ if (pwr_up)
+ rtw89_write32_set(rtwdev, R_AX_HCI_OPT_CTRL, BIT_WAKE_CTRL);
+@@ -2799,6 +2799,8 @@ static int rtw89_pci_ops_deinit(struct r
+ {
+ const struct rtw89_pci_info *info = rtwdev->pci_info;
+
++ rtw89_pci_power_wake(rtwdev, false);
++
+ if (rtwdev->chip->chip_id == RTL8852A) {
+ /* ltr sw trigger */
+ rtw89_write32_set(rtwdev, R_AX_LTR_CTRL_0, B_AX_APP_LTR_IDLE);
+@@ -2841,7 +2843,7 @@ static int rtw89_pci_ops_mac_pre_init_ax
+ return ret;
+ }
+
+- rtw89_pci_power_wake(rtwdev, true);
++ rtw89_pci_power_wake_ax(rtwdev, true);
+ rtw89_pci_autoload_hang(rtwdev);
+ rtw89_pci_l12_vmain(rtwdev);
+ rtw89_pci_gen2_force_ib(rtwdev);
+@@ -2886,6 +2888,13 @@ static int rtw89_pci_ops_mac_pre_init_ax
+ return 0;
+ }
+
++static int rtw89_pci_ops_mac_pre_deinit_ax(struct rtw89_dev *rtwdev)
++{
++ rtw89_pci_power_wake_ax(rtwdev, false);
++
++ return 0;
++}
++
+ int rtw89_pci_ltr_set(struct rtw89_dev *rtwdev, bool en)
+ {
+ u32 val;
+@@ -4264,7 +4273,7 @@ const struct rtw89_pci_gen_def rtw89_pci
+ B_AX_RDU_INT},
+
+ .mac_pre_init = rtw89_pci_ops_mac_pre_init_ax,
+- .mac_pre_deinit = NULL,
++ .mac_pre_deinit = rtw89_pci_ops_mac_pre_deinit_ax,
+ .mac_post_init = rtw89_pci_ops_mac_post_init_ax,
+
+ .clr_idx_all = rtw89_pci_clr_idx_all_ax,
+@@ -4280,6 +4289,8 @@ const struct rtw89_pci_gen_def rtw89_pci
+ .aspm_set = rtw89_pci_aspm_set_ax,
+ .clkreq_set = rtw89_pci_clkreq_set_ax,
+ .l1ss_set = rtw89_pci_l1ss_set_ax,
++
++ .power_wake = rtw89_pci_power_wake_ax,
+ };
+ EXPORT_SYMBOL(rtw89_pci_gen_ax);
+
+--- a/drivers/net/wireless/realtek/rtw89/pci.h
++++ b/drivers/net/wireless/realtek/rtw89/pci.h
+@@ -1276,6 +1276,8 @@ struct rtw89_pci_gen_def {
+ void (*aspm_set)(struct rtw89_dev *rtwdev, bool enable);
+ void (*clkreq_set)(struct rtw89_dev *rtwdev, bool enable);
+ void (*l1ss_set)(struct rtw89_dev *rtwdev, bool enable);
++
++ void (*power_wake)(struct rtw89_dev *rtwdev, bool pwr_up);
+ };
+
+ struct rtw89_pci_info {
+@@ -1766,4 +1768,13 @@ static inline int rtw89_pci_poll_txdma_c
+
+ return gen_def->poll_txdma_ch_idle(rtwdev);
+ }
++
++static inline void rtw89_pci_power_wake(struct rtw89_dev *rtwdev, bool pwr_up)
++{
++ const struct rtw89_pci_info *info = rtwdev->pci_info;
++ const struct rtw89_pci_gen_def *gen_def = info->gen_def;
++
++ gen_def->power_wake(rtwdev, pwr_up);
++}
++
+ #endif
+--- a/drivers/net/wireless/realtek/rtw89/pci_be.c
++++ b/drivers/net/wireless/realtek/rtw89/pci_be.c
+@@ -614,5 +614,7 @@ const struct rtw89_pci_gen_def rtw89_pci
+ .aspm_set = rtw89_pci_aspm_set_be,
+ .clkreq_set = rtw89_pci_clkreq_set_be,
+ .l1ss_set = rtw89_pci_l1ss_set_be,
++
++ .power_wake = _patch_pcie_power_wake_be,
+ };
+ EXPORT_SYMBOL(rtw89_pci_gen_be);
--- /dev/null
+From 5cc2db37124bb33914996d6fdbb2ddb3811f2945 Mon Sep 17 00:00:00 2001
+From: Andrew Cooper <andrew.cooper3@citrix.com>
+Date: Sat, 21 Dec 2024 21:10:46 +0000
+Subject: x86/static-call: Remove early_boot_irqs_disabled check to fix Xen PVH dom0
+
+From: Andrew Cooper <andrew.cooper3@citrix.com>
+
+commit 5cc2db37124bb33914996d6fdbb2ddb3811f2945 upstream.
+
+__static_call_update_early() has a check for early_boot_irqs_disabled, but
+is used before early_boot_irqs_disabled is set up in start_kernel().
+
+Xen PV has always special cased early_boot_irqs_disabled, but Xen PVH does
+not and falls over the BUG when booting as dom0.
+
+It is very suspect that early_boot_irqs_disabled starts as 0, becomes 1 for
+a time, then becomes 0 again, but as this needs backporting to fix a
+breakage in a security fix, dropping the BUG_ON() is the far safer option.
+
+Fixes: 0ef8047b737d ("x86/static-call: provide a way to do very early static-call updates")
+Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219620
+Reported-by: Alex Zenla <alex@edera.dev>
+Suggested-by: Peter Zijlstra <peterz@infradead.org>
+Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
+Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
+Reviewed-by: Juergen Gross <jgross@suse.com>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Tested-by: Alex Zenla <alex@edera.dev>
+Link: https://lore.kernel.org/r/20241221211046.6475-1-andrew.cooper3@citrix.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/x86/kernel/static_call.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/arch/x86/kernel/static_call.c
++++ b/arch/x86/kernel/static_call.c
+@@ -175,7 +175,6 @@ EXPORT_SYMBOL_GPL(arch_static_call_trans
+ noinstr void __static_call_update_early(void *tramp, void *func)
+ {
+ BUG_ON(system_state != SYSTEM_BOOTING);
+- BUG_ON(!early_boot_irqs_disabled);
+ BUG_ON(static_call_initialized);
+ __text_gen_insn(tramp, JMP32_INSN_OPCODE, tramp, func, JMP32_INSN_SIZE);
+ sync_core();