From: Alexei Starovoitov Date: Tue, 4 Nov 2025 01:22:06 +0000 (-0800) Subject: Merge branch 'fix-ftrace-for-livepatch-bpf-fexit-programs' X-Git-Tag: v6.18-rc6~11^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=156c75f596c98852c30981baea6c2cc8a7a411fc;p=thirdparty%2Fkernel%2Flinux.git Merge branch 'fix-ftrace-for-livepatch-bpf-fexit-programs' Song Liu says: ==================== Fix ftrace for livepatch + BPF fexit programs livepatch and BPF trampoline are two special users of ftrace. livepatch uses ftrace with IPMODIFY flag and BPF trampoline uses ftrace direct functions. When livepatch and BPF trampoline with fexit programs attach to the same kernel function, BPF trampoline needs to call into the patched version of the kernel function. 1/3 and 2/3 of this patchset fix two issues with livepatch + fexit cases, one in the register_ftrace_direct path, the other in the modify_ftrace_direct path. 3/3 adds selftests for both cases. Acked-by: Steven Rostedt (Google) --- v4: https://patch.msgid.link/20251027175023.1521602-1-song@kernel.org Changes v3 => v4: 1. Add helper reset_direct. (Steven) 2. Add Reviewed-by from Jiri. 3. Fix minor typo in comments. v3: https://lore.kernel.org/bpf/20251026205445.1639632-1-song@kernel.org/ Changes v2 => v3: 1. Incorporate feedback by AI, which also fixes build error reported by Steven and kernel test robot. v2: https://lore.kernel.org/bpf/20251024182901.3247573-1-song@kernel.org/ Changes v1 => v2: 1. Target bpf tree. (Alexei) 2. Bring back the FTRACE_WARN_ON in __ftrace_hash_update_ipmodify for valid code paths. (Steven) 3. Update selftests with cleaner way to find livepatch-sample.ko. (offlline discussion with Ihor) v1: https://lore.kernel.org/bpf/20251024071257.3956031-1-song@kernel.org/ ==================== Signed-off-by: Alexei Starovoitov --- 156c75f596c98852c30981baea6c2cc8a7a411fc