svn commit: r215609 - in stable/8/sys: amd64/amd64 i386/i386 sys vm
Konstantin Belousov
kib at FreeBSD.org
Sun Nov 21 10:00:44 UTC 2010
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 <sys/types.h>
#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);
More information about the svn-src-stable
mailing list