Make COMPAT_43 optional again. XXX we need COMPAT_FBSD3 etc for this

stuff.
This commit is contained in:
Peter Wemm 2001-08-21 02:32:59 +00:00
parent 75fd91d449
commit e8ebc08f80
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=82025
9 changed files with 64 additions and 4 deletions

View file

@ -1225,6 +1225,7 @@ DELAY(int n)
* frame pointer, it returns to the user
* specified pc, psl.
*/
#ifdef COMPAT_43
void
osendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
{
@ -1329,6 +1330,7 @@ osendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
frame->tf_regs[FRAME_T12] = (u_int64_t)catcher; /* t12 is pv */
alpha_pal_wrusp((unsigned long)sip);
}
#endif
void
sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
@ -1341,10 +1343,12 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
PROC_LOCK(p);
psp = p->p_sigacts;
#ifdef COMPAT_43
if (SIGISMEMBER(psp->ps_osigset, sig)) {
osendsig(catcher, sig, mask, code);
return;
}
#endif
frame = p->p_frame;
oonstack = sigonstack(alpha_pal_rdusp());
@ -1480,6 +1484,7 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
* make sure that the user has not modified the
* state to gain improper privileges.
*/
#ifdef COMPAT_43
int
osigreturn(struct proc *p,
struct osigreturn_args /* {
@ -1538,6 +1543,7 @@ osigreturn(struct proc *p,
p->p_addr->u_pcb.pcb_fp_control = ksc.sc_fp_control;
return (EJUSTRETURN);
}
#endif
int
sigreturn(struct proc *p,
@ -1549,8 +1555,10 @@ sigreturn(struct proc *p,
struct pcb *pcb;
unsigned long val;
#ifdef COMPAT_43
if (((struct osigcontext*)uap->sigcntxp)->sc_regs[R_ZERO] == 0xACEDBADE)
return osigreturn(p, (struct osigreturn_args *)uap);
#endif
ucp = uap->sigcntxp;
pcb = &p->p_addr->u_pcb;

View file

@ -154,7 +154,9 @@ SYSCTL_INT(_machdep, OID_AUTO, ispc98, CTLFLAG_RD, &ispc98, 0, "");
int physmem = 0;
int cold = 1;
#ifdef COMPAT_43
static void osendsig __P((sig_t catcher, int sig, sigset_t *mask, u_long code));
#endif
static int
sysctl_hw_physmem(SYSCTL_HANDLER_ARGS)
@ -416,6 +418,7 @@ cpu_startup(dummy)
* frame pointer, it returns to the user
* specified pc, psl.
*/
#ifdef COMPAT_43
static void
osendsig(catcher, sig, mask, code)
sig_t catcher;
@ -560,6 +563,7 @@ osendsig(catcher, sig, mask, code)
load_gs(_udatasel);
regs->tf_ss = _udatasel;
}
#endif
void
sendsig(catcher, sig, mask, code)
@ -578,11 +582,13 @@ sendsig(catcher, sig, mask, code)
p = curproc;
PROC_LOCK(p);
psp = p->p_sigacts;
#ifdef COMPAT_43
if (SIGISMEMBER(psp->ps_osigset, sig)) {
PROC_UNLOCK(p);
osendsig(catcher, sig, mask, code);
return;
}
#endif
regs = p->p_frame;
oonstack = sigonstack(regs->tf_esp);
@ -719,6 +725,7 @@ sendsig(catcher, sig, mask, code)
* make sure that the user has not modified the
* state to gain improper privileges.
*/
#ifdef COMPAT_43
int
osigreturn(p, uap)
struct proc *p;
@ -828,6 +835,7 @@ osigreturn(p, uap)
regs->tf_eflags = eflags;
return (EJUSTRETURN);
}
#endif
int
sigreturn(p, uap)
@ -841,11 +849,11 @@ sigreturn(p, uap)
int cs, eflags;
ucp = uap->sigcntxp;
#ifdef COMPAT_43
if (!useracc((caddr_t)ucp, sizeof(struct osigcontext), VM_PROT_READ))
return (EFAULT);
if (((struct osigcontext *)ucp)->sc_trapno == 0x01d516)
return (osigreturn(p, (struct osigreturn_args *)uap));
/*
* Since ucp is not an osigcontext but a ucontext_t, we have to
* check again if all of it is accessible. A ucontext_t is
@ -853,6 +861,7 @@ sigreturn(p, uap)
* being valid for the size of an osigcontext, now check for
* it being valid for a whole, new-style ucontext_t.
*/
#endif
if (!useracc((caddr_t)ucp, sizeof(*ucp), VM_PROT_READ))
return (EFAULT);

View file

@ -154,7 +154,9 @@ SYSCTL_INT(_machdep, OID_AUTO, ispc98, CTLFLAG_RD, &ispc98, 0, "");
int physmem = 0;
int cold = 1;
#ifdef COMPAT_43
static void osendsig __P((sig_t catcher, int sig, sigset_t *mask, u_long code));
#endif
static int
sysctl_hw_physmem(SYSCTL_HANDLER_ARGS)
@ -416,6 +418,7 @@ cpu_startup(dummy)
* frame pointer, it returns to the user
* specified pc, psl.
*/
#ifdef COMPAT_43
static void
osendsig(catcher, sig, mask, code)
sig_t catcher;
@ -560,6 +563,7 @@ osendsig(catcher, sig, mask, code)
load_gs(_udatasel);
regs->tf_ss = _udatasel;
}
#endif
void
sendsig(catcher, sig, mask, code)
@ -578,11 +582,13 @@ sendsig(catcher, sig, mask, code)
p = curproc;
PROC_LOCK(p);
psp = p->p_sigacts;
#ifdef COMPAT_43
if (SIGISMEMBER(psp->ps_osigset, sig)) {
PROC_UNLOCK(p);
osendsig(catcher, sig, mask, code);
return;
}
#endif
regs = p->p_frame;
oonstack = sigonstack(regs->tf_esp);
@ -719,6 +725,7 @@ sendsig(catcher, sig, mask, code)
* make sure that the user has not modified the
* state to gain improper privileges.
*/
#ifdef COMPAT_43
int
osigreturn(p, uap)
struct proc *p;
@ -828,6 +835,7 @@ osigreturn(p, uap)
regs->tf_eflags = eflags;
return (EJUSTRETURN);
}
#endif
int
sigreturn(p, uap)
@ -841,11 +849,11 @@ sigreturn(p, uap)
int cs, eflags;
ucp = uap->sigcntxp;
#ifdef COMPAT_43
if (!useracc((caddr_t)ucp, sizeof(struct osigcontext), VM_PROT_READ))
return (EFAULT);
if (((struct osigcontext *)ucp)->sc_trapno == 0x01d516)
return (osigreturn(p, (struct osigreturn_args *)uap));
/*
* Since ucp is not an osigcontext but a ucontext_t, we have to
* check again if all of it is accessible. A ucontext_t is
@ -853,6 +861,7 @@ sigreturn(p, uap)
* being valid for the size of an osigcontext, now check for
* it being valid for a whole, new-style ucontext_t.
*/
#endif
if (!useracc((caddr_t)ucp, sizeof(*ucp), VM_PROT_READ))
return (EFAULT);

View file

@ -898,6 +898,7 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
* make sure that the user has not modified the
* state to gain improper privileges.
*/
#ifdef COMPAT_43
int
osigreturn(struct proc *p,
struct osigreturn_args /* {
@ -906,6 +907,7 @@ osigreturn(struct proc *p,
{
return EOPNOTSUPP;
}
#endif
/*
* System call to cleanup state after a signal

View file

@ -326,11 +326,13 @@ do_sigaction(p, sig, act, oact, old)
else
SIGADDSET(p->p_sigcatch, sig);
}
#ifdef COMPAT_43
if (ps->ps_sigact[_SIG_IDX(sig)] == SIG_IGN ||
ps->ps_sigact[_SIG_IDX(sig)] == SIG_DFL || !old)
SIGDELSET(ps->ps_osigset, sig);
else
SIGADDSET(ps->ps_osigset, sig);
#endif
}
PROC_UNLOCK(p);
return (0);

View file

@ -164,7 +164,9 @@ SYSCTL_INT(_machdep, OID_AUTO, ispc98, CTLFLAG_RD, &ispc98, 0, "");
int physmem = 0;
int cold = 1;
#ifdef COMPAT_43
static void osendsig __P((sig_t catcher, int sig, sigset_t *mask, u_long code));
#endif
static int
sysctl_hw_physmem(SYSCTL_HANDLER_ARGS)
@ -420,6 +422,7 @@ cpu_startup(dummy)
* frame pointer, it returns to the user
* specified pc, psl.
*/
#ifdef COMPAT_43
static void
osendsig(catcher, sig, mask, code)
sig_t catcher;
@ -564,6 +567,7 @@ osendsig(catcher, sig, mask, code)
load_gs(_udatasel);
regs->tf_ss = _udatasel;
}
#endif
void
sendsig(catcher, sig, mask, code)
@ -582,11 +586,13 @@ sendsig(catcher, sig, mask, code)
p = curproc;
PROC_LOCK(p);
psp = p->p_sigacts;
#ifdef COMPAT_43
if (SIGISMEMBER(psp->ps_osigset, sig)) {
PROC_UNLOCK(p);
osendsig(catcher, sig, mask, code);
return;
}
#endif
regs = p->p_frame;
oonstack = sigonstack(regs->tf_esp);
@ -723,6 +729,7 @@ sendsig(catcher, sig, mask, code)
* make sure that the user has not modified the
* state to gain improper privileges.
*/
#ifdef COMPAT_43
int
osigreturn(p, uap)
struct proc *p;
@ -831,6 +838,7 @@ osigreturn(p, uap)
regs->tf_eflags = eflags;
return (EJUSTRETURN);
}
#endif
int
sigreturn(p, uap)
@ -844,11 +852,11 @@ sigreturn(p, uap)
int cs, eflags;
ucp = uap->sigcntxp;
#ifdef COMPAT_43
if (!useracc((caddr_t)ucp, sizeof(struct osigcontext), VM_PROT_READ))
return (EFAULT);
if (((struct osigcontext *)ucp)->sc_trapno == 0x01d516)
return (osigreturn(p, (struct osigreturn_args *)uap));
/*
* Since ucp is not an osigcontext but a ucontext_t, we have to
* check again if all of it is accessible. A ucontext_t is
@ -858,6 +866,7 @@ sigreturn(p, uap)
*/
if (!useracc((caddr_t)ucp, sizeof(*ucp), VM_PROT_READ))
return (EFAULT);
#endif
regs = p->p_frame;
eflags = ucp->uc_mcontext.mc_eflags;

View file

@ -164,7 +164,9 @@ SYSCTL_INT(_machdep, OID_AUTO, ispc98, CTLFLAG_RD, &ispc98, 0, "");
int physmem = 0;
int cold = 1;
#ifdef COMPAT_43
static void osendsig __P((sig_t catcher, int sig, sigset_t *mask, u_long code));
#endif
static int
sysctl_hw_physmem(SYSCTL_HANDLER_ARGS)
@ -420,6 +422,7 @@ cpu_startup(dummy)
* frame pointer, it returns to the user
* specified pc, psl.
*/
#ifdef COMPAT_43
static void
osendsig(catcher, sig, mask, code)
sig_t catcher;
@ -564,6 +567,7 @@ osendsig(catcher, sig, mask, code)
load_gs(_udatasel);
regs->tf_ss = _udatasel;
}
#endif
void
sendsig(catcher, sig, mask, code)
@ -582,11 +586,13 @@ sendsig(catcher, sig, mask, code)
p = curproc;
PROC_LOCK(p);
psp = p->p_sigacts;
#ifdef COMPAT_43
if (SIGISMEMBER(psp->ps_osigset, sig)) {
PROC_UNLOCK(p);
osendsig(catcher, sig, mask, code);
return;
}
#endif
regs = p->p_frame;
oonstack = sigonstack(regs->tf_esp);
@ -723,6 +729,7 @@ sendsig(catcher, sig, mask, code)
* make sure that the user has not modified the
* state to gain improper privileges.
*/
#ifdef COMPAT_43
int
osigreturn(p, uap)
struct proc *p;
@ -831,6 +838,7 @@ osigreturn(p, uap)
regs->tf_eflags = eflags;
return (EJUSTRETURN);
}
#endif
int
sigreturn(p, uap)
@ -844,11 +852,11 @@ sigreturn(p, uap)
int cs, eflags;
ucp = uap->sigcntxp;
#ifdef COMPAT_43
if (!useracc((caddr_t)ucp, sizeof(struct osigcontext), VM_PROT_READ))
return (EFAULT);
if (((struct osigcontext *)ucp)->sc_trapno == 0x01d516)
return (osigreturn(p, (struct osigreturn_args *)uap));
/*
* Since ucp is not an osigcontext but a ucontext_t, we have to
* check again if all of it is accessible. A ucontext_t is
@ -858,6 +866,7 @@ sigreturn(p, uap)
*/
if (!useracc((caddr_t)ucp, sizeof(*ucp), VM_PROT_READ))
return (EFAULT);
#endif
regs = p->p_frame;
eflags = ucp->uc_mcontext.mc_eflags;

View file

@ -142,7 +142,9 @@ int restore_ofw_mapping(void);
void install_extint(void (*)(void));
#ifdef COMPAT_43
void osendsig(sig_t, int, sigset_t *, u_long);
#endif
struct msgbuf *msgbufp = 0;
@ -789,6 +791,7 @@ delay(unsigned n)
}
#endif
#ifdef COMPAT_43
void
osendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
{
@ -796,6 +799,7 @@ osendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
/* XXX: To be done */
return;
}
#endif
void
sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
@ -805,6 +809,7 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
return;
}
#ifdef COMPAT_43
int
osigreturn(struct proc *p, struct osigreturn_args *uap)
{
@ -812,6 +817,7 @@ osigreturn(struct proc *p, struct osigreturn_args *uap)
/* XXX: To be done */
return(ENOSYS);
}
#endif
int
sigreturn(struct proc *p, struct sigreturn_args *uap)

View file

@ -142,7 +142,9 @@ int restore_ofw_mapping(void);
void install_extint(void (*)(void));
#ifdef COMPAT_43
void osendsig(sig_t, int, sigset_t *, u_long);
#endif
struct msgbuf *msgbufp = 0;
@ -789,6 +791,7 @@ delay(unsigned n)
}
#endif
#ifdef COMPAT_43
void
osendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
{
@ -796,6 +799,7 @@ osendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
/* XXX: To be done */
return;
}
#endif
void
sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
@ -805,6 +809,7 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
return;
}
#ifdef COMPAT_43
int
osigreturn(struct proc *p, struct osigreturn_args *uap)
{
@ -812,6 +817,7 @@ osigreturn(struct proc *p, struct osigreturn_args *uap)
/* XXX: To be done */
return(ENOSYS);
}
#endif
int
sigreturn(struct proc *p, struct sigreturn_args *uap)