lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200703181719.3747072-1-songliubraving@fb.com>
Date:   Fri, 3 Jul 2020 11:17:19 -0700
From:   Song Liu <songliubraving@...com>
To:     <bpf@...r.kernel.org>, <netdev@...r.kernel.org>
CC:     <ast@...nel.org>, <daniel@...earbox.net>, <kernel-team@...com>,
        <john.fastabend@...il.com>, <kpsingh@...omium.org>,
        <brouer@...hat.com>, Song Liu <songliubraving@...com>
Subject: [PATCH bpf-next] selftests/bpf: fix compilation error of bpf_iter_task_stack.c

selftests/bpf shows compilation error as

  libbpf: invalid relo for 'entries' in special section 0xfff2; forgot to
  initialize global var?..

Fix it by initializing 'entries' to zeros.

Fixes: c7568114bc56 ("selftests/bpf: Add bpf_iter test with bpf_get_task_stack()")
Reported-by: Jesper Dangaard Brouer <brouer@...hat.com>
Signed-off-by: Song Liu <songliubraving@...com>
---
 tools/testing/selftests/bpf/progs/bpf_iter_task_stack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/progs/bpf_iter_task_stack.c b/tools/testing/selftests/bpf/progs/bpf_iter_task_stack.c
index e40d32a2ed93d..65899cc71d535 100644
--- a/tools/testing/selftests/bpf/progs/bpf_iter_task_stack.c
+++ b/tools/testing/selftests/bpf/progs/bpf_iter_task_stack.c
@@ -7,7 +7,7 @@
 char _license[] SEC("license") = "GPL";
 
 #define MAX_STACK_TRACE_DEPTH   64
-unsigned long entries[MAX_STACK_TRACE_DEPTH];
+unsigned long entries[MAX_STACK_TRACE_DEPTH] = {0};
 #define SIZE_OF_ULONG (sizeof(unsigned long))
 
 SEC("iter/task")
-- 
2.24.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ