Commit d8d2d9d1 authored by Paul Chaignon's avatar Paul Chaignon Committed by Alexei Starovoitov
Browse files

selftests/bpf: Test for unaligned flow_dissector ctx access



This patch adds tests for two context fields where unaligned accesses
were not properly rejected.

Note the new macro is similar to the existing narrow_load macro, but we
need a different description and access offset. Combining the two
macros into one is probably doable but I don't think it would help
readability.

vmlinux.h is included in place of bpf.h so we have the definition of
struct bpf_nf_ctx.

Signed-off-by: default avatarPaul Chaignon <paul.chaignon@gmail.com>
Tested-by: default avatarEduard Zingerman <eddyz87@gmail.com>
Acked-by: default avatarYonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/bf014046ddcf41677fb8b98d150c14027e9fddba.1754039605.git.paul.chaignon@gmail.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent f914876e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment