diff options
author | Tobias Weingartner <weingart@cvs.openbsd.org> | 2008-11-12 21:42:44 +0000 |
---|---|---|
committer | Tobias Weingartner <weingart@cvs.openbsd.org> | 2008-11-12 21:42:44 +0000 |
commit | 571615d774ed3277c27e375563667ac60d995ee9 (patch) | |
tree | 934821fe1a5484774732f12d66c563b0a9756e17 /sys/arch | |
parent | 209909f739c9e5d47b7f7c087cd93ef98e229cf7 (diff) |
Add a comment to sigcode() to explain why the use of 'int $0x80' is
necessary, so that future hackers will not be mislead the same way I
was when looking at this code.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/amd64/amd64/locore.S | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/arch/amd64/amd64/locore.S b/sys/arch/amd64/amd64/locore.S index e554a9d8440..bd569f17cf4 100644 --- a/sys/arch/amd64/amd64/locore.S +++ b/sys/arch/amd64/amd64/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.29 2008/10/24 06:32:17 deraadt Exp $ */ +/* $OpenBSD: locore.S,v 1.30 2008/11/12 21:42:43 weingart Exp $ */ /* $NetBSD: locore.S,v 1.13 2004/03/25 18:33:17 drochner Exp $ */ /* @@ -637,6 +637,12 @@ longmode_hi: /* * Signal trampoline; copied to top of user stack. + * + * Note, the "system call" to sigreturn() needs to be an 'int $0x80' one + * so that the kernel returns using 'iretq' method. This way if a process + * was interrupted (by tick) as opposed to in the kernel when a signal was + * being delivered, the process will be completely restored, including the + * userland %rcx register, which the 'sysret' instruction can not restore. */ NENTRY(sigcode) call *%rax |