Compile osigreturn() unconditionally since it will always be needed on
some arches and the syscall table is machine-independent. It was (bogusly) conditional on COMPAT_43, so this usually makes no difference. ia64: in addition: - replace the bogus cloned comment before osigreturn() by a correct one. osigreturn() is just a stub fo ia64's. - fix the formatting of cloned comment before sigreturn(). - fix the return code. use nosys() instead of returning ENOSYS to get the same semantics as if the syscall is not in the syscall table. Generating SIGSYS is actually correct here. - fix style bugs. powerpc: copy the cleaned up ia64 stub. This mainly fixes a bogus comment. sparc64: copy the cleaned up the ia64 stub, since there was no stub before.
This commit is contained in:
parent
3b8a3187c8
commit
55a9536b65
@ -1440,7 +1440,6 @@ 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 thread *td,
|
||||
struct osigreturn_args /* {
|
||||
@ -1500,7 +1499,6 @@ osigreturn(struct thread *td,
|
||||
td->td_pcb->pcb_fp_control = ksc.sc_fp_control;
|
||||
return (EJUSTRETURN);
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
sigreturn(struct thread *td,
|
||||
|
@ -587,7 +587,6 @@ sendsig(catcher, sig, mask, code)
|
||||
* make sure that the user has not modified the
|
||||
* state to gain improper privileges.
|
||||
*/
|
||||
#ifdef COMPAT_43
|
||||
int
|
||||
osigreturn(td, uap)
|
||||
struct thread *td;
|
||||
@ -698,7 +697,6 @@ osigreturn(td, uap)
|
||||
regs->tf_eflags = eflags;
|
||||
return (EJUSTRETURN);
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
sigreturn(td, uap)
|
||||
|
@ -587,7 +587,6 @@ sendsig(catcher, sig, mask, code)
|
||||
* make sure that the user has not modified the
|
||||
* state to gain improper privileges.
|
||||
*/
|
||||
#ifdef COMPAT_43
|
||||
int
|
||||
osigreturn(td, uap)
|
||||
struct thread *td;
|
||||
@ -698,7 +697,6 @@ osigreturn(td, uap)
|
||||
regs->tf_eflags = eflags;
|
||||
return (EJUSTRETURN);
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
sigreturn(td, uap)
|
||||
|
@ -936,24 +936,16 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
|
||||
}
|
||||
|
||||
/*
|
||||
* System call to cleanup state after a signal
|
||||
* has been taken. Reset signal mask and
|
||||
* stack state from context left by sendsig (above).
|
||||
* Return to previous pc and psl as specified by
|
||||
* context left by sendsig. Check carefully to
|
||||
* make sure that the user has not modified the
|
||||
* state to gain improper privileges.
|
||||
* Stub to satisfy the reference to osigreturn in the syscall table. This
|
||||
* is needed even for newer arches that don't support old signals because
|
||||
* the syscall table is machine-independent.
|
||||
*/
|
||||
#ifdef COMPAT_43
|
||||
int
|
||||
osigreturn(struct thread *td,
|
||||
struct osigreturn_args /* {
|
||||
struct osigcontext *sigcntxp;
|
||||
} */ *uap)
|
||||
osigreturn(struct thread *td, struct osigreturn_args *uap)
|
||||
{
|
||||
return EOPNOTSUPP;
|
||||
|
||||
return (nosys(td, (struct nosys_args *)uap));
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* System call to cleanup state after a signal
|
||||
@ -964,7 +956,6 @@ osigreturn(struct thread *td,
|
||||
* make sure that the user has not modified the
|
||||
* state to gain improper privileges.
|
||||
*/
|
||||
|
||||
int
|
||||
sigreturn(struct thread *td,
|
||||
struct sigreturn_args /* {
|
||||
|
@ -600,7 +600,6 @@ sendsig(catcher, sig, mask, code)
|
||||
* make sure that the user has not modified the
|
||||
* state to gain improper privileges.
|
||||
*/
|
||||
#ifdef COMPAT_43
|
||||
int
|
||||
osigreturn(td, uap)
|
||||
struct thread *td;
|
||||
@ -711,7 +710,6 @@ osigreturn(td, uap)
|
||||
regs->tf_eflags = eflags;
|
||||
return (EJUSTRETURN);
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
sigreturn(td, uap)
|
||||
|
@ -600,7 +600,6 @@ sendsig(catcher, sig, mask, code)
|
||||
* make sure that the user has not modified the
|
||||
* state to gain improper privileges.
|
||||
*/
|
||||
#ifdef COMPAT_43
|
||||
int
|
||||
osigreturn(td, uap)
|
||||
struct thread *td;
|
||||
@ -711,7 +710,6 @@ osigreturn(td, uap)
|
||||
regs->tf_eflags = eflags;
|
||||
return (EJUSTRETURN);
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
sigreturn(td, uap)
|
||||
|
@ -723,15 +723,17 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef COMPAT_43
|
||||
/*
|
||||
* Stub to satisfy the reference to osigreturn in the syscall table. This
|
||||
* is needed even for newer arches that don't support old signals because
|
||||
* the syscall table is machine-independent.
|
||||
*/
|
||||
int
|
||||
osigreturn(struct thread *td, struct osigreturn_args *uap)
|
||||
{
|
||||
|
||||
/* XXX: To be done */
|
||||
return(ENOSYS);
|
||||
return (nosys(td, (struct nosys_args *)uap));
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
sigreturn(struct thread *td, struct sigreturn_args *uap)
|
||||
|
@ -723,15 +723,17 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef COMPAT_43
|
||||
/*
|
||||
* Stub to satisfy the reference to osigreturn in the syscall table. This
|
||||
* is needed even for newer arches that don't support old signals because
|
||||
* the syscall table is machine-independent.
|
||||
*/
|
||||
int
|
||||
osigreturn(struct thread *td, struct osigreturn_args *uap)
|
||||
{
|
||||
|
||||
/* XXX: To be done */
|
||||
return(ENOSYS);
|
||||
return (nosys(td, (struct nosys_args *)uap));
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
sigreturn(struct thread *td, struct sigreturn_args *uap)
|
||||
|
@ -446,6 +446,18 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
|
||||
PROC_LOCK(p);
|
||||
}
|
||||
|
||||
/*
|
||||
* Stub to satisfy the reference to osigreturn in the syscall table. This
|
||||
* is needed even for newer arches that don't support old signals because
|
||||
* the syscall table is machine-independent.
|
||||
*/
|
||||
int
|
||||
osigreturn(struct thread *td, struct osigreturn_args *uap)
|
||||
{
|
||||
|
||||
return (nosys(td, (struct nosys_args *)uap));
|
||||
}
|
||||
|
||||
#ifndef _SYS_SYSPROTO_H_
|
||||
struct sigreturn_args {
|
||||
ucontext_t *ucp;
|
||||
|
Loading…
Reference in New Issue
Block a user