Skip to content

bpf: Check tail zero of bpf_map_info and bpf_prog_info

Leon Hwang bpf linux-kselftest lkml 3 versions – Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 0 repliesApplied 3/3
  2. v23 patches 2 repliesSuperseded
  3. v13 patches 4 repliesSuperseded

Changes in v3 from the cover letter

* Add "__u32 :32" to bpf_map_info and bpf_prog_info (per Alexei).
* v2: https://lore.kernel.org/bpf/[email protected]/

Patches in v3 All 3 applied

#Subject and filesSizeRepliesApplied
1/3bpf: Check tail zero of bpf_map_infoinclude/uapi/linux/bpf.h kernel/bpf/syscall.c tools/include/uapi/linux/bpf.h+5 -20 repliesApplied
2/3bpf: Check tail zero of bpf_prog_infoinclude/uapi/linux/bpf.h kernel/bpf/syscall.c tools/include/uapi/linux/bpf.h+5 -20 repliesApplied
3/3selftests/bpf: Add tests to verify checking padding bytes for bpf_[map,prog]_infotools/testing/selftests/bpf/prog_tests/bpf_attr_size.c+55 -00 repliesApplied

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchMykyta Yatsenko
1/3A-b
2/3A-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH bpf-next v3 0/3] bpf: Check tail zero of bpf_map_info and bpf_prog_info

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]/

Changes:
v2 -> v3:
* Add "__u32 :32" to bpf_map_info and bpf_prog_info (per Alexei).
* v2: https://lore.kernel.org/bpf/[email protected]/

v1 -> v2:
* Collect Acked-by tags from Mykyta, thanks.
* Update Fixes tag in patch #2 (per bot+bpf-ci)
* v1: 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
 include/uapi/linux/bpf.h                      |  2 +
 kernel/bpf/syscall.c                          | 10 ++--
 tools/include/uapi/linux/bpf.h                |  2 +
 .../selftests/bpf/prog_tests/bpf_attr_size.c  | 55 +++++++++++++++++++
 4 files changed, 65 insertions(+), 4 deletions(-)
Signature · 1 line
2.54.0