]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests: drv-net: xdp: Fix register spill error with clang 20
authorDimitri Daskalakis <dimitri.daskalakis1@gmail.com>
Thu, 13 Nov 2025 04:31:02 +0000 (20:31 -0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 15 Nov 2025 01:45:07 +0000 (17:45 -0800)
commite1215d1d38c00d244e5e7db4648598a0a03cc446
treefca5b8b5cbc2c99ca29757a754de92ab1326a23a
parentc7dc5b5228822d2389e6e441f10169e460bcc67a
selftests: drv-net: xdp: Fix register spill error with clang 20

On clang 20.1.8 the XDP program fails to load with a register spill error.
Since hdr_len is a __u32, the compiler decided it only needed the lower
32-bits of ctx->data, which later triggers the register spill verifier
error.

Suggested-by: Martin KaFai Lau <martin.lau@kernel.org>
Signed-off-by: Dimitri Daskalakis <dimitri.daskalakis1@gmail.com>
Link: https://patch.msgid.link/20251113043102.4062150-1-dimitri.daskalakis1@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/lib/xdp_native.bpf.c