summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/amd64/amd64/locore.S8
-rw-r--r--sys/amd64/amd64/locore.s8
-rw-r--r--sys/amd64/amd64/machdep.c9
-rw-r--r--sys/i386/i386/locore.s8
-rw-r--r--sys/i386/i386/machdep.c9
-rw-r--r--sys/pc98/i386/machdep.c9
-rw-r--r--sys/pc98/pc98/machdep.c9
7 files changed, 18 insertions, 42 deletions
diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S
index ab3dad5..4fff220 100644
--- a/sys/amd64/amd64/locore.S
+++ b/sys/amd64/amd64/locore.S
@@ -44,6 +44,7 @@
*/
#include "opt_bootp.h"
+#include "opt_compat.h"
#include "opt_nfsroot.h"
#include <sys/syscall.h>
@@ -416,6 +417,7 @@ NON_GPROF_ENTRY(sigcode)
int $0x80 /* enter kernel with args */
0: jmp 0b
+#ifdef COMPAT_43
ALIGN_TEXT
osigcode:
call *SIGF_HANDLER(%esp) /* call signal handler */
@@ -425,11 +427,11 @@ osigcode:
jne 9f
movl SC_GS(%eax),%gs /* restore %gs */
9:
- movl $0x01d516,SC_TRAPNO(%eax) /* magic: 0ldSiG */
- movl $SYS_sigreturn,%eax
+ movl $SYS_osigreturn,%eax
pushl %eax /* junk to fake return addr. */
int $0x80 /* enter kernel with args */
0: jmp 0b
+#endif /* COMPAT_43 */
ALIGN_TEXT
esigcode:
@@ -438,8 +440,10 @@ esigcode:
.globl szsigcode, szosigcode
szsigcode:
.long esigcode-sigcode
+#ifdef COMPAT_43
szosigcode:
.long esigcode-osigcode
+#endif
.text
/**********************************************************************
diff --git a/sys/amd64/amd64/locore.s b/sys/amd64/amd64/locore.s
index ab3dad5..4fff220 100644
--- a/sys/amd64/amd64/locore.s
+++ b/sys/amd64/amd64/locore.s
@@ -44,6 +44,7 @@
*/
#include "opt_bootp.h"
+#include "opt_compat.h"
#include "opt_nfsroot.h"
#include <sys/syscall.h>
@@ -416,6 +417,7 @@ NON_GPROF_ENTRY(sigcode)
int $0x80 /* enter kernel with args */
0: jmp 0b
+#ifdef COMPAT_43
ALIGN_TEXT
osigcode:
call *SIGF_HANDLER(%esp) /* call signal handler */
@@ -425,11 +427,11 @@ osigcode:
jne 9f
movl SC_GS(%eax),%gs /* restore %gs */
9:
- movl $0x01d516,SC_TRAPNO(%eax) /* magic: 0ldSiG */
- movl $SYS_sigreturn,%eax
+ movl $SYS_osigreturn,%eax
pushl %eax /* junk to fake return addr. */
int $0x80 /* enter kernel with args */
0: jmp 0b
+#endif /* COMPAT_43 */
ALIGN_TEXT
esigcode:
@@ -438,8 +440,10 @@ esigcode:
.globl szsigcode, szosigcode
szsigcode:
.long esigcode-sigcode
+#ifdef COMPAT_43
szosigcode:
.long esigcode-osigcode
+#endif
.text
/**********************************************************************
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index 308d319..13e8b0a 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -710,19 +710,10 @@ sigreturn(td, uap)
} */ *uap;
{
struct proc *p = td->td_proc;
- struct osigcontext *oscp;
- struct osigreturn_args *ouap;
struct trapframe *regs;
ucontext_t *ucp;
int cs, eflags;
-#ifdef COMPAT_43
- ouap = (struct osigreturn_args *)uap;
- oscp = ouap->sigcntxp;
- if (fuword(&oscp->sc_trapno) == 0x01d516)
- return (osigreturn(td, ouap));
-#endif
-
ucp = uap->sigcntxp;
if (!useracc((caddr_t)ucp, sizeof(*ucp), VM_PROT_READ))
return (EFAULT);
diff --git a/sys/i386/i386/locore.s b/sys/i386/i386/locore.s
index ab3dad5..4fff220 100644
--- a/sys/i386/i386/locore.s
+++ b/sys/i386/i386/locore.s
@@ -44,6 +44,7 @@
*/
#include "opt_bootp.h"
+#include "opt_compat.h"
#include "opt_nfsroot.h"
#include <sys/syscall.h>
@@ -416,6 +417,7 @@ NON_GPROF_ENTRY(sigcode)
int $0x80 /* enter kernel with args */
0: jmp 0b
+#ifdef COMPAT_43
ALIGN_TEXT
osigcode:
call *SIGF_HANDLER(%esp) /* call signal handler */
@@ -425,11 +427,11 @@ osigcode:
jne 9f
movl SC_GS(%eax),%gs /* restore %gs */
9:
- movl $0x01d516,SC_TRAPNO(%eax) /* magic: 0ldSiG */
- movl $SYS_sigreturn,%eax
+ movl $SYS_osigreturn,%eax
pushl %eax /* junk to fake return addr. */
int $0x80 /* enter kernel with args */
0: jmp 0b
+#endif /* COMPAT_43 */
ALIGN_TEXT
esigcode:
@@ -438,8 +440,10 @@ esigcode:
.globl szsigcode, szosigcode
szsigcode:
.long esigcode-sigcode
+#ifdef COMPAT_43
szosigcode:
.long esigcode-osigcode
+#endif
.text
/**********************************************************************
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c
index 308d319..13e8b0a 100644
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -710,19 +710,10 @@ sigreturn(td, uap)
} */ *uap;
{
struct proc *p = td->td_proc;
- struct osigcontext *oscp;
- struct osigreturn_args *ouap;
struct trapframe *regs;
ucontext_t *ucp;
int cs, eflags;
-#ifdef COMPAT_43
- ouap = (struct osigreturn_args *)uap;
- oscp = ouap->sigcntxp;
- if (fuword(&oscp->sc_trapno) == 0x01d516)
- return (osigreturn(td, ouap));
-#endif
-
ucp = uap->sigcntxp;
if (!useracc((caddr_t)ucp, sizeof(*ucp), VM_PROT_READ))
return (EFAULT);
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c
index 0c0243d..71d2098 100644
--- a/sys/pc98/i386/machdep.c
+++ b/sys/pc98/i386/machdep.c
@@ -723,19 +723,10 @@ sigreturn(td, uap)
} */ *uap;
{
struct proc *p = td->td_proc;
- struct osigcontext *oscp;
- struct osigreturn_args *ouap;
struct trapframe *regs;
ucontext_t *ucp;
int cs, eflags;
-#ifdef COMPAT_43
- ouap = (struct osigreturn_args *)uap;
- oscp = ouap->sigcntxp;
- if (fuword(&oscp->sc_trapno) == 0x01d516)
- return (osigreturn(td, ouap));
-#endif
-
ucp = uap->sigcntxp;
if (!useracc((caddr_t)ucp, sizeof(*ucp), VM_PROT_READ))
return (EFAULT);
diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c
index 0c0243d..71d2098 100644
--- a/sys/pc98/pc98/machdep.c
+++ b/sys/pc98/pc98/machdep.c
@@ -723,19 +723,10 @@ sigreturn(td, uap)
} */ *uap;
{
struct proc *p = td->td_proc;
- struct osigcontext *oscp;
- struct osigreturn_args *ouap;
struct trapframe *regs;
ucontext_t *ucp;
int cs, eflags;
-#ifdef COMPAT_43
- ouap = (struct osigreturn_args *)uap;
- oscp = ouap->sigcntxp;
- if (fuword(&oscp->sc_trapno) == 0x01d516)
- return (osigreturn(td, ouap));
-#endif
-
ucp = uap->sigcntxp;
if (!useracc((caddr_t)ucp, sizeof(*ucp), VM_PROT_READ))
return (EFAULT);
OpenPOWER on IntegriCloud