Date: Tue, 23 Apr 2002 18:32:01 -0400 (EDT) From: John Baldwin <jhb@FreeBSD.org> To: Poul-Henning Kamp <phk@critter.freebsd.dk> Cc: current@FreeBSD.org, cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: RE: Memory overwrite problem in the -current kernel ?? Message-ID: <XFMail.20020423183201.jhb@FreeBSD.org> In-Reply-To: <82146.1019562857@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On 23-Apr-2002 Poul-Henning Kamp wrote:
>
> 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...
Uhh, you mean if the dksort_mtx is put back? What if the function doesn't do
anything, does it still work? Also, what if you just have the static mtx,
maybe the mtx is preventing a buffer overflow from hosing other data?
> 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.
--
John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20020423183201.jhb>
