android_kernel_motorola_sm6375/kernel/bpf
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Daniel Borkmann c502faf941 bpf, lpm: fix overflows in trie_alloc checks
Cap the maximum (total) value size and bail out if larger than KMALLOC_MAX_SIZE
as otherwise it doesn't make any sense to proceed further, since we're
guaranteed to fail to allocate elements anyway in lpm_trie_node_alloc();
likleyhood of failure is still high for large values, though, similarly
as with htab case in non-prealloc.

Next, make sure that cost vars are really u64 instead of size_t, so that we
don't overflow on 32 bit and charge only tiny map.pages against memlock while
allowing huge max_entries; cap also the max cost like we do with other map
types.

Fixes: b95a5c4db0 ("bpf: add a longest prefix match trie map implementation")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-02-08 14:40:03 -05:00
..
arraymap.c bpf: don't trigger OOM killer under pressure with map alloc 2017-01-18 17:12:26 -05:00
bpf_lru_list.c
bpf_lru_list.h
cgroup.c
core.c bpf: add initial bpf tracepoints 2017-01-25 13:17:47 -05:00
hashtab.c bpf: don't trigger OOM killer under pressure with map alloc 2017-01-18 17:12:26 -05:00
helpers.c
inode.c bpf: add initial bpf tracepoints 2017-01-25 13:17:47 -05:00
lpm_trie.c bpf, lpm: fix overflows in trie_alloc checks 2017-02-08 14:40:03 -05:00
Makefile bpf: add a longest prefix match trie map implementation 2017-01-23 16:10:38 -05:00
percpu_freelist.c
percpu_freelist.h
stackmap.c bpf: don't trigger OOM killer under pressure with map alloc 2017-01-18 17:12:26 -05:00
syscall.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-01-28 10:33:06 -05:00
verifier.c bpf: enable verifier to add 0 to packet ptr 2017-02-06 22:50:04 -05:00