Skip to content

Commit

Permalink
cheribsdtest: Increase signal_returncap length under c18n
Browse files Browse the repository at this point in the history
When library-based compartmentalisation causes every function pointer to
be wrapped in a trampoline, signal handlers return back to a trampoline
rather than sigcode. The length return address capability is thus
increased to account for this.
  • Loading branch information
dpgao committed Jan 26, 2025
1 parent ad02c8a commit eee9dfb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bin/cheribsdtest/cheribsdtest_signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ CHERIBSDTEST(signal_returncap,
CHERIBSDTEST_VERIFY2(v == CHERI_CAP_USER_CODE_LENGTH,
"length 0x%jx (expected <= 0x%jx)", v,
(uintmax_t)CHERI_CAP_USER_CODE_LENGTH);
#elif defined(CHERIBSD_C18N_TESTS)
CHERIBSDTEST_VERIFY2(v <= 0x300, "length 0x%jx (expected <= 0x300)", v);
#else
CHERIBSDTEST_VERIFY2(v <= 0x100, "length 0x%jx (expected <= 0x100)", v);
#endif
Expand Down

0 comments on commit eee9dfb

Please sign in to comment.