aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/autoload.c
diff options
context:
space:
mode:
authorDavid Vernet <[email protected]>2023-01-28 08:15:37 -0600
committerAlexei Starovoitov <[email protected]>2023-01-28 12:21:40 -0800
commitcb4a21ea592f5753ab54cd8688306cf6423783a8 (patch)
treefdcc4ac5a343d517505452918798e38615e8e097 /tools/testing/selftests/bpf/prog_tests/autoload.c
parent70eb3911d80f548a76fb9a40c8a3fd93ac061a42 (diff)
bpf: Build-time assert that cpumask offset is zero
The first element of a struct bpf_cpumask is a cpumask_t. This is done to allow struct bpf_cpumask to be cast to a struct cpumask. If this element were ever moved to another field, any BPF program passing a struct bpf_cpumask * to a kfunc expecting a const struct cpumask * would immediately fail to load. Add a build-time assertion so this is assumption is captured and verified. Signed-off-by: David Vernet <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/autoload.c')
0 files changed, 0 insertions, 0 deletions