aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/progs/test_core_extern.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andriin@fb.com>2019-12-18 16:28:34 -0800
committerAlexei Starovoitov <ast@kernel.org>2019-12-18 17:33:36 -0800
commit81bfdd087bf31a87c5ff25cc7004d5308954a35c (patch)
tree364a9d81d8f7bd736c22c12e5e7795be1fd50dd6 /tools/testing/selftests/bpf/progs/test_core_extern.c
parentlibbpf: Add bpf_link__disconnect() API to preserve underlying BPF resource (diff)
downloadlinux-dev-81bfdd087bf31a87c5ff25cc7004d5308954a35c.tar.xz
linux-dev-81bfdd087bf31a87c5ff25cc7004d5308954a35c.zip
libbpf: Put Kconfig externs into .kconfig section
Move Kconfig-provided externs into custom .kconfig section. Add __kconfig into bpf_helpers.h for user convenience. Update selftests accordingly. Suggested-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20191219002837.3074619-2-andriin@fb.com
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_core_extern.c')
-rw-r--r--tools/testing/selftests/bpf/progs/test_core_extern.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/tools/testing/selftests/bpf/progs/test_core_extern.c b/tools/testing/selftests/bpf/progs/test_core_extern.c
index e12f09f9e881..9bfc91d9d004 100644
--- a/tools/testing/selftests/bpf/progs/test_core_extern.c
+++ b/tools/testing/selftests/bpf/progs/test_core_extern.c
@@ -10,16 +10,16 @@
/* non-existing BPF helper, to test dead code elimination */
static int (*bpf_missing_helper)(const void *arg1, int arg2) = (void *) 999;
-extern int LINUX_KERNEL_VERSION;
-extern bool CONFIG_BPF_SYSCALL; /* strong */
-extern enum libbpf_tristate CONFIG_TRISTATE __weak;
-extern bool CONFIG_BOOL __weak;
-extern char CONFIG_CHAR __weak;
-extern uint16_t CONFIG_USHORT __weak;
-extern int CONFIG_INT __weak;
-extern uint64_t CONFIG_ULONG __weak;
-extern const char CONFIG_STR[8] __weak;
-extern uint64_t CONFIG_MISSING __weak;
+extern int LINUX_KERNEL_VERSION __kconfig;
+extern bool CONFIG_BPF_SYSCALL __kconfig; /* strong */
+extern enum libbpf_tristate CONFIG_TRISTATE __kconfig __weak;
+extern bool CONFIG_BOOL __kconfig __weak;
+extern char CONFIG_CHAR __kconfig __weak;
+extern uint16_t CONFIG_USHORT __kconfig __weak;
+extern int CONFIG_INT __kconfig __weak;
+extern uint64_t CONFIG_ULONG __kconfig __weak;
+extern const char CONFIG_STR[8] __kconfig __weak;
+extern uint64_t CONFIG_MISSING __kconfig __weak;
uint64_t kern_ver = -1;
uint64_t bpf_syscall = -1;