Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Apr 2002 13:54:17 +0200
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, current@FreeBSD.org
Subject:   Memory overwrite problem in the -current kernel ??
Message-ID:  <82146.1019562857@critter.freebsd.dk>
In-Reply-To: Your message of "Tue, 23 Apr 2002 04:48:46 PDT." <200204231148.g3NBmkp36899@freefall.freebsd.org> 

next in thread | previous in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?82146.1019562857>