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
794794 void bpf_map_put(struct bpf_map *map);
795795 int bpf_map_charge_memlock(struct bpf_map *map, u32 pages);
796796 void bpf_map_uncharge_memlock(struct bpf_map *map, u32 pages);
797−int bpf_map_charge_init(struct bpf_map_memory *mem, size_t size);
797+int bpf_map_charge_init(struct bpf_map_memory *mem, u64 size);
798798 void bpf_map_charge_finish(struct bpf_map_memory *mem);
799799 void bpf_map_charge_move(struct bpf_map_memory *dst,
800800 struct bpf_map_memory *src);
801−void *bpf_map_area_alloc(size_t size, int numa_node);
802−void *bpf_map_area_mmapable_alloc(size_t size, int numa_node);
801+void *bpf_map_area_alloc(u64 size, int numa_node);
802+void *bpf_map_area_mmapable_alloc(u64 size, int numa_node);
803803 void bpf_map_area_free(void *base);
804804 void bpf_map_init_from_attr(struct bpf_map *map, union bpf_attr *attr);
805805

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