Skip to content

Commit

Permalink
c18n: Add a libunwind policy.
Browse files Browse the repository at this point in the history
This commit also fixes the missing unw_getcontext_unsealed in trusted
symbols and moves libunwind symbols closer to the setjmp/longjmp ones.
  • Loading branch information
dstolfa committed Apr 3, 2024
1 parent b9424e6 commit 17e70d2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libexec/rtld-elf/Symbol-c18n.map
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ FBSDprivate_1.0 {
_rtld_sighandler;
_rtld_setjmp;
_rtld_longjmp;
_rtld_safebox_code;
_rtld_sandbox_code;
_rtld_unw_getcontext;
_rtld_unw_setcontext;
_rtld_unw_getcontext_unsealed;
_rtld_unw_setcontext_unsealed;
_rtld_unw_getsealer;
_rtld_safebox_code;
_rtld_sandbox_code;
};
12 changes: 12 additions & 0 deletions libexec/rtld-elf/rtld_c18n_policy.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ compartment [TCB]
libc.so.7
libthr.so.3

compartment [libunwind]
libgcc_s.so.1

caller *
trust
memset
Expand Down Expand Up @@ -55,6 +58,7 @@ trust
execvpe
execvP
unw_getcontext
unw_getcontext_unsealed
_rtld_thread_start

callee [RTLD]
Expand All @@ -66,3 +70,11 @@ export to [TCB]
_rtld_sighandler
_rtld_setjmp
_rtld_longjmp

callee [RTLD]
export to [libunwind]
_rtld_unw_getcontext
_rtld_unw_getcontext_unsealed
_rtld_unw_setcontext
_rtld_unw_setcontext_unsealed
_rtld_unw_getsealer

0 comments on commit 17e70d2

Please sign in to comment.