aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/bpf_cookie.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <[email protected]>2022-08-15 17:19:29 -0700
committerDaniel Borkmann <[email protected]>2022-08-17 22:43:58 +0200
commitdf78da27260c915039b348b164bbc53fa372ba70 (patch)
treebdc324ba085f94b9c347627ebb06b9a07b6f3943 /tools/testing/selftests/bpf/prog_tests/bpf_cookie.c
parentabf84b64e36b175c9c4dd4ecbad2af4329c00041 (diff)
selftests/bpf: Few fixes for selftests/bpf built in release mode
Fix few issues found when building and running test_progs in release mode. First, potentially uninitialized idx variable in xskxceiver, force-initialize to zero to satisfy compiler. Few instances of defining uprobe trigger functions break in release mode unless marked as noinline, due to being static. Add noinline to make sure everything works. Signed-off-by: Andrii Nakryiko <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Hao Luo <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/bpf_cookie.c')
-rw-r--r--tools/testing/selftests/bpf/prog_tests/bpf_cookie.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/bpf_cookie.c b/tools/testing/selftests/bpf/prog_tests/bpf_cookie.c
index 2974b44f80fa..2be2d61954bc 100644
--- a/tools/testing/selftests/bpf/prog_tests/bpf_cookie.c
+++ b/tools/testing/selftests/bpf/prog_tests/bpf_cookie.c
@@ -13,7 +13,7 @@
#include "kprobe_multi.skel.h"
/* uprobe attach point */
-static void trigger_func(void)
+static noinline void trigger_func(void)
{
asm volatile ("");
}