Re: Non-executable stack

看板FB_security作者時間20年前 (2005/11/04 18:41), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串17/18 (看更多)
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"
文章代碼(AID): #13Qphn00 (FB_security)
討論串 (同標題文章)
文章代碼(AID): #13Qphn00 (FB_security)