Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Sep 2004 13:44:53 +0300
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        gerarra@tin.it
Subject:   Re: FreeBSD Kernel buffer overflow
Message-ID:  <20040917104453.GB21013@orion.daedalusnetworks.priv>
In-Reply-To: <200409170946.i8H9kr4P021050@apollo.backplane.com>
References:  <4146316C00007833@ims3a.cp.tin.it> <20040917093712.GB94990@orion.daedalusnetworks.priv> <200409170946.i8H9kr4P021050@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2004-09-17 02:46, Matthew Dillon <dillon@apollo.backplane.com> wrote:
> :A KASSERT() wrapped in #ifdef INVARIANTS has zero overhead for normal,
> :non-debugging kernels.  The developers who are responsible for writing and
> :testing new system calls should use INVARIANTS anyway, so they'll quickly
> :catch the mistake.
>
>     I strongly recommend that all kernels always be compiled with INVARIANTS
>     turned on.  Even production kernels.  I believe GENERIC defaults to
>     INVARIANTS turned on.

In -CURRENT it's enabled for all platforms:

: $ grep 'INVARIANTS[[:space:]]' */conf/GENERIC
: alpha/conf/GENERIC:options      INVARIANTS              #Enable calls of extra sanity checking
: amd64/conf/GENERIC:options      INVARIANTS              # Enable calls of extra sanity checking
: i386/conf/GENERIC:options       INVARIANTS              # Enable calls of extra sanity checking
: pc98/conf/GENERIC:options       INVARIANTS              # Enable calls of extra sanity checking
: powerpc/conf/GENERIC:options    INVARIANTS              #Enable calls of extra sanity checking
: sparc64/conf/GENERIC:options    INVARIANTS              # Enable calls of extra sanity checking

> I'm not sure what is done during release cycles but presumably
> INVARIANTS is left on for the release build as well (if it isn't it
> should be).

I'm not sure either.  I've been running HEAD for a long time; for an
informed answer I'd have to ask the RE people.

- Giorgos



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