Thread (40 messages) 40 messages, 7 authors, 2021-09-14

Re: [PATCH bpf-next] libbpf: fix build error introduced by legacy kprobe feature

From: Alexei Starovoitov <hidden>
Date: 2021-09-14 21:04:17

On Tue, Sep 14, 2021 at 1:36 PM Rafael David Tinoco
[off-list ref] wrote:
quoted hunk ↗ jump to hunk
Fix commit 467b3225553a ("libbpf: Introduce legacy kprobe events
support") build issue under FORTIFY_SOURCE.

Reported-by: sunyucong@gmail.com
Cc: andrii.nakryiko@gmail.com
Signed-off-by: Rafael David Tinoco <redacted>
---
 tools/lib/bpf/libbpf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 6ecfdc1fa7ba..b45eab3d30cd 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -8997,7 +8997,7 @@ static int poke_kprobe_events(bool add, const char *name, bool retprobe, uint64_
 {
        int fd, ret = 0;
        pid_t p = getpid();
-       char cmd[192], probename[128], probefunc[128];
+       char cmd[192] = "\0", probename[128] = "\0", probefunc[128] = "\0";
It doesn't look that it solves the issue:
https://github.com/kernel-patches/bpf/runs/3603448190
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help