aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c
diff options
context:
space:
mode:
authorDaniel Xu <[email protected]>2025-02-04 17:25:18 +0000
committerAlexei Starovoitov <[email protected]>2025-02-07 23:45:44 +0000
commit7968c6581507052c1c6484ee6c5cbe07381e2dbc (patch)
treed72736640b9d442a717f48ea8413652579e8eb3f /tools/testing/selftests/bpf/prog_tests/sockmap_basic.c
parentbpf: selftests: Test constant key extraction on irrelevant maps (diff)
downloadkernel-7968c6581507052c1c6484ee6c5cbe07381e2dbc.tar.gz
kernel-7968c6581507052c1c6484ee6c5cbe07381e2dbc.zip
bpf: verifier: Disambiguate get_constant_map_key() errors
Refactor get_constant_map_key() to disambiguate the constant key value from potential error values. In the case that the key is negative, it could be confused for an error. It's not currently an issue, as the verifier seems to track s32 spills as u32. So even if the program wrongly uses a negative value for an arraymap key, the verifier just thinks it's an impossibly high value which gets correctly discarded. Refactor anyways to make things cleaner and prevent potential future issues. Acked-by: Eduard Zingerman <[email protected]> Signed-off-by: Daniel Xu <[email protected]> Link: https://lore.kernel.org/r/dfe144259ae7cfc98aa63e1b388a14869a10632a.1738689872.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/sockmap_basic.c')
0 files changed, 0 insertions, 0 deletions