linux/kernel/bpf
Vasily Averin 3ce3df5d00 bpf: map_seq_next should always increase position index
[ Upstream commit 90435a7891 ]

If seq_file .next fuction does not change position index,
read after some lseek can generate an unexpected output.

See also: https://bugzilla.kernel.org/show_bug.cgi?id=206283

v1 -> v2: removed missed increment in end of function

Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/eca84fdd-c374-a154-d874-6c7b55fc3bc4@virtuozzo.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-02-24 08:36:58 +01:00
..
arraymap.c
bpf_lru_list.c
bpf_lru_list.h
btf.c bpf: Clean up indentation issue in BTF kflag processing 2019-09-26 17:09:18 +02:00
cgroup.c bpf: cgroup: prevent out-of-order release of cgroup bpf 2020-01-17 19:48:21 +01:00
core.c bpf: Fix use after free in subprog's jited symbol removal 2019-10-22 11:26:09 -07:00
cpumap.c
devmap.c bpf, devmap: Pass lockdep expression to RCU lists 2020-02-11 04:35:29 -08:00
disasm.c
disasm.h
hashtab.c
helpers.c
inode.c bpf: map_seq_next should always increase position index 2020-02-24 08:36:58 +01:00
local_storage.c
lpm_trie.c
Makefile
map_in_map.c
map_in_map.h
offload.c bpf, offload: Unlock on error in bpf_offload_dev_create() 2019-11-07 00:20:27 +01:00
percpu_freelist.c
percpu_freelist.h
queue_stack_maps.c
reuseport_array.c
stackmap.c bpf/stackmap: Fix deadlock with rq_lock in bpf_get_stack() 2019-12-31 16:44:09 +01:00
syscall.c bpf: Change size to u64 for bpf_map_{area_alloc, charge_init}() 2019-10-31 21:41:33 +01:00
sysfs_btf.c
tnum.c bpf: Fix incorrect verifier simulation of ARSH under ALU32 2020-01-23 08:22:44 +01:00
verifier.c bpf: Fix incorrect verifier simulation of ARSH under ALU32 2020-01-23 08:22:44 +01:00
xskmap.c