diff options
| author | Alexei Starovoitov <ast@kernel.org> | 2026-10-31 05:05:58 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-11-02 00:04:28 +0000 |
| commit | 6cc0cf0a6fb087f1979dfad5c1e13a41e57f55d7 (patch) | |
| tree | bcbb7c40adc716331549337b23e38a95dae110b4 /scripts/basic | |
| parent | 91068ed2d3ee0713d7566c7977b995f8a0936bea (diff) | |
| download | linux-6cc0cf0a6fb087f1979dfad5c1e13a41e57f55d7.tar.gz linux-6cc0cf0a6fb087f1979dfad5c1e13a41e57f55d7.zip | |
selftests/bpf: Test bpf_throw() in a prog with a private stack
'Private stack, exception in main prog' and 'Private stack, exception in
subprog' are fentry progs. The test loader does not attach them, and
BPF_PROG_TEST_RUN of a fentry prog does not call the prog. They are
loaded, but they never run.
Add three raw_tp progs. BPF_PROG_TEST_RUN runs them, and the default
exception callback returns the cookie of bpf_throw():
- the main prog has a private stack and throws
- the main prog has a private stack, its subprog throws
- the main prog has no private stack, its subprog has one and throws
Without the fix of the x86-64 JIT the first two crash the kernel. The
third one passes with and without it: it makes sure that only the frame
of the main prog is taken into account.
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://patch.msgid.link/20261031050558.2410721-3-alexei.starovoitov@gmail.com
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions
