BPF List
 help / color / mirror / Atom feed
* [PATCH bpf v2 0/7] Misc fixes for bpf
@ 2024-10-21  1:39 Hou Tao
  2024-10-21  1:39 ` [PATCH bpf v2 1/7] bpf: Add the missing BPF_LINK_TYPE invocation for sockmap Hou Tao
                   ` (7 more replies)
  0 siblings, 8 replies; 28+ messages in thread
From: Hou Tao @ 2024-10-21  1:39 UTC (permalink / raw)
  To: bpf
  Cc: Martin KaFai Lau, Alexei Starovoitov, Andrii Nakryiko,
	Eduard Zingerman, Song Liu, Hao Luo, Yonghong Song,
	Daniel Borkmann, KP Singh, Stanislav Fomichev, Jiri Olsa,
	John Fastabend, Yafang Shao, houtao1, xukuohai

From: Hou Tao <houtao1@huawei.com>

Hi,

The patch set is just a bundle of fixes. Patch #1 fixes the out-of-bound
for sockmap link fdinfo. Patch #2 adds a static assertion to guarantee
such out-of-bound access will never happen again. Patch #3 fixes the
kmemleak report when parsing the mount options for bpffs. Patch #4~#7
fix issues related to bits iterator.

Please check the individual patches for more details. And comments are
always welcome.

v2:
 * patch #1: update tools/include/uapi/linux/bpf.h as well (Alexei)
 * patch #2: new patch. Add a static assertion for bpf_link_type_strs[] (Andrii)
 * patch #4: doesn't set nr_bits to zero in bpf_iter_bits_next (Andrii)
 * patch #5: use 512 as the maximal value of nr_words
 * patch #6: change the type of both bits and bits_copy to u64 (Andrii)

v1: https://lore.kernel.org/bpf/20241008091718.3797027-1-houtao@huaweicloud.com/

Hou Tao (7):
  bpf: Add the missing BPF_LINK_TYPE invocation for sockmap
  bpf: Add assertion for the size of bpf_link_type_strs[]
  bpf: Preserve param->string when parsing mount options
  bpf: Free dynamically allocated bits in bpf_iter_bits_destroy()
  bpf: Check the validity of nr_words in bpf_iter_bits_new()
  bpf: Use __u64 to save the bits in bits iterator
  selftests/bpf: Test multiplication overflow of nr_bits in bits_iter

 include/linux/bpf_types.h                     |  7 +--
 include/uapi/linux/bpf.h                      |  3 ++
 kernel/bpf/helpers.c                          | 45 +++++++++++++++----
 kernel/bpf/inode.c                            |  5 ++-
 kernel/bpf/syscall.c                          |  2 +
 tools/include/uapi/linux/bpf.h                |  3 ++
 .../selftests/bpf/progs/verifier_bits_iter.c  | 14 ++++++
 7 files changed, 63 insertions(+), 16 deletions(-)

-- 
2.29.2


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

end of thread, other threads:[~2024-10-23  9:34 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-21  1:39 [PATCH bpf v2 0/7] Misc fixes for bpf Hou Tao
2024-10-21  1:39 ` [PATCH bpf v2 1/7] bpf: Add the missing BPF_LINK_TYPE invocation for sockmap Hou Tao
2024-10-21  1:39 ` [PATCH bpf v2 2/7] bpf: Add assertion for the size of bpf_link_type_strs[] Hou Tao
2024-10-21  8:18   ` Jiri Olsa
2024-10-21 23:02     ` Andrii Nakryiko
2024-10-22  7:35       ` Hou Tao
2024-10-22 17:40         ` Andrii Nakryiko
2024-10-22 20:26           ` Alexei Starovoitov
2024-10-22 20:41             ` Andrii Nakryiko
2024-10-21  1:40 ` [PATCH bpf v2 3/7] bpf: Preserve param->string when parsing mount options Hou Tao
2024-10-21  9:09   ` Jiri Olsa
2024-10-21  1:40 ` [PATCH bpf v2 4/7] bpf: Free dynamically allocated bits in bpf_iter_bits_destroy() Hou Tao
2024-10-21  2:45   ` Hou Tao
2024-10-21 23:07     ` Andrii Nakryiko
2024-10-22  7:25       ` Hou Tao
2024-10-21  1:40 ` [PATCH bpf v2 5/7] bpf: Check the validity of nr_words in bpf_iter_bits_new() Hou Tao
2024-10-21  9:51   ` Jiri Olsa
2024-10-21 23:09   ` Andrii Nakryiko
2024-10-23  3:17   ` Yafang Shao
2024-10-23  8:29     ` Hou Tao
2024-10-23  9:25       ` Yafang Shao
2024-10-23  9:34         ` Yafang Shao
2024-10-21  1:40 ` [PATCH bpf v2 6/7] bpf: Use __u64 to save the bits in bits iterator Hou Tao
2024-10-23  3:10   ` Yafang Shao
2024-10-23  8:09     ` Hou Tao
2024-10-21  1:40 ` [PATCH bpf v2 7/7] selftests/bpf: Test multiplication overflow of nr_bits in bits_iter Hou Tao
2024-10-21 23:11 ` [PATCH bpf v2 0/7] Misc fixes for bpf Andrii Nakryiko
2024-10-22  7:37   ` Hou Tao

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