diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2011-09-05 02:56:45 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2011-09-05 02:56:45 +0000 |
commit | dfb18b6cba56df1f42418ed3f5fc26807ee79d43 (patch) | |
tree | dd1b52f7806e1b34d1b66fc2fdee7f06fb1c63c6 /lib/libc/arch | |
parent | 1b5b04656a9ce27d3f941ec81b621f6e15e70340 (diff) |
Switch sigreturn() to the normal syscall entry instead of int$80.
This was done for the sigreturn call in sigcode before 5.0.
ok deraadt@ for post-5.0
Diffstat (limited to 'lib/libc/arch')
-rw-r--r-- | lib/libc/arch/amd64/SYS.h | 25 | ||||
-rw-r--r-- | lib/libc/arch/amd64/sys/sigreturn.S | 4 |
2 files changed, 3 insertions, 26 deletions
diff --git a/lib/libc/arch/amd64/SYS.h b/lib/libc/arch/amd64/SYS.h index 0241cfe3927..1995012e895 100644 --- a/lib/libc/arch/amd64/SYS.h +++ b/lib/libc/arch/amd64/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.5 2011/04/04 12:42:39 guenther Exp $ */ +/* $OpenBSD: SYS.h,v 1.6 2011/09/05 02:56:44 guenther Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -45,7 +45,6 @@ #ifdef __STDC__ #define SYSTRAP(x) movl $(SYS_ ## x),%eax; movq %rcx, %r10; syscall -#define OSYSTRAP(x) movl $(SYS_ ## x),%eax; int $0x80 #define SYSENTRY(x) \ ENTRY(_thread_sys_ ## x); \ .weak _C_LABEL(x); \ @@ -53,7 +52,6 @@ #else #define SYSTRAP(x) movl $(SYS_/**/x),%eax; movq %rcx, %r10; syscall -#define OSYSTRAP(x) movl $(SYS_/**/x),%eax; int $0x80 #define SYSENTRY(x) \ ENTRY(_thread_sys_/**/x); \ .weak _C_LABEL(x); \ @@ -69,10 +67,6 @@ SYSENTRY(x); \ SYSTRAP(y) -#define _OSYSCALL_NOERROR(x,y) \ - SYSENTRY(x); \ - OSYSTRAP(y) - #ifdef PIC #define _SYSCALL(x,y) \ .text; _ALIGN_TEXT; \ @@ -80,37 +74,20 @@ jmp *%rcx; \ _SYSCALL_NOERROR(x,y); \ jc 2b -#define _OSYSCALL(x,y) \ - .text; _ALIGN_TEXT; \ - 2: mov PIC_GOT(CERROR), %rcx; \ - jmp *%rcx; \ - _OSYSCALL_NOERROR(x,y); \ - jc 2b #else #define _SYSCALL(x,y) \ .text; _ALIGN_TEXT; \ 2: jmp CERROR; \ _SYSCALL_NOERROR(x,y); \ jc 2b -#define _OSYSCALL(x,y) \ - .text; _ALIGN_TEXT; \ - 2: jmp CERROR; \ - _OSYSCALL_NOERROR(x,y); \ - jc 2b #endif #define SYSCALL_NOERROR(x) \ _SYSCALL_NOERROR(x,x) -#define OSYSCALL_NOERROR(x) \ - _OSYSCALL_NOERROR(x,x) - #define SYSCALL(x) \ _SYSCALL(x,x) -#define OSYSCALL(x) \ - _OSYSCALL(x,x) - #define PSEUDO_NOERROR(x,y) \ _SYSCALL_NOERROR(x,y); \ ret diff --git a/lib/libc/arch/amd64/sys/sigreturn.S b/lib/libc/arch/amd64/sys/sigreturn.S index e75c6ba1327..81e22ef562f 100644 --- a/lib/libc/arch/amd64/sys/sigreturn.S +++ b/lib/libc/arch/amd64/sys/sigreturn.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sigreturn.S,v 1.3 2005/12/13 00:10:48 jsg Exp $ */ +/* $OpenBSD: sigreturn.S,v 1.4 2011/09/05 02:56:44 guenther Exp $ */ /* $NetBSD: __sigreturn14.S,v 1.1 2001/06/19 00:25:06 fvdl Exp $ */ /*- @@ -52,5 +52,5 @@ #endif /* GPROF */ #endif -OSYSCALL(sigreturn) +SYSCALL(sigreturn) ret |