Hello:
This patch was applied to bpf/bpf.git (master) by Alexei Starovoitov ast@kernel.org:
On Sat, 24 Dec 2022 21:31:46 +0800 you wrote:
In the scenario where livepatch and kretfunc coexist, the pageattr of im->image is rox after arch_prepare_bpf_trampoline in bpf_trampoline_update, and then modify_fentry or register_fentry returns -EAGAIN from bpf_tramp_ftrace_ops_func, the BPF_TRAMP_F_ORIG_STACK flag will be configured, and arch_prepare_bpf_trampoline will be re-executed.
At this time, because the pageattr of im->image is rox, arch_prepare_bpf_trampoline will read and write im->image, which causes a fault. as follows:
[...]
Here is the summary with links: - bpf: Fix panic due to wrong pageattr of im->image https://git.kernel.org/bpf/bpf/c/9ed1d9aeef58
You are awesome, thank you!