From 6302a396006d3cd467c19c084078ec62ce889de8 Mon Sep 17 00:00:00 2001 From: Hiten Pandya Date: Wed, 2 Jun 2004 07:34:29 +0000 Subject: [PATCH] Merge from FreeBSD, RELENG_4 branch, revision 1.250.2.26. --- original commit message --- Log: There is a comma missing in the table initializing the pmap_prefault_pageorder array. This has two effects: 1. The resulting bogus contents of the array thwarts part of the optimization effect pmap_prefault() is supposed to have. 2. The resulting array is only 7 elements long (auto-sized), while pmap_prefault() expects it to be the intended 8 elements. So this function in fact accesses memory beyond the end of the array. Fortunately though, if the data at this location is out of bounds it will be ignored. This bug dates back more than 6 years. It has been introduced in revision 1.178. Submitted by: Uwe Doering PR: 67460 --- original commit message --- --- sys/i386/i386/pmap.c | 4 ++-- sys/platform/pc32/i386/pmap.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index a4ee26ed93..aa0fabfb4b 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -40,7 +40,7 @@ * * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 * $FreeBSD: src/sys/i386/i386/pmap.c,v 1.250.2.18 2002/03/06 22:48:53 silby Exp $ - * $DragonFly: src/sys/i386/i386/Attic/pmap.c,v 1.42 2004/05/31 11:43:49 hmp Exp $ + * $DragonFly: src/sys/i386/i386/Attic/pmap.c,v 1.43 2004/06/02 07:34:29 hmp Exp $ */ /* @@ -2412,7 +2412,7 @@ retry: static int pmap_prefault_pageorder[] = { -PAGE_SIZE, PAGE_SIZE, -2 * PAGE_SIZE, 2 * PAGE_SIZE, - -3 * PAGE_SIZE, 3 * PAGE_SIZE + -3 * PAGE_SIZE, 3 * PAGE_SIZE, -4 * PAGE_SIZE, 4 * PAGE_SIZE }; diff --git a/sys/platform/pc32/i386/pmap.c b/sys/platform/pc32/i386/pmap.c index 681e85bd35..33f629f4b8 100644 --- a/sys/platform/pc32/i386/pmap.c +++ b/sys/platform/pc32/i386/pmap.c @@ -40,7 +40,7 @@ * * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 * $FreeBSD: src/sys/i386/i386/pmap.c,v 1.250.2.18 2002/03/06 22:48:53 silby Exp $ - * $DragonFly: src/sys/platform/pc32/i386/pmap.c,v 1.42 2004/05/31 11:43:49 hmp Exp $ + * $DragonFly: src/sys/platform/pc32/i386/pmap.c,v 1.43 2004/06/02 07:34:29 hmp Exp $ */ /* @@ -2412,7 +2412,7 @@ retry: static int pmap_prefault_pageorder[] = { -PAGE_SIZE, PAGE_SIZE, -2 * PAGE_SIZE, 2 * PAGE_SIZE, - -3 * PAGE_SIZE, 3 * PAGE_SIZE + -3 * PAGE_SIZE, 3 * PAGE_SIZE, -4 * PAGE_SIZE, 4 * PAGE_SIZE }; -- 2.41.0