]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
libbpf: Initialize the bpf_seq_printf parameters array field by field
authorFlorent Revest <revest@chromium.org>
Mon, 19 Apr 2021 15:52:41 +0000 (17:52 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 19 Apr 2021 22:27:37 +0000 (15:27 -0700)
commit83cd92b46484aa8f64cdc0bff8ac6940d1f78519
tree6c622011982541acb65db2048999e6db1d4f3c9b
parent7b15523a989b63927c2bb08e9b5b0bbc10b58bef
libbpf: Initialize the bpf_seq_printf parameters array field by field

When initializing the __param array with a one liner, if all args are
const, the initial array value will be placed in the rodata section but
because libbpf does not support relocation in the rodata section, any
pointer in this array will stay NULL.

Fixes: c09add2fbc5a ("tools/libbpf: Add bpf_iter support")
Signed-off-by: Florent Revest <revest@chromium.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210419155243.1632274-5-revest@chromium.org
tools/lib/bpf/bpf_tracing.h