diff options
| author | Yonghong Song <[email protected]> | 2022-11-20 19:54:42 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2022-11-20 23:45:48 +0000 |
| commit | 58d84bee58465cc9f6a63ca3931240419497f917 (patch) | |
| tree | caec27087f7dbc54f6c594fe7d6a987f2a20a202 /tools/bpf/bpftool/prog.c | |
| parent | bpf: Add a kfunc for generic type cast (diff) | |
| download | kernel-58d84bee58465cc9f6a63ca3931240419497f917.tar.gz kernel-58d84bee58465cc9f6a63ca3931240419497f917.zip | |
bpf: Add type cast unit tests
Three tests are added. One is from John Fastabend ({1]) which tests
tracing style access for xdp program from the kernel ctx.
Another is a tc test to test both kernel ctx tracing style access
and explicit non-ctx type cast. The third one is for negative tests
including two tests, a tp_bpf test where the bpf_rdonly_cast()
returns a untrusted ptr which cannot be used as helper argument,
and a tracepoint test where the kernel ctx is a u64.
Also added the test to DENYLIST.s390x since s390 does not currently
support calling kernel functions in JIT mode.
[1] https://lore.kernel.org/bpf/[email protected]/
Signed-off-by: Yonghong Song <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/bpf/bpftool/prog.c')
0 files changed, 0 insertions, 0 deletions
