aboutsummaryrefslogtreecommitdiff
path: root/kernel/audit_watch.c
diff options
context:
space:
mode:
authorSong Liu <[email protected]>2022-03-11 12:11:35 -0800
committerAlexei Starovoitov <[email protected]>2022-03-20 19:07:14 -0700
commitef078600eec20f20eb7833cf597d4a5edf2953c1 (patch)
tree0aeb39efa44e717abe934c9ccdbd68459b337471 /kernel/audit_watch.c
parent46e9244b2563cc53acc63b57f5eb2999fa729c60 (diff)
bpf: Select proper size for bpf_prog_pack
Using HPAGE_PMD_SIZE as the size for bpf_prog_pack is not ideal in some cases. Specifically, for NUMA systems, __vmalloc_node_range requires PMD_SIZE * num_online_nodes() to allocate huge pages. Also, if the system does not support huge pages (i.e., with cmdline option nohugevmalloc), it is better to use PAGE_SIZE packs. Add logic to select proper size for bpf_prog_pack. This solution is not ideal, as it makes assumption about the behavior of module_alloc and __vmalloc_node_range. However, it appears to be the easiest solution as it doesn't require changes in module_alloc and vmalloc code. Fixes: 57631054fae6 ("bpf: Introduce bpf_prog_pack allocator") Signed-off-by: Song Liu <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'kernel/audit_watch.c')
0 files changed, 0 insertions, 0 deletions