From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 18 09:02:29 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 25AAC16A4CE; Sat, 18 Sep 2004 09:02:29 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id C6EDA43D2D; Sat, 18 Sep 2004 09:02:28 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 280DEACAFE; Sat, 18 Sep 2004 11:02:27 +0200 (CEST) Date: Sat, 18 Sep 2004 11:02:27 +0200 From: Pawel Jakub Dawidek To: Giorgos Keramidas Message-ID: <20040918090227.GX30151@darkness.comp.waw.pl> References: <4146316C00007833@ims3a.cp.tin.it> <20040917093712.GB94990@orion.daedalusnetworks.priv> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="j6SHqnckpA+VQtNZ" Content-Disposition: inline In-Reply-To: <20040917093712.GB94990@orion.daedalusnetworks.priv> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: freebsd-hackers@freebsd.org cc: gerarra@tin.it Subject: Re: FreeBSD Kernel buffer overflow X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2004 09:02:29 -0000 --j6SHqnckpA+VQtNZ Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 17, 2004 at 12:37:12PM +0300, Giorgos Keramidas wrote: +> % +#ifdef INVARIANTS +> % + KASSERT(0 <=3D narg && narg <=3D 8, ("invalid number of syscal= l args")); +> % +#endif Maybe: KASSERT(0 <=3D narg && narg <=3D sizeof(args) / sizeof(args[0]), ("invalid number of syscall args")); So if we decide to increase/decrease it someday, we don't have to remember about this KASSERT(). --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --j6SHqnckpA+VQtNZ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBS/mjForvXbEpPzQRAuCYAJ4hISL5xYMiDagPT4RVMBTqiif8ngCg5nhz Wu+K33ypmpSkYevUksLNXCQ= =1cXj -----END PGP SIGNATURE----- --j6SHqnckpA+VQtNZ--