Commit 4181d225 authored by Eric W. Biederman's avatar Eric W. Biederman

signal: Remove ifdefs for BUS_MCEERR_AR and BUS_MCEERR_AO

With the recent architecture cleanups these si_codes are always
defined so there is no need to test for them.
Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
parent 3a11ab14
...@@ -117,26 +117,15 @@ static int signalfd_copyinfo(struct signalfd_siginfo __user *uinfo, ...@@ -117,26 +117,15 @@ static int signalfd_copyinfo(struct signalfd_siginfo __user *uinfo,
#ifdef __ARCH_SI_TRAPNO #ifdef __ARCH_SI_TRAPNO
err |= __put_user(kinfo->si_trapno, &uinfo->ssi_trapno); err |= __put_user(kinfo->si_trapno, &uinfo->ssi_trapno);
#endif #endif
#ifdef BUS_MCEERR_AO
/* /*
* Other callers might not initialize the si_lsb field, * Other callers might not initialize the si_lsb field,
* so check explicitly for the right codes here. * so check explicitly for the right codes here.
*/ */
if (kinfo->si_signo == SIGBUS && if (kinfo->si_signo == SIGBUS &&
kinfo->si_code == BUS_MCEERR_AO) ((kinfo->si_code == BUS_MCEERR_AR) ||
(kinfo->si_code == BUS_MCEERR_AO)))
err |= __put_user((short) kinfo->si_addr_lsb, err |= __put_user((short) kinfo->si_addr_lsb,
&uinfo->ssi_addr_lsb); &uinfo->ssi_addr_lsb);
#endif
#ifdef BUS_MCEERR_AR
/*
* Other callers might not initialize the si_lsb field,
* so check explicitly for the right codes here.
*/
if (kinfo->si_signo == SIGBUS &&
kinfo->si_code == BUS_MCEERR_AR)
err |= __put_user((short) kinfo->si_addr_lsb,
&uinfo->ssi_addr_lsb);
#endif
break; break;
case SIL_CHLD: case SIL_CHLD:
err |= __put_user(kinfo->si_pid, &uinfo->ssi_pid); err |= __put_user(kinfo->si_pid, &uinfo->ssi_pid);
......
...@@ -1539,7 +1539,6 @@ int send_sig_fault(int sig, int code, void __user *addr ...@@ -1539,7 +1539,6 @@ int send_sig_fault(int sig, int code, void __user *addr
return send_sig_info(info.si_signo, &info, t); return send_sig_info(info.si_signo, &info, t);
} }
#if defined(BUS_MCEERR_AO) && defined(BUS_MCEERR_AR)
int force_sig_mceerr(int code, void __user *addr, short lsb, struct task_struct *t) int force_sig_mceerr(int code, void __user *addr, short lsb, struct task_struct *t)
{ {
struct siginfo info; struct siginfo info;
...@@ -1568,7 +1567,6 @@ int send_sig_mceerr(int code, void __user *addr, short lsb, struct task_struct * ...@@ -1568,7 +1567,6 @@ int send_sig_mceerr(int code, void __user *addr, short lsb, struct task_struct *
return send_sig_info(info.si_signo, &info, t); return send_sig_info(info.si_signo, &info, t);
} }
EXPORT_SYMBOL(send_sig_mceerr); EXPORT_SYMBOL(send_sig_mceerr);
#endif
int force_sig_bnderr(void __user *addr, void __user *lower, void __user *upper) int force_sig_bnderr(void __user *addr, void __user *lower, void __user *upper)
{ {
...@@ -2880,14 +2878,11 @@ int __copy_siginfo_to_user32(struct compat_siginfo __user *to, ...@@ -2880,14 +2878,11 @@ int __copy_siginfo_to_user32(struct compat_siginfo __user *to,
#ifdef __ARCH_SI_TRAPNO #ifdef __ARCH_SI_TRAPNO
new.si_trapno = from->si_trapno; new.si_trapno = from->si_trapno;
#endif #endif
#ifdef BUS_MCEERR_AR if ((from->si_signo == SIGBUS) &&
if ((from->si_signo == SIGBUS) && (from->si_code == BUS_MCEERR_AR)) ((from->si_code == BUS_MCEERR_AR) ||
new.si_addr_lsb = from->si_addr_lsb; (from->si_code == BUS_MCEERR_AO)))
#endif
#ifdef BUS_MCEERR_AO
if ((from->si_signo == SIGBUS) && (from->si_code == BUS_MCEERR_AO))
new.si_addr_lsb = from->si_addr_lsb; new.si_addr_lsb = from->si_addr_lsb;
#endif
if ((from->si_signo == SIGSEGV) && if ((from->si_signo == SIGSEGV) &&
(from->si_code == SEGV_BNDERR)) { (from->si_code == SEGV_BNDERR)) {
new.si_lower = ptr_to_compat(from->si_lower); new.si_lower = ptr_to_compat(from->si_lower);
...@@ -2964,14 +2959,11 @@ int copy_siginfo_from_user32(struct siginfo *to, ...@@ -2964,14 +2959,11 @@ int copy_siginfo_from_user32(struct siginfo *to,
#ifdef __ARCH_SI_TRAPNO #ifdef __ARCH_SI_TRAPNO
to->si_trapno = from.si_trapno; to->si_trapno = from.si_trapno;
#endif #endif
#ifdef BUS_MCEERR_AR if ((from.si_signo == SIGBUS) &&
if ((from.si_signo == SIGBUS) && (from.si_code == BUS_MCEERR_AR)) ((from.si_code == BUS_MCEERR_AR) ||
(from.si_code == BUS_MCEERR_AO)))
to->si_addr_lsb = from.si_addr_lsb; to->si_addr_lsb = from.si_addr_lsb;
#endif
#ifdef BUS_MCEER_AO
if ((from.si_signo == SIGBUS) && (from.si_code == BUS_MCEERR_AO))
to->si_addr_lsb = from.si_addr_lsb;
#endif
if ((from.si_signo == SIGSEGV) && (from.si_code == SEGV_BNDERR)) { if ((from.si_signo == SIGSEGV) && (from.si_code == SEGV_BNDERR)) {
to->si_lower = compat_ptr(from.si_lower); to->si_lower = compat_ptr(from.si_lower);
to->si_upper = compat_ptr(from.si_upper); to->si_upper = compat_ptr(from.si_upper);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment