BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/2] bpf: Fix warning in check_obj_size()
@ 2023-12-16 13:10 Hou Tao
  2023-12-16 13:10 ` [PATCH bpf-next 1/2] bpf: Use c->unit_size to select target cache during free Hou Tao
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Hou Tao @ 2023-12-16 13:10 UTC (permalink / raw)
  To: bpf
  Cc: Martin KaFai Lau, Alexei Starovoitov, Andrii Nakryiko, Song Liu,
	Hao Luo, Yonghong Song, Daniel Borkmann, KP Singh,
	Stanislav Fomichev, Jiri Olsa, John Fastabend, kernel test robot,
	houtao1

From: Hou Tao <houtao1@huawei.com>

Hi,

The patch set aims to fix the warning in check_obj_size() as reported by
lkp [1]. Patch #1 fixes the warning by selecting target cache for free
request through c->unit_size, so the unnecessary adjustment of
size_index and the checking in check_obj_size() can be removed. Patch #2
fixes the test failure in test_bpf_ma after applying patch #1.

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

[1]: https://lore.kernel.org/bpf/202310302113.9f8fe705-oliver.sang@intel.com/

Hou Tao (2):
  bpf: Use c->unit_size to select target cache during free
  selftests/bpf: Remove tests for zeroed-array kptr

 kernel/bpf/memalloc.c                         | 105 ++----------------
 .../testing/selftests/bpf/progs/test_bpf_ma.c | 100 ++++++++---------
 2 files changed, 60 insertions(+), 145 deletions(-)

-- 
2.29.2


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

end of thread, other threads:[~2023-12-20 21:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-16 13:10 [PATCH bpf-next 0/2] bpf: Fix warning in check_obj_size() Hou Tao
2023-12-16 13:10 ` [PATCH bpf-next 1/2] bpf: Use c->unit_size to select target cache during free Hou Tao
2023-12-16 13:10 ` [PATCH bpf-next 2/2] selftests/bpf: Remove tests for zeroed-array kptr Hou Tao
2023-12-20 21:40 ` [PATCH bpf-next 0/2] bpf: Fix warning in check_obj_size() patchwork-bot+netdevbpf

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