BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 0/4] bpf: Fix warnings in kvmalloc_node()
@ 2023-12-13 11:25 Hou Tao
  2023-12-13 11:25 ` [PATCH bpf-next v2 1/4] bpf: Limit the number of uprobes when attaching program to multiple uprobes Hou Tao
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Hou Tao @ 2023-12-13 11:25 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, xingwei lee,
	houtao1

From: Hou Tao <houtao1@huawei.com>

Hi,

The patch set aims to fix the warnings in kvmalloc_node() when passing
an abnormally big cnt during multiple kprobes/uprobes attachment.

Patch #1 and #2 fix the warning by limiting the maximal number of
uprobes/kprobes. Patch #3 and #4 add tests to ensure these warnings are
fixed.

Please see individual patches for more details. Comments are always
welcome.

Change Log:
v2:
  * limit the number of uprobes/kprobes instead of suppressing the
    out-of-memory warning message (Alexei)
  * provide a faked non-zero offsets to simplify the multiple uprobe
    test (Jiri)

v1: https://lore.kernel.org/bpf/20231211112843.4147157-1-houtao@huaweicloud.com/
  
Hou Tao (4):
  bpf: Limit the number of uprobes when attaching program to multiple
    uprobes
  bpf: Limit the number of kprobes when attaching program to multiple
    kprobes
  selftests/bpf: Add test for abnormal cnt during multi-uprobe
    attachment
  selftests/bpf: Add test for abnormal cnt during multi-kprobe
    attachment

 kernel/trace/bpf_trace.c                      |  7 ++--
 .../bpf/prog_tests/kprobe_multi_test.c        | 14 ++++++++
 .../bpf/prog_tests/uprobe_multi_test.c        | 33 ++++++++++++++++++-
 3 files changed, 51 insertions(+), 3 deletions(-)

-- 
2.29.2


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

end of thread, other threads:[~2023-12-14  4:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-13 11:25 [PATCH bpf-next v2 0/4] bpf: Fix warnings in kvmalloc_node() Hou Tao
2023-12-13 11:25 ` [PATCH bpf-next v2 1/4] bpf: Limit the number of uprobes when attaching program to multiple uprobes Hou Tao
2023-12-13 11:25 ` [PATCH bpf-next v2 2/4] bpf: Limit the number of kprobes when attaching program to multiple kprobes Hou Tao
2023-12-13 23:32   ` Andrii Nakryiko
2023-12-14  1:00     ` Hou Tao
2023-12-13 11:25 ` [PATCH bpf-next v2 3/4] selftests/bpf: Add test for abnormal cnt during multi-uprobe attachment Hou Tao
2023-12-13 14:43   ` Jiri Olsa
2023-12-14  1:02     ` Hou Tao
2023-12-13 11:25 ` [PATCH bpf-next v2 4/4] selftests/bpf: Add test for abnormal cnt during multi-kprobe attachment Hou Tao
2023-12-13 23:33   ` Andrii Nakryiko
2023-12-14  1:44     ` Hou Tao
2023-12-14  4:26       ` Andrii Nakryiko
2023-12-13 14:42 ` [PATCH bpf-next v2 0/4] bpf: Fix warnings in kvmalloc_node() Jiri Olsa

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