diff options
| author | Kumar Kartikeya Dwivedi <memxor@gmail.com> | 2026-10-20 18:13:20 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-10-20 20:54:25 +0000 |
| commit | 55c34496ee99f5f41cf329c495dd111802244146 (patch) | |
| tree | c6e16aae43c7c5eeaeb0ab52ee7f839a2b719343 /rust/kernel/alloc/kvec/errors.rs | |
| parent | 0935acd1a8a77865e69cd9a38495daf68d769eee (diff) | |
selftests/bpf: Test unwinding from R0: R2 subprog
Global subprograms returning a 16-byte scalar use R0:R2. The
verifier therefore checks both registers at every ordinary and unwind
exit.
LLVM lowers a resume to "r0 = 0; unwind_exit". If cleanup code does not
happen to initialize R2, the verifier rejects the unwind path with:
R2 !read_ok
Extend unwind_cxx with a global unsigned __int128-returning subprogram
whose cleanup only releases its RCU read lock. Load it separately so
the existing cases continue to run and the failure is attributed to
this case. Check both the normal aggregate return and caught exception.
The test passes once LLVM defines R2 before emitting unwind_exit.
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://patch.msgid.link/20261020181320.1284798-7-alexei.starovoitov@gmail.com
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions
