diff options
| author | Hou Tao <[email protected]> | 2023-12-15 10:07:05 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2023-12-15 21:54:55 +0000 |
| commit | d6d1e6c17cab2dcb7b8530c599f00e7de906d380 (patch) | |
| tree | 8ec04ed42b761af3105deb4660c8ca566664e2ca /tools/net/ynl/generated/devlink-user.c | |
| parent | bpf: Limit the number of uprobes when attaching program to multiple uprobes (diff) | |
| download | kernel-d6d1e6c17cab2dcb7b8530c599f00e7de906d380.tar.gz kernel-d6d1e6c17cab2dcb7b8530c599f00e7de906d380.zip | |
bpf: Limit the number of kprobes when attaching program to multiple kprobes
An abnormally big cnt may also be assigned to kprobe_multi.cnt when
attaching multiple kprobes. It will trigger the following warning in
kvmalloc_node():
if (unlikely(size > INT_MAX)) {
WARN_ON_ONCE(!(flags & __GFP_NOWARN));
return NULL;
}
Fix the warning by limiting the maximal number of kprobes in
bpf_kprobe_multi_link_attach(). If the number of kprobes is greater than
MAX_KPROBE_MULTI_CNT, the attachment will fail and return -E2BIG.
Fixes: 0dcac2725406 ("bpf: Add multi kprobe link")
Signed-off-by: Hou Tao <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Acked-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/net/ynl/generated/devlink-user.c')
0 files changed, 0 insertions, 0 deletions
