From owner-svn-src-head@FreeBSD.ORG Fri Oct 31 10:11:35 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9A091065679; Fri, 31 Oct 2008 10:11:35 +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 C993B8FC20; Fri, 31 Oct 2008 10:11:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9VABZT3076454; Fri, 31 Oct 2008 10:11:35 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9VABZGM076450; Fri, 31 Oct 2008 10:11:35 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200810311011.m9VABZGM076450@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 31 Oct 2008 10:11:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184499 - in head/sys: amd64/amd64 geom i386/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 10:11:36 -0000 Author: kib Date: Fri Oct 31 10:11:35 2008 New Revision: 184499 URL: http://svn.freebsd.org/changeset/base/184499 Log: Revert r184136. Instead, push the check for crashdumpmap overflow into the MD i386 and amd64 dump code. Requested by: jhb Retested by: pho MFC after: 3 days (+ 176304 + 184136) Modified: head/sys/amd64/amd64/dump_machdep.c head/sys/amd64/amd64/minidump_machdep.c head/sys/geom/geom_disk.c head/sys/i386/i386/dump_machdep.c Modified: head/sys/amd64/amd64/dump_machdep.c ============================================================================== --- head/sys/amd64/amd64/dump_machdep.c Fri Oct 31 09:41:06 2008 (r184498) +++ head/sys/amd64/amd64/dump_machdep.c Fri Oct 31 10:11:35 2008 (r184499) @@ -165,7 +165,7 @@ cb_dumpdata(struct md_pa *mdp, int seqnr va = 0; pgs = mdp->md_size / PAGE_SIZE; pa = mdp->md_start; - maxdumppgs = di->maxiosize / PAGE_SIZE; + maxdumppgs = min(di->maxiosize / PAGE_SIZE, MAXDUMPPGS); if (maxdumppgs == 0) /* seatbelt */ maxdumppgs = 1; Modified: head/sys/amd64/amd64/minidump_machdep.c ============================================================================== --- head/sys/amd64/amd64/minidump_machdep.c Fri Oct 31 09:41:06 2008 (r184498) +++ head/sys/amd64/amd64/minidump_machdep.c Fri Oct 31 10:11:35 2008 (r184499) @@ -104,7 +104,7 @@ blk_write(struct dumperinfo *di, char *p int error, i, c; u_int maxdumpsz; - maxdumpsz = di->maxiosize; + maxdumpsz = min(di->maxiosize, MAXDUMPPGS * PAGE_SIZE); if (maxdumpsz == 0) /* seatbelt */ maxdumpsz = PAGE_SIZE; error = 0; Modified: head/sys/geom/geom_disk.c ============================================================================== --- head/sys/geom/geom_disk.c Fri Oct 31 09:41:06 2008 (r184498) +++ head/sys/geom/geom_disk.c Fri Oct 31 10:11:35 2008 (r184499) @@ -179,7 +179,7 @@ g_disk_kerneldump(struct bio *bp, struct di.dumper = dp->d_dump; di.priv = dp; di.blocksize = dp->d_sectorsize; - di.maxiosize = min(dp->d_maxsize, MAXDUMPPGS * PAGE_SIZE); + di.maxiosize = dp->d_maxsize; di.mediaoffset = gkd->offset; if ((gkd->offset + gkd->length) > dp->d_mediasize) gkd->length = dp->d_mediasize - gkd->offset; Modified: head/sys/i386/i386/dump_machdep.c ============================================================================== --- head/sys/i386/i386/dump_machdep.c Fri Oct 31 09:41:06 2008 (r184498) +++ head/sys/i386/i386/dump_machdep.c Fri Oct 31 10:11:35 2008 (r184499) @@ -165,7 +165,7 @@ cb_dumpdata(struct md_pa *mdp, int seqnr va = 0; pgs = mdp->md_size / PAGE_SIZE; pa = mdp->md_start; - maxdumppgs = di->maxiosize / PAGE_SIZE; + maxdumppgs = min(di->maxiosize / PAGE_SIZE, MAXDUMPPGS); if (maxdumppgs == 0) /* seatbelt */ maxdumppgs = 1;