This is a note to let you know that I've just added the patch titled perf: Fix function pointer case to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: perf-fix-function-pointer-case.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 1af6239d1d3e61d33fd2f0ba53d3d1a67cc50574 Mon Sep 17 00:00:00 2001 From: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Date: Wed, 16 Nov 2022 22:40:17 +0100 Subject: perf: Fix function pointer case From: Peter Zijlstra <peterz@xxxxxxxxxxxxx> 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@xxxxxxxxx> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx> Signed-off-by: Cixi Geng <cixi.geng1@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- kernel/events/core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -1222,6 +1222,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); @@ -10772,8 +10777,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); Patches currently in stable-queue which might be from peterz@xxxxxxxxxxxxx are queue-5.10/x86-kprobes-update-kcb-status-flag-after-singlestepping.patch queue-5.10/x86-kprobes-fix-to-identify-indirect-jmp-and-others-using-range-case.patch queue-5.10/x86-kprobes-fix-jng-jnle-emulation.patch queue-5.10/x86-kprobes-retrieve-correct-opcode-for-group-instruction.patch queue-5.10/x86-kprobes-use-int3-instead-of-debug-trap-for-single-step.patch queue-5.10/x86-kprobes-do-not-decode-opcode-in-resume_execution.patch queue-5.10/x86-kprobes-identify-far-indirect-jmp-correctly.patch queue-5.10/perf-fix-function-pointer-case.patch queue-5.10/kprobes-x86-fix-fall-through-warnings-for-clang.patch queue-5.10/x86-kprobes-move-inline-to-the-beginning-of-the-kprobe_is_ss-declaration.patch