diff options
author | Hou Tao <houtao1@huawei.com> | 2024-10-30 18:05:13 +0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2024-10-30 12:13:46 -0700 |
commit | 62a898b07b83f6f407003d8a70f0827a5af08a59 (patch) | |
tree | e101cca91dec00f46cc3a9e4aaeaf8cb6a451ca1 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 101ccfbabf4738041273ce64e2b116cf440dea13 (diff) |
bpf: Add bpf_mem_alloc_check_size() helper
Introduce bpf_mem_alloc_check_size() to check whether the allocation
size exceeds the limitation for the kmalloc-equivalent allocator. The
upper limit for percpu allocation is LLIST_NODE_SZ bytes larger than
non-percpu allocation, so a percpu argument is added to the helper.
The helper will be used in the following patch to check whether the size
parameter passed to bpf_mem_alloc() is too big.
Signed-off-by: Hou Tao <houtao1@huawei.com>
Link: https://lore.kernel.org/r/20241030100516.3633640-3-houtao@huaweicloud.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions