> diff --git a/arch/powerpc/net/bpf_jit_comp.c b/arch/powerpc/net/bpf_jit_comp.c > index 8ca36a933c7a..c2717f0d9cdd 100644 > --- a/arch/powerpc/net/bpf_jit_comp.c > +++ b/arch/powerpc/net/bpf_jit_comp.c
[ ... ] > @@ -1425,10 +1427,12 @@ int bpf_arch_text_poke(void *ip, enum > bpf_text_poke_type old_t, > * 1. Update the address in the long branch stub: > * If new_addr is out of range, we will have to use the long branch > stub, so patch new_addr > * here. Otherwise, revert to dummy_tramp, but only if we had patched > old_addr here. > + * > + * dummy_tramp_addr moved to bottom of long branch stub. > */ This isn't a bug, but the comment "dummy_tramp_addr moved to bottom of long branch stub" describes how the layout changed rather than what it is now. Once merged, readers have nothing "before" to compare against. The updated diagram above bpf_arch_text_poke() already shows the .long <branch_addr>/<dummy_tramp> at the end of the long branch stub. Could the "moved to bottom" note go into the changelog, with the comment instead saying that dummy_tramp_addr is the last SZL bytes of the JITed image (so it lives at bpf_func_end - SZL)? > if ((new_addr && !is_offset_in_branch_range(new_addr - ip)) || > (old_addr && !is_offset_in_branch_range(old_addr - ip))) > - ret = patch_ulong((void *)(bpf_func_end - > bpf_jit_long_branch_stub - SZL), > + ret = patch_ulong((void *)(bpf_func_end - SZL), /* SZL: > dummy_tramp_addr offset */ > (new_addr && > !is_offset_in_branch_range(new_addr - ip)) ? > (unsigned long)new_addr : (unsigned > long)dummy_tramp); The trailing comment "/* SZL: dummy_tramp_addr offset */" could also be clearer. SZL is the size of the field, and the field sits SZL bytes before the end of the image. The combination of the expression bpf_func_end - SZL and the updated diagram already communicate this. --- AI reviewed your patch. Please fix the bug or email reply why it's not a bug. See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md CI run summary: https://github.com/kernel-patches/bpf/actions/runs/36381917401
