android_kernel_sony_sdm845/tools
Repository files (latest commit first)
Filename Latest commit message Latest commit date
David Verbeiren af560e9b60 UPSTREAM: bpf: Zero-fill re-used per-cpu map element
[ Upstream commit d3bec0138bfbe58606fc1d6f57a4cdc1a20218db ]

Zero-fill element values for all other cpus than current, just as
when not using prealloc. This is the only way the bpf program can
ensure known initial values for all cpus ('onallcpus' cannot be
set when coming from the bpf program).

The scenario is: bpf program inserts some elements in a per-cpu
map, then deletes some (or userspace does). When later adding
new elements using bpf_map_update_elem(), the bpf program can
only set the value of the new elements for the current cpu.
When prealloc is enabled, previously deleted elements are re-used.
Without the fix, values for other cpus remain whatever they were
when the re-used entry was previously freed.

A selftest is added to validate correct operation in above
scenario as well as in case of LRU per-cpu map element re-use.

Fixes: 6c90598174 ("bpf: pre-allocate hash map elements")
Change-Id: I51fa789725ab02ee5eaf1c04bd8519135accf6a7
Signed-off-by: David Verbeiren <david.verbeiren@tessares.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20201104112332.15191-1-david.verbeiren@tessares.net
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Sorayukii <sorayukii69@gmail.com>
2026-05-15 17:58:12 +07:00
..
accounting This is the 4.9.219 stable release 2020-04-13 13:00:22 +02:00
arch x86/speculation: Rename RETPOLINE_AMD to RETPOLINE_LFENCE 2022-03-11 10:03:30 +01:00
build UPSTREAM: bpf: Add strict alignment flag for BPF_PROG_LOAD. 2026-05-15 17:54:40 +07:00
cgroup
firewire
gpio tools: gpio-hammer: Avoid potential overflow in main 2020-10-01 20:40:10 +02:00
hv Tools: hv: kvp: eliminate 'may be used uninitialized' warning 2019-09-10 10:31:02 +01:00
iio tools: iio: iio_utils: fix digit calculation 2022-11-03 23:49:16 +09:00
include UPSTREAM: bpf: JIT blinds support JMP32 2026-05-15 17:57:29 +07:00
kvm/kvm_stat tweewide: Fix most Shebang lines 2021-06-03 08:23:27 +02:00
laptop
lguest
lib UPSTREAM: bpf: Add sparc support to tools and samples. 2026-05-15 17:54:37 +07:00
net
nfsd
objtool BACKPORT: objtool: Add support for C jump tables 2026-05-15 17:58:01 +07:00
pcmcia
perf cgroup: make perf_event controller work on cgroup2 hierarchy 2026-05-15 17:50:32 +07:00
power cpupower: avoid multiple definition with gcc -fno-common 2020-04-02 17:20:31 +02:00
scripts tools: Let O= makes handle a relative path with -C option 2020-04-02 17:20:36 +02:00
spi
testing UPSTREAM: bpf: Zero-fill re-used per-cpu map element 2026-05-15 17:58:12 +07:00
thermal/tmon tools/thermal: tmon: fix for segfault 2018-05-30 07:50:43 +02:00
time
usb usb: testusb: Fix for showing the connection speed 2021-10-09 13:25:59 +02:00
virtio ptr_ring: fix up after recent ptr_ring changes 2018-11-10 07:42:50 -08:00
vm tools/vm/slabinfo-gnuplot: use "grep -E" instead of "egrep" 2022-12-08 11:15:41 +01:00
Makefile