diff options
author | Song Liu <songliubraving@fb.com> | 2022-02-04 10:57:35 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-02-07 18:13:01 -0800 |
commit | 3486bedd99196ecdfe99c0ab5b67ad3c47e8a8fa (patch) | |
tree | 14f258f23c25f941a2f33f9ff0b09587aa8e8028 /include | |
parent | fac54e2bfb5be2b0bbf115fe80d45f59fd773048 (diff) |
bpf: Use bytes instead of pages for bpf_jit_[charge|uncharge]_modmem
This enables sub-page memory charge and allocation.
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20220204185742.271030-3-song@kernel.org
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/bpf.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 6eb0b180d33b..366f88afd56b 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -846,8 +846,8 @@ void bpf_image_ksym_add(void *data, struct bpf_ksym *ksym); void bpf_image_ksym_del(struct bpf_ksym *ksym); void bpf_ksym_add(struct bpf_ksym *ksym); void bpf_ksym_del(struct bpf_ksym *ksym); -int bpf_jit_charge_modmem(u32 pages); -void bpf_jit_uncharge_modmem(u32 pages); +int bpf_jit_charge_modmem(u32 size); +void bpf_jit_uncharge_modmem(u32 size); bool bpf_prog_has_trampoline(const struct bpf_prog *prog); #else static inline int bpf_trampoline_link_prog(struct bpf_prog *prog, |