BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 0/3] bpf: Check tail zero of bpf_map_info and bpf_prog_info
@ 2026-06-04 15:05 Leon Hwang
  2026-06-04 15:05 ` [PATCH bpf-next v2 1/3] bpf: Check tail zero of bpf_map_info Leon Hwang
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Leon Hwang @ 2026-06-04 15:05 UTC (permalink / raw)
  To: bpf
  Cc: Alexei Starovoitov, Daniel Borkmann, John Fastabend,
	Andrii Nakryiko, Martin KaFai Lau, Eduard Zingerman,
	Kumar Kartikeya Dwivedi, Song Liu, Yonghong Song, Jiri Olsa,
	Shuah Khan, Yuyang Huang, Leon Hwang, KP Singh, Dave Marchevsky,
	Stanislav Fomichev, linux-kernel, linux-kselftest,
	kernel-patches-bot

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/20260518145446.6794-2-leon.hwang@linux.dev/

Changes:
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/20260603144518.67065-1-leon.hwang@linux.dev/

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-06-05  1:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-04 15:05 [PATCH bpf-next v2 0/3] bpf: Check tail zero of bpf_map_info and bpf_prog_info Leon Hwang
2026-06-04 15:05 ` [PATCH bpf-next v2 1/3] bpf: Check tail zero of bpf_map_info Leon Hwang
2026-06-04 15:45   ` bot+bpf-ci
2026-06-04 16:39     ` Alexei Starovoitov
2026-06-05  1:56       ` Leon Hwang
2026-06-04 15:05 ` [PATCH bpf-next v2 2/3] bpf: Check tail zero of bpf_prog_info Leon Hwang
2026-06-04 15:34   ` sashiko-bot
2026-06-04 15:45   ` bot+bpf-ci
2026-06-04 15:05 ` [PATCH bpf-next v2 3/3] selftests/bpf: Add tests to verify checking padding bytes for bpf_[map,prog]_info Leon Hwang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox