Lines Matching refs:pages
94 fp->pages = size / PAGE_SIZE; in bpf_prog_alloc_no_stats()
221 u32 pages, delta; in bpf_prog_realloc() local
227 pages = size / PAGE_SIZE; in bpf_prog_realloc()
228 if (pages <= fp_old->pages) in bpf_prog_realloc()
231 delta = pages - fp_old->pages; in bpf_prog_realloc()
240 memcpy(fp, fp_old, fp_old->pages * PAGE_SIZE); in bpf_prog_realloc()
241 fp->pages = pages; in bpf_prog_realloc()
537 *symbol_end = addr + hdr->pages * PAGE_SIZE; in bpf_get_prog_addr_region()
767 static int bpf_jit_charge_modmem(u32 pages) in bpf_jit_charge_modmem() argument
769 if (atomic_long_add_return(pages, &bpf_jit_current) > in bpf_jit_charge_modmem()
772 atomic_long_sub(pages, &bpf_jit_current); in bpf_jit_charge_modmem()
780 static void bpf_jit_uncharge_modmem(u32 pages) in bpf_jit_uncharge_modmem() argument
782 atomic_long_sub(pages, &bpf_jit_current); in bpf_jit_uncharge_modmem()
809 u32 size, hole, start, pages; in bpf_jit_binary_alloc() local
816 pages = size / PAGE_SIZE; in bpf_jit_binary_alloc()
818 if (bpf_jit_charge_modmem(pages)) in bpf_jit_binary_alloc()
822 bpf_jit_uncharge_modmem(pages); in bpf_jit_binary_alloc()
830 hdr->pages = pages; in bpf_jit_binary_alloc()
843 u32 pages = hdr->pages; in bpf_jit_binary_free() local
846 bpf_jit_uncharge_modmem(pages); in bpf_jit_binary_free()
1042 fp = __vmalloc(fp_other->pages * PAGE_SIZE, gfp_flags, PAGE_KERNEL); in bpf_prog_clone_create()
1048 memcpy(fp, fp_other, fp_other->pages * PAGE_SIZE); in bpf_prog_clone_create()