From owner-svn-src-stable-8@FreeBSD.ORG Sun Nov 21 10:00:43 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0D52106564A; Sun, 21 Nov 2010 10:00:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B61238FC1E; Sun, 21 Nov 2010 10:00:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oALA0hIo043311; Sun, 21 Nov 2010 10:00:43 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oALA0hl7043306; Sun, 21 Nov 2010 10:00:43 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201011211000.oALA0hl7043306@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 21 Nov 2010 10:00:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215609 - in stable/8/sys: amd64/amd64 i386/i386 sys vm X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Nov 2010 10:00:44 -0000 Author: kib Date: Sun Nov 21 10:00:43 2010 New Revision: 215609 URL: http://svn.freebsd.org/changeset/base/215609 Log: MFC r215309: Use symbolic names instead of hardcoding values for magic p_osrel constants. MFC r215321: Do not use __FreeBSD_version prefix for the special osrel version. Modified: stable/8/sys/amd64/amd64/trap.c stable/8/sys/i386/i386/trap.c stable/8/sys/sys/param.h stable/8/sys/vm/vm_mmap.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/amd64/trap.c ============================================================================== --- stable/8/sys/amd64/amd64/trap.c Sun Nov 21 09:50:11 2010 (r215608) +++ stable/8/sys/amd64/amd64/trap.c Sun Nov 21 10:00:43 2010 (r215609) @@ -363,9 +363,8 @@ trap(struct trapframe *frame) * This check also covers the images * without the ABI-tag ELF note. */ - if (SV_CURPROC_ABI() == - SV_ABI_FREEBSD && - p->p_osrel >= 700004) { + if (SV_CURPROC_ABI() == SV_ABI_FREEBSD + && p->p_osrel >= P_OSREL_SIGSEGV) { i = SIGSEGV; ucode = SEGV_ACCERR; } else { Modified: stable/8/sys/i386/i386/trap.c ============================================================================== --- stable/8/sys/i386/i386/trap.c Sun Nov 21 09:50:11 2010 (r215608) +++ stable/8/sys/i386/i386/trap.c Sun Nov 21 10:00:43 2010 (r215609) @@ -426,9 +426,8 @@ trap(struct trapframe *frame) * This check also covers the images * without the ABI-tag ELF note. */ - if (SV_CURPROC_ABI() == - SV_ABI_FREEBSD && - p->p_osrel >= 700004) { + if (SV_CURPROC_ABI() == SV_ABI_FREEBSD + && p->p_osrel >= P_OSREL_SIGSEGV) { i = SIGSEGV; ucode = SEGV_ACCERR; } else { Modified: stable/8/sys/sys/param.h ============================================================================== --- stable/8/sys/sys/param.h Sun Nov 21 09:50:11 2010 (r215608) +++ stable/8/sys/sys/param.h Sun Nov 21 10:00:43 2010 (r215609) @@ -60,6 +60,11 @@ #undef __FreeBSD_version #define __FreeBSD_version 801501 /* Master, propagated to newvers */ +#ifdef _KERNEL +#define P_OSREL_SIGSEGV 700004 +#define P_OSREL_MAP_ANON 800104 +#endif + #ifndef LOCORE #include #endif Modified: stable/8/sys/vm/vm_mmap.c ============================================================================== --- stable/8/sys/vm/vm_mmap.c Sun Nov 21 09:50:11 2010 (r215608) +++ stable/8/sys/vm/vm_mmap.c Sun Nov 21 10:00:43 2010 (r215609) @@ -231,7 +231,7 @@ mmap(td, uap) fp = NULL; /* make sure mapping fits into numeric range etc */ if ((uap->len == 0 && !SV_CURPROC_FLAG(SV_AOUT) && - curproc->p_osrel >= 800104) || + curproc->p_osrel >= P_OSREL_MAP_ANON) || ((flags & MAP_ANON) && (uap->fd != -1 || pos != 0))) return (EINVAL);