linux-stable/tools/bpf/bpftool
Paolo Abeni 7e2b2e24e3 bpftool: fix percpu maps updating
[ Upstream commit b0ca5ecb8e ]

When updating a percpu map, bpftool currently copies the provided
value only into the first per CPU copy of the specified value,
all others instances are left zeroed.

This change explicitly copies the user-provided bytes to all the
per CPU instances, keeping the sub-command syntax unchanged.

v2 -> v3:
 - drop unused argument, as per Quentin's suggestion
v1 -> v2:
 - rename the helper as per Quentin's suggestion

Fixes: 71bb428fe2 ("tools: bpf: add bpftool")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-03-13 14:02:34 -07:00
..
bash-completion tools: bpftool: allow reuse of maps with bpftool prog load 2018-07-11 22:13:34 +02:00
Documentation tools: bpf: build and install man page for eBPF helpers from bpftool/ 2018-07-12 18:55:53 +02:00
.gitignore tools/bpftool: ignore build products 2018-07-26 02:50:26 +02:00
btf_dumper.c bpf: btf: add btf print functionality 2018-07-14 13:00:40 +02:00
cfg.c tools: bpftool: generate .dot graph from CFG information 2018-03-01 18:29:49 -08:00
cfg.h tools: bpftool: detect sub-programs from the eBPF sequence 2018-03-01 18:29:48 -08:00
cgroup.c bpftool: introduce cgroup tree command 2018-07-07 01:38:38 +02:00
common.c tools: bpftool: prevent infinite loop in get_fdinfo() 2018-12-17 09:24:30 +01:00
jit_disasm.c tools: bpftool: improve architecture detection by using ifindex 2018-01-18 01:26:15 +01:00
json_writer.c tools: bpftool: add JSON output for bpftool prog dump xlated * command 2017-10-24 01:25:08 +01:00
json_writer.h tools: bpftool: add JSON output for bpftool prog dump xlated * command 2017-10-24 01:25:08 +01:00
main.c tools: bpftool: drop unnecessary Author comments 2018-07-01 01:01:50 +02:00
main.h bpf: btf: add btf print functionality 2018-07-14 13:00:40 +02:00
Makefile tools: bpftool: don't pass FEATURES_DUMP to libbpf 2018-07-16 16:36:57 -07:00
map.c bpftool: fix percpu maps updating 2019-03-13 14:02:34 -07:00
map_perf_ring.c tools: bpftool: return from do_event_pipe() on bad arguments 2018-08-23 20:17:57 +02:00
perf.c tools/bpftool: fix a bug in bpftool perf 2018-06-13 02:03:17 +02:00
prog.c bpftool: Fix prog dump by tag 2019-03-13 14:02:34 -07:00
xlated_dumper.c tools: bpf: make use of reallocarray 2018-07-11 22:13:34 +02:00
xlated_dumper.h tools: bpftool: add delimiters to multi-function JITed dumps 2018-05-24 09:20:50 +02:00