* [PATCH bpf-next v4 0/2] libbpf: Fix bpftool gen object segfault
@ 2024-12-06 1:58 Rong Tao
0 siblings, 0 replies; only message in thread
From: Rong Tao @ 2024-12-06 1:58 UTC (permalink / raw)
To: andrii.nakryiko, qmo, ast, daniel, andrii, rongtao
Cc: Martin KaFai Lau, Eduard Zingerman, Song Liu, Yonghong Song,
John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
open list:BPF [TOOLING] (bpftool),
open list
From: Rong Tao <rongtao@cestc.cn>
When the target file is used as input and output at the same time, the
input file will read a null value, resulting in a segmentation fault.
Add judgment conditions in bpftool and libbpf to prevent segmentation
error.
ChangeLog v2 -> v3:
- argc_cpy and argv_cpy need to be initialised _after_ the call to
GET_ARG()
ChangeLog v1 -> v2:
- Compare each output file.
v4: This patchset, double check and fix in libbpf.
v3: https://lore.kernel.org/lkml/tencent_A7A870BF168D6A21BA193408D5645D5D920A@qq.com/
v2: https://lore.kernel.org/lkml/tencent_F62A51AFF6A38188D70664421F5934974008@qq.com/
v1: https://lore.kernel.org/lkml/tencent_410B8166C55CD2AB64BDEA8E92204619180A@qq.com/
Rong Tao (2):
bpftool: Fix gen object segfault
libbpf: linker: Avoid using object file as both input and output
tools/bpf/bpftool/gen.c | 13 +++++++++++++
tools/lib/bpf/linker.c | 5 +++++
2 files changed, 18 insertions(+)
--
2.47.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-12-06 1:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-06 1:58 [PATCH bpf-next v4 0/2] libbpf: Fix bpftool gen object segfault Rong Tao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®