From owner-cvs-all Wed Aug 15 4:35:54 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 3BD6C37B410; Wed, 15 Aug 2001 04:35:46 -0700 (PDT) (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f7FBZkB92947; Wed, 15 Aug 2001 04:35:46 -0700 (PDT) (envelope-from bde) Message-Id: <200108151135.f7FBZkB92947@freefall.freebsd.org> From: Bruce Evans Date: Wed, 15 Aug 2001 04:35:46 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern kern_shutdown.c subr_disk.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG bde 2001/08/15 04:35:46 PDT Modified files: sys/kern kern_shutdown.c subr_disk.c Log: Don't dump on the label sector or below. This avoids clobbering the label if the dump device overflaps the label (which is a slight misconfiguration). Dump routines don't use dscheck(), so the normal write protection of the label doesn't help. Reduced some nearby overflow bugs. In disk_dumpcheck(), there was (fatal but fail-safe) overflow on i386's with 4GB of memory, at least if Maxmem was the top page (can this happen?). The fix assumes that the sector size divides PAGE_SIZE (dump routines already assume this). In setdumpdev(), the corresponding overflow occurred with only about 2GB of memory on all machines with 32-bit ints. This allowed setdumpdev() to succeed when it shouldn't have, but then disk_dumpcheck() failed safe later. Except in old versions of FreeBSD like RELENG_3 where there is no disk_dumpcheck(). PR: 28164 (label clobbering part) MFC after: 1 week Revision Changes Path 1.103 +4 -3 src/sys/kern/kern_shutdown.c 1.42 +3 -3 src/sys/kern/subr_disk.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message