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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201121024616.1588175-7-andrii@kernel.org>
Date:   Fri, 20 Nov 2020 18:46:15 -0800
From:   Andrii Nakryiko <andrii@...nel.org>
To:     <bpf@...r.kernel.org>, <netdev@...r.kernel.org>, <ast@...com>,
        <daniel@...earbox.net>
CC:     <andrii@...nel.org>, <kernel-team@...com>
Subject: [PATCH bpf-next 6/7] selftests/bpf: make BPF sidecar traceable function global

Pahole currently isn't able to generate BTF for static functions in kernel
modules, so make sure traced sidecar function is global.

Signed-off-by: Andrii Nakryiko <andrii@...nel.org>
---
 tools/testing/selftests/bpf/bpf_sidecar/bpf_sidecar.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/bpf_sidecar/bpf_sidecar.c b/tools/testing/selftests/bpf/bpf_sidecar/bpf_sidecar.c
index 46f48c20d99b..a2f6d4a15a3f 100644
--- a/tools/testing/selftests/bpf/bpf_sidecar/bpf_sidecar.c
+++ b/tools/testing/selftests/bpf/bpf_sidecar/bpf_sidecar.c
@@ -10,7 +10,7 @@
 #define CREATE_TRACE_POINTS
 #include "bpf_sidecar-events.h"
 
-static noinline ssize_t
+noinline ssize_t
 bpf_sidecar_test_read(struct file *file, struct kobject *kobj,
 		      struct bin_attribute *bin_attr,
 		      char *buf, loff_t off, size_t len)
@@ -25,6 +25,7 @@ bpf_sidecar_test_read(struct file *file, struct kobject *kobj,
 
 	return -EIO; /* always fail */
 }
+EXPORT_SYMBOL(bpf_sidecar_test_read);
 ALLOW_ERROR_INJECTION(bpf_sidecar_test_read, ERRNO);
 
 static struct bin_attribute bin_attr_bpf_sidecar_file __ro_after_init = {
-- 
2.24.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ