Check the tail bytes of bpf_map_info and bpf_prog_info due to padding when getting map info and prog info via BPF_OBJ_GET_INFO_BY_FD, which was discussed in the thread "bpf: Check tail zero of bpf_common_attr using offsetofend" [1].
Links: [1] https://lore.kernel.org/bpf/[email protected]/ Leon Hwang (3): bpf: Check tail zero of bpf_map_info bpf: Check tail zero of bpf_prog_info selftests/bpf: Add tests to verify checking padding bytes for bpf_[map,prog]_info kernel/bpf/syscall.c | 10 ++-- .../selftests/bpf/prog_tests/bpf_attr_size.c | 55 +++++++++++++++++++ 2 files changed, 61 insertions(+), 4 deletions(-) -- 2.54.0

