summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/test_get_stack_rawtp.c
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2019-07-15 23:02:17 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2019-07-15 23:02:17 +0200
commit896bcc908a2f422acf604ad0717aee593f3e823f (patch)
treedcc396b062456daa3af5a598587dfbc604aa7c8c /tools/testing/selftests/bpf/progs/test_get_stack_rawtp.c
parentaf3c24e0e2ed25177b03b60ada9117bb596e8d95 (diff)
parent8981e56fa17282598571958ae6a29cbc3209a6cb (diff)
Merge branch 'bpf-btf-size-verification-fix'
Andrii Nakryiko says: ==================== BTF size resolution logic isn't always resolving type size correctly, leading to erroneous map creation failures due to value size mismatch. This patch set: 1. fixes the issue (patch #1); 2. adds tests for trickier cases (patch #2); 3. and converts few test cases utilizing BTF-defined maps, that previously couldn't use typedef'ed arrays due to kernel bug (patch #3). ==================== Acked-by: Yonghong Song <yhs@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_get_stack_rawtp.c')
-rw-r--r--tools/testing/selftests/bpf/progs/test_get_stack_rawtp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/progs/test_get_stack_rawtp.c b/tools/testing/selftests/bpf/progs/test_get_stack_rawtp.c
index d06b47a09097..33254b771384 100644
--- a/tools/testing/selftests/bpf/progs/test_get_stack_rawtp.c
+++ b/tools/testing/selftests/bpf/progs/test_get_stack_rawtp.c
@@ -47,11 +47,12 @@ struct {
* issue and avoid complicated C programming massaging.
* This is an acceptable workaround since there is one entry here.
*/
+typedef __u64 raw_stack_trace_t[2 * MAX_STACK_RAWTP];
struct {
__uint(type, BPF_MAP_TYPE_PERCPU_ARRAY);
__uint(max_entries, 1);
__type(key, __u32);
- __u64 (*value)[2 * MAX_STACK_RAWTP];
+ __type(value, raw_stack_trace_t);
} rawdata_map SEC(".maps");
SEC("tracepoint/raw_syscalls/sys_enter")