]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
bpf: Allow instructions with arena source and non-arena dest registers
authorEmil Tsalapatis <emil@etsalapatis.com>
Sun, 12 Apr 2026 17:45:38 +0000 (13:45 -0400)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 12 Apr 2026 19:47:39 +0000 (12:47 -0700)
commitac61bffe91d4bda08806e12957c6d64756d042db
tree7248935da78a7686f9665c217e337bf3deb68395
parent9623c3c69e51aaa096f3770655994d7a1992358d
bpf: Allow instructions with arena source and non-arena dest registers

The compiler sometimes stores the result of a PTR_TO_ARENA and SCALAR
operation into the scalar register rather than the pointer register.
Relax the verifier to allow operations between a source arena register
and a destination non-arena register, marking the destination's value
as a PTR_TO_ARENA.

Signed-off-by: Emil Tsalapatis <emil@etsalapatis.com>
Acked-by: Song Liu <song@kernel.org>
Fixes: 6082b6c328b5 ("bpf: Recognize addr_space_cast instruction in the verifier.")
Link: https://lore.kernel.org/r/20260412174546.18684-2-emil@etsalapatis.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c