History

bpf: Switch bpf_map_{area_alloc,area_mmapable_alloc}() to u64 size

Given we recently extended the original bpf_map_area_alloc() helper in commit fc9702273e2e ("bpf: Add mmap() support for BPF_MAP_TYPE_ARRAY"), we need to apply the same logic as in ff1c08e1f74b ("bpf: Change size to u64 for bpf_map_{area_alloc, charge_init}()"). To avoid conflicts, extend it for bpf-next.

Daniel Borkmann committed 6 years ago

Commit 196e8ca1 parent 91e60152 files · +10 −7Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/bpf.h+3−3
@@ -794,12 +794,12 @@ void bpf_map_put_with_uref(struct bpf_map *map); · 793 unmodified lines
794void bpf_map_put(struct bpf_map *map);794void bpf_map_put(struct bpf_map *map);
795int bpf_map_charge_memlock(struct bpf_map *map, u32 pages);795int bpf_map_charge_memlock(struct bpf_map *map, u32 pages);
796void bpf_map_uncharge_memlock(struct bpf_map *map, u32 pages);796void bpf_map_uncharge_memlock(struct bpf_map *map, u32 pages);
797int bpf_map_charge_init(struct bpf_map_memory *mem, size_t size);797int bpf_map_charge_init(struct bpf_map_memory *mem, u64 size);
798void bpf_map_charge_finish(struct bpf_map_memory *mem);798void bpf_map_charge_finish(struct bpf_map_memory *mem);
799void bpf_map_charge_move(struct bpf_map_memory *dst,799void bpf_map_charge_move(struct bpf_map_memory *dst,
800 struct bpf_map_memory *src);800 struct bpf_map_memory *src);
801void *bpf_map_area_alloc(size_t size, int numa_node);801void *bpf_map_area_alloc(u64 size, int numa_node);
802void *bpf_map_area_mmapable_alloc(size_t size, int numa_node);802void *bpf_map_area_mmapable_alloc(u64 size, int numa_node);
803void bpf_map_area_free(void *base);803void bpf_map_area_free(void *base);
804void bpf_map_init_from_attr(struct bpf_map *map, union bpf_attr *attr);804void bpf_map_init_from_attr(struct bpf_map *map, union bpf_attr *attr);
805 805

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t