From owner-freebsd-current Tue Apr 23 4:54:44 2002 Delivered-To: freebsd-current@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id 7DDD837B400; Tue, 23 Apr 2002 04:54:33 -0700 (PDT) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.2/8.12.2) with ESMTP id g3NBsHHx082147; Tue, 23 Apr 2002 13:54:18 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, current@FreeBSD.org Subject: Memory overwrite problem in the -current kernel ?? In-Reply-To: Your message of "Tue, 23 Apr 2002 04:48:46 PDT." <200204231148.g3NBmkp36899@freefall.freebsd.org> Date: Tue, 23 Apr 2002 13:54:17 +0200 Message-ID: <82146.1019562857@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This commit detects a memory overwrite problem in the kernel which happens before we ever get into userland for the first time. The commit which causes the problem to appear is my own commit to subr_disklabel.c (1.65). If the block below is put back in subr_disklabel.c the memory overwrite problem goes away (or at least doesn't happen in GEOM). My testbox is a single-cpu machine. Something is screwed somewhere... Poul-Henning ] #ifdef notquite ] /* ] * Mutex to use when delaying niced I/O bound processes in bioqdisksort(). ] */ ] static struct mtx dksort_mtx; ] static void ] dksort_init(void) ] { ] ] mtx_init(&dksort_mtx, "dksort", NULL, MTX_DEF); ] } ] SYSINIT(dksort, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, dksort_init, NULL) ] #endif In message <200204231148.g3NBmkp36899@freefall.freebsd.org>, Poul-Henning Kamp writes: >phk 2002/04/23 04:48:45 PDT > > Modified files: > sys/geom geom.h geom_dump.c geom_enc.c > geom_slice.c geom_subr.c > Log: > Introduce some serious paranoia to try to catch a memory overwrite problem > as early as possible. > > Sponsored by: DARPA & NAI Labs > > Revision Changes Path > 1.13 +13 -4 src/sys/geom/geom.h > 1.7 +1 -0 src/sys/geom/geom_dump.c > 1.3 +1 -0 src/sys/geom/geom_enc.c > 1.11 +2 -0 src/sys/geom/geom_slice.c > 1.8 +46 -2 src/sys/geom/geom_subr.c > -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message