Use SIGSEGV signal for memory protection failures from userspace on MIPS.

(same as ARMv8, RISC-V and other architectures do).
This makes mmap tests happy.

Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
This commit is contained in:
br 2016-09-28 14:13:41 +00:00
parent 6f20b23b0e
commit fd8ef775f0

View File

@ -741,8 +741,11 @@ trap(struct trapframe *trapframe)
}
goto err;
}
ucode = ftype;
i = ((rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV);
i = SIGSEGV;
if (rv == KERN_PROTECTION_FAILURE)
ucode = SEGV_ACCERR;
else
ucode = SEGV_MAPERR;
addr = trapframe->pc;
msg = "BAD_PAGE_FAULT";