diff options
author | 2024-10-30 18:05:13 +0800 | |
---|---|---|
committer | 2024-10-30 12:13:46 -0700 | |
commit | 62a898b07b83f6f407003d8a70f0827a5af08a59 (patch) | |
tree | e101cca91dec00f46cc3a9e4aaeaf8cb6a451ca1 /scripts/generate_rust_analyzer.py | |
parent | bpf: Free dynamically allocated bits in bpf_iter_bits_destroy() (diff) | |
download | linux-rng-62a898b07b83f6f407003d8a70f0827a5af08a59.tar.xz linux-rng-62a898b07b83f6f407003d8a70f0827a5af08a59.zip |
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 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions