From owner-svn-src-all@freebsd.org Wed Sep 28 14:13:42 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 688ADC0132A; Wed, 28 Sep 2016 14:13:42 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35C9E101E; Wed, 28 Sep 2016 14:13:42 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8SEDfg6083815; Wed, 28 Sep 2016 14:13:41 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8SEDfBq083814; Wed, 28 Sep 2016 14:13:41 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609281413.u8SEDfBq083814@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Wed, 28 Sep 2016 14:13:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306408 - head/sys/mips/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 14:13:42 -0000 Author: br Date: Wed Sep 28 14:13:41 2016 New Revision: 306408 URL: https://svnweb.freebsd.org/changeset/base/306408 Log: 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 Modified: head/sys/mips/mips/trap.c Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Wed Sep 28 13:29:11 2016 (r306407) +++ head/sys/mips/mips/trap.c Wed Sep 28 14:13:41 2016 (r306408) @@ -741,8 +741,11 @@ dofault: } 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";