diff options
author | Alexei Starovoitov <ast@kernel.org> | 2019-11-14 10:57:15 -0800 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-11-15 23:44:48 +0100 |
commit | 91cc1a99740e2ed1d903b5906afb470cc5a07379 (patch) | |
tree | ea7c450f397b2f02a81cde66a5f1e4f5fb819c5c /kernel/ksysfs.c | |
parent | 9cc31b3a092d9bf2a18f09ad77e727ddb42a5b1e (diff) |
bpf: Annotate context types
Annotate BPF program context types with program-side type and kernel-side type.
This type information is used by the verifier. btf_get_prog_ctx_type() is
used in the later patches to verify that BTF type of ctx in BPF program matches to
kernel expected ctx type. For example, the XDP program type is:
BPF_PROG_TYPE(BPF_PROG_TYPE_XDP, xdp, struct xdp_md, struct xdp_buff)
That means that XDP program should be written as:
int xdp_prog(struct xdp_md *ctx) { ... }
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20191114185720.1641606-16-ast@kernel.org
Diffstat (limited to 'kernel/ksysfs.c')
0 files changed, 0 insertions, 0 deletions