看板 FB_security 關於我們 聯絡資訊
martinko <martinkov@pobox.sk> writes: > and what exactly is that trampoline btw/pls ? When a process receives a signal, the kernel needs to call the appropriate signal handler (in user space), then do some cleanup when the signal handler returns, and pass control back to whatever code was interrupted by the signal. The cleanup is handled by the sigreturn() syscall. To avoid having to manually add a call to sigreturn() at the end of each signal handler, we use a small piece of trampoline code (sigcode in locore.S) which calls the signal handler, then issues a sigreturn() syscall. This trampoline needs to be in a fixed location so the kernel knows where to find it, and it needs to be present at all times, so we can't just put it in the crt and then have the crt report its location to the kernel somehow. Currently, it is copied into place at the top of the stack by execve(). DES --=20 Dag-Erling Sm=F8rgrav - des@des.no _______________________________________________ freebsd-security@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-security To unsubscribe, send any mail to "freebsd-security-unsubscribe@freebsd.org"