]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Aug 2023 10:42:53 +0000 (12:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Aug 2023 10:42:53 +0000 (12:42 +0200)
added patches:
perf-fix-function-pointer-case.patch

queue-5.4/perf-fix-function-pointer-case.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/perf-fix-function-pointer-case.patch b/queue-5.4/perf-fix-function-pointer-case.patch
new file mode 100644 (file)
index 0000000..5c870e7
--- /dev/null
@@ -0,0 +1,48 @@
+From 1af6239d1d3e61d33fd2f0ba53d3d1a67cc50574 Mon Sep 17 00:00:00 2001
+From: Peter Zijlstra <peterz@infradead.org>
+Date: Wed, 16 Nov 2022 22:40:17 +0100
+Subject: perf: Fix function pointer case
+
+From: Peter Zijlstra <peterz@infradead.org>
+
+commit 1af6239d1d3e61d33fd2f0ba53d3d1a67cc50574 upstream.
+
+With the advent of CFI it is no longer acceptible to cast function
+pointers.
+
+The robot complains thusly:
+
+  kernel-events-core.c:warning:cast-from-int-(-)(struct-perf_cpu_pmu_context-)-to-remote_function_f-(aka-int-(-)(void-)-)-converts-to-incompatible-function-type
+
+Reported-by: kernel test robot <lkp@intel.com>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Signed-off-by: Cixi Geng <cixi.geng1@unisoc.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ kernel/events/core.c |    8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/kernel/events/core.c
++++ b/kernel/events/core.c
+@@ -1134,6 +1134,11 @@ static int perf_mux_hrtimer_restart(stru
+       return 0;
+ }
++static int perf_mux_hrtimer_restart_ipi(void *arg)
++{
++      return perf_mux_hrtimer_restart(arg);
++}
++
+ void perf_pmu_disable(struct pmu *pmu)
+ {
+       int *count = this_cpu_ptr(pmu->pmu_disable_count);
+@@ -9997,8 +10002,7 @@ perf_event_mux_interval_ms_store(struct
+               cpuctx = per_cpu_ptr(pmu->pmu_cpu_context, cpu);
+               cpuctx->hrtimer_interval = ns_to_ktime(NSEC_PER_MSEC * timer);
+-              cpu_function_call(cpu,
+-                      (remote_function_f)perf_mux_hrtimer_restart, cpuctx);
++              cpu_function_call(cpu, perf_mux_hrtimer_restart_ipi, cpuctx);
+       }
+       cpus_read_unlock();
+       mutex_unlock(&mux_interval_mutex);
index 461fb807747e4a25d19f4e181d30d3a7104a8376..979ecc067839b50c3ced562172e9e400a96d8116 100644 (file)
@@ -88,3 +88,4 @@ net-sched-sch_qfq-account-for-stab-overhead-in-qfq_enqueue.patch
 asoc-cs42l51-fix-driver-to-properly-autoload-with-automatic-module-loading.patch
 arm64-add-ampere1-to-the-spectre-bhb-affected-list.patch
 arm64-fix-bit-shifting-ub-in-the-midr_cpu_model-macro.patch
+perf-fix-function-pointer-case.patch