Add bpf_testmod module, which is conceptually out-of-tree module and provides ways for selftests/bpf to test various kernel module-related functionality: raw tracepoint, fentry/fexit/fmod_ret, etc. This module will be auto-loaded by test_progs test runner and expected by some of selftests to be present and loaded. Pahole currently isn't able to generate BTF for static functions in kernel modules, so make sure traced function is global. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Martin KaFai Lau <kafai@fb.com> Link: https://lore.kernel.org/bpf/20201203204634.1325171-7-andrii@kernel.org
14 lines
251 B
C
14 lines
251 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright (c) 2020 Facebook */
|
|
#ifndef _BPF_TESTMOD_H
|
|
#define _BPF_TESTMOD_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct bpf_testmod_test_read_ctx {
|
|
char *buf;
|
|
loff_t off;
|
|
size_t len;
|
|
};
|
|
|
|
#endif /* _BPF_TESTMOD_H */
|