Re: [PATCH bpf-next v2 5/8] bpf, x86: emit KASAN checks into x86 JITed programs
From: Alexis Lothoré
Date: Fri Jun 05 2026 - 12:07:40 EST
Hi Yonghong,
On Fri Jun 5, 2026 at 4:54 PM CEST, Yonghong Song wrote:
>
[...]
>> if (BPF_MODE(insn->code) == BPF_PROBE_MEMSX ||
>> BPF_MODE(insn->code) == BPF_MEMSX)
>> @@ -2592,13 +2622,13 @@ static int do_jit(struct bpf_verifier_env *env, struct bpf_prog *bpf_prog, int *
>> fallthrough;
>> case BPF_STX | BPF_ATOMIC | BPF_W:
>> case BPF_STX | BPF_ATOMIC | BPF_DW:
>> + bool is64 = BPF_SIZE(insn->code) == BPF_DW;
>> + u32 real_src_reg = src_reg;
>> + u32 real_dst_reg = dst_reg;
>
> With llvm23, I got the following build failure:
>
> /home/yhs/work/bpf-next/arch/x86/net/bpf_jit_comp.c:2625:4: error:
> label followed by a declaration is a C23 extension [-Werror,-Wc23-extensions]
> 2625 | bool is64 = BPF_SIZE(insn->code) == BPF_DW;
> | ^
> 1 error generated.
>
> The below is a fix:
Thanks for the test, the report and the fix. So this warning looks
specific to llvm23, as CI does not trigger it with LLVM21. I'll bring
the fix in in the next revision.
Alexis
--
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com