goto dopanic;
}
ucode = v;
- i = (rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV;
+ i = SIGSEGV;
break;
}
type, code);
panictrap(type, code, v, fp);
}
- trapsignal(p, (rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV, v);
+ trapsignal(p, SIGSEGV, v);
if ((type & T_USER) == 0)
return;
userret(p, fp->f_pc, sticks);
type, code);
panictrap(type, code, v, fp);
}
- trapsignal(p, (rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV, v);
+ trapsignal(p, SIGSEGV, v);
if ((type & T_USER) == 0)
return;
userret(p, fp->f_pc, sticks);
goto dopanic;
}
ucode = v;
- i = (rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV;
+ i = SIGSEGV;
break;
}
}
}
p->p_addr->u_pcb.pcb_onfault = oonfault;
/*
- * Determine the cause of the failure if any translating to
- * a signal. If the corresponding VA is valid and RO it is
- * a protection fault (SIGBUS) otherwise consider it an
- * illegal reference (SIGSEGV).
+ * Any problems are SIGSEGV's
*/
- if (err) {
- if (vm_map_check_protection(&p->p_vmspace->vm_map,
- trunc_page(fa), round_page(fa),
- VM_PROT_READ) &&
- !vm_map_check_protection(&p->p_vmspace->vm_map,
- trunc_page(fa), round_page(fa),
- VM_PROT_WRITE))
- err = SIGBUS;
- else
- err = SIGSEGV;
- }
+ if (err)
+ err = SIGSEGV;
return(err);
}
* If an error is detected during trap, syscall, or interrupt exit, trap() will
* change %eip to point to one of these labels. We clean up the stack, if
* necessary, and resume as if we were handling a general protection fault.
- * This will cause the process to get a SIGBUS.
+ * This will cause the process to get a SIGSEGV.
*/
ENTRY(resume_iret)
ZTRAP(T_PROTFLT)
map, va, ftype, rv);
goto we_re_toast;
}
- trapsignal(p, (rv == KERN_PROTECTION_FAILURE)
- ? SIGBUS : SIGSEGV, T_PAGEFLT);
+ trapsignal(p, SIGSEGV, T_PAGEFLT);
break;
}
goto dopanic;
}
ucode = v;
- i = (rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV;
+ i = SIGSEGV;
break;
}
}
}
p->p_addr->u_pcb.pcb_onfault = oonfault;
/*
- * Determine the cause of the failure if any translating to
- * a signal. If the corresponding VA is valid and RO it is
- * a protection fault (SIGBUS) otherwise consider it an
- * illegal reference (SIGSEGV).
+ * Any problems are SIGSEGV's
*/
- if (err) {
- if (vm_map_check_protection(&p->p_vmspace->vm_map,
- trunc_page(fa), round_page(fa),
- VM_PROT_READ) &&
- !vm_map_check_protection(&p->p_vmspace->vm_map,
- trunc_page(fa), round_page(fa),
- VM_PROT_WRITE))
- err = SIGBUS;
- else
- err = SIGSEGV;
- }
+ if (err)
+ err = SIGSEGV;
return(err);
}
-/* $Id: trap.c,v 1.4 1995/11/23 13:14:31 deraadt Exp $ */
+/* $Id: trap.c,v 1.5 1996/01/12 16:45:14 deraadt Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
goto dopanic;
}
ucode = v;
- i = (rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV;
+ i = SIGSEGV;
break;
}
}
}
p->p_addr->u_pcb.pcb_onfault = oonfault;
/*
- * Determine the cause of the failure if any translating to
- * a signal. If the corresponding VA is valid and RO it is
- * a protection fault (SIGBUS) otherwise consider it an
- * illegal reference (SIGSEGV).
+ * Any problems are SIGSEGV's
*/
- if (err) {
- if (vm_map_check_protection(&p->p_vmspace->vm_map,
- trunc_page(fa), round_page(fa),
- VM_PROT_READ) &&
- !vm_map_check_protection(&p->p_vmspace->vm_map,
- trunc_page(fa), round_page(fa),
- VM_PROT_WRITE))
- err = SIGBUS;
- else
- err = SIGSEGV;
- }
+ if (err)
+ err = SIGSEGV;
return(err);
}
frame->snip = frame->sxip & ~NIP_E;
}
} else {
- sig = result == KERN_PROTECTION_FAILURE ? SIGBUS : SIGSEGV;
+ sig = result == SIGSEGV;
}
break;
* APDEpde (or there may be no problem with APDEpde).
*/
if (va > 0xFEBFF000) {
- v = KERN_FAILURE; /* becomes SIGBUS */
+ v = KERN_FAILURE; /* becomes SIGSEGV */
goto nogo;
}
/*
type, tear, msr);
goto we_re_toast;
}
- i = (rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV;
+ i = SIGSEGV;
break;
}
* from: Utah Hdr: trap.c 1.32 91/04/06
*
* from: @(#)trap.c 8.5 (Berkeley) 1/11/94
- * $Id: trap.c,v 1.3 1995/10/29 00:46:10 deraadt Exp $
+ * $Id: trap.c,v 1.4 1996/01/12 16:45:19 deraadt Exp $
*/
#include <sys/param.h>
goto err;
}
ucode = vadr;
- i = (rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV;
+ i = SIGSEGV;
break;
}
case T_ADDR_ERR_ST+T_USER: /* misaligned or kseg access */
case T_BUS_ERR_IFETCH+T_USER: /* BERR asserted to cpu */
case T_BUS_ERR_LD_ST+T_USER: /* BERR asserted to cpu */
- i = SIGSEGV;
+ i = SIGBUS;
break;
case T_SYSCALL+T_USER:
goto err;
}
ucode = vadr;
- i = (rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV;
+ i = SIGSEGV;
break;
}
case T_ADDR_ERR_ST+T_USER: /* misaligned or kseg access */
case T_BUS_ERR_IFETCH+T_USER: /* BERR asserted to cpu */
case T_BUS_ERR_LD_ST+T_USER: /* BERR asserted to cpu */
- i = SIGSEGV;
+ i = SIGBUS;
break;
case T_SYSCALL+T_USER:
goto dopanic;
}
ucode = v;
- sig = (rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV;
+ sig = SIGSEGV;
break;
} /* T_MMUFLT */
} /* switch */