bsd_to_linux_signal() looks up signals 1..31 in a table and treats everything else but the SIGPWR stand-in as a real-time signal, sig - SIGRTMIN + LINUX_SIGRTMIN, or sig - 33. That is right only for 65..97, so the signals with no Linux counterpart came out as: 32 (SIGTHR) -> -1 33 (SIGLIBRT) -> 0 34..64 -> 1..31, unrelated Linux signals 99..126 -> 66..93, past LINUX_SIGRTMAX Signal 0 indexed the table at -1. - bsd_to_linux_sigset() turned SIGTHR's -1 into a negative shift, which on amd64 sets Linux signal 63, so linprocfs showed it caught for every native threaded process. KUBSAN reported the shift. - prctl(PR_GET_PDEATHSIG) with no signal set returned whatever int preceded the table. - A Linux parent of a native child killed by SIGEMT or SIGLIBRT saw a normal exit, so bash reported $? = 0, success. SIGTHR gave wait status 0xffffffff ($? = 255), and 34..64 unrelated signals. Return 0 for these, as the table already does for SIGEMT and SIGINFO, and report a child killed by a signal that maps to 0 as killed by SIGKILL rather than as a normal exit. siginfo_to_lsiginfo() also left si_status unconverted for CLD_DUMPED and CLD_TRAPPED, so a core dump on SIGBUS reported 10, Linux SIGUSR1.
Details
Details
- Reviewers
adrian
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 78113 Build 74996: arc lint + arc unit