On Thu, Sep 24, 2026 at 10:35 PM Jose Fernandez (Anthropic) <[email protected]> wrote: > static inline void emit_kcfi(u32 hash, struct jit_ctx *ctx) > { > - if (IS_ENABLED(CONFIG_CFI)) > - emit_u32_data(hash, ctx); > + if (!IS_ENABLED(CONFIG_CFI)) > + return; > + > + emit_u32_data(hash, ctx); > + for (int i = 0; i < CONFIG_ARM64_FUNCTION_PREFIX_NOPS; i++) > + emit(A64_NOP, ctx); > }
For the series: Acked-by: Alexei Starovoitov <[email protected]> unrelated minor issue: ctx.offset[] is counted from ro_image, but bpf_prog_fill_jited_linfo() adds it to prog->bpf_func which is ro_image + cfi_get_offset(). So with CFI jited_line_info is already off by one insn. After this patch it will be off by 4 or 6. s390 does jit.addrs[i] -= cfi_get_offset(); before the call. Would be great to send a follow up eventually.
