diff options
| author | Yuyang Huang <yuyanghuang@google.com> | 2026-05-31 10:56:00 +0300 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-05-31 19:16:55 +0300 |
| commit | 5add3a4ad1a3bc15404e8bd338813ed0a636f5c9 (patch) | |
| tree | 17bf7fff99c0650a45f3b59680d557ab56fb5a49 /include/linux/debugobjects.h | |
| parent | 21c4b99b27f3f85b89256e81b3e997dec0a460d0 (diff) | |
| download | linux-5add3a4ad1a3bc15404e8bd338813ed0a636f5c9.tar.xz | |
selftests/bpf: add verification for BPF_PROG_QUERY attr size boundaries
Add a new selftest to verify that the BPF syscall (specifically
BPF_PROG_QUERY) correctly handles different user-declared attribute sizes.
Specifically, verify that:
- For cgroup queries, a query with a size that covers 'prog_cnt' but is
smaller than 'revision' (OLD_QUERY_SIZE) succeeds, but does not write
to 'revision' (verifying backward compatibility).
- A query with full size (FULL_QUERY_SIZE) succeeds and writes both
'prog_cnt' and 'revision'.
Fixes: 120933984460 ("bpf: Implement mprog API on top of existing cgroup progs")
Cc: Maciej Żenczykowski <maze@google.com>
Cc: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: Yuyang Huang <yuyanghuang@google.com>
Link: https://lore.kernel.org/r/20260531075600.4058207-3-yuyanghuang@google.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
