BPF List
 help / color / mirror / Atom feed
* [RESEND][PATCH bpf 0/2] Check the remaining info_cnt before repeating btf fields
@ 2024-09-11 11:05 Hou Tao
  2024-09-11 11:05 ` [RESEND][PATCH bpf 1/2] bpf: " Hou Tao
  2024-09-11 11:05 ` [RESEND][PATCH bpf 2/2] selftests/bpf: Add more test case for field flattening Hou Tao
  0 siblings, 2 replies; 11+ messages in thread
From: Hou Tao @ 2024-09-11 11:05 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, Kui-Feng Lee, houtao1, xukuohai

From: Hou Tao <houtao1@huawei.com>

Hi,

The patch set adds the missed check again info_cnt when flattening the
array of nested struct. The problem was spotted when developing dynptr
key support for hash map. Patch #1 adds the missed check and patch #2
adds three success test cases and one failure test case for the problem.

Comments are always welcome.

Hou Tao (2):
  bpf: Check the remaining info_cnt before repeating btf fields
  selftests/bpf: Add more test case for field flattening

 kernel/bpf/btf.c                              |  6 ++
 .../selftests/bpf/prog_tests/cpumask.c        |  1 +
 .../selftests/bpf/progs/cpumask_failure.c     | 35 +++++++++
 .../selftests/bpf/progs/cpumask_success.c     | 78 ++++++++++++++++++-
 4 files changed, 118 insertions(+), 2 deletions(-)

-- 
2.29.2


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

end of thread, other threads:[~2024-09-12 19:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-11 11:05 [RESEND][PATCH bpf 0/2] Check the remaining info_cnt before repeating btf fields Hou Tao
2024-09-11 11:05 ` [RESEND][PATCH bpf 1/2] bpf: " Hou Tao
2024-09-11 17:37   ` Eduard Zingerman
2024-09-12  1:20     ` Hou Tao
2024-09-12  3:03       ` Eduard Zingerman
2024-09-12  3:14         ` Eduard Zingerman
     [not found]     ` <CAFVMQ6Q64aFM7xCW_htrU0dpB+S+eEXYLSeUufTgg_eB5DEN4g@mail.gmail.com>
2024-09-12 19:45       ` Eduard Zingerman
2024-09-11 11:05 ` [RESEND][PATCH bpf 2/2] selftests/bpf: Add more test case for field flattening Hou Tao
2024-09-11 17:07   ` Eduard Zingerman
2024-09-12  1:05     ` Hou Tao
2024-09-12  2:31       ` Eduard Zingerman

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