From owner-cvs-all Sun Feb 16 17:34:52 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E062A37B401; Sun, 16 Feb 2003 17:34:50 -0800 (PST) Received: from sccrmhc01.attbi.com (sccrmhc01.attbi.com [204.127.202.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id A7DEF43F85; Sun, 16 Feb 2003 17:34:49 -0800 (PST) (envelope-from julian@elischer.org) Received: from interjet.elischer.org (12-232-168-4.client.attbi.com[12.232.168.4]) by sccrmhc01.attbi.com (sccrmhc01) with ESMTP id <2003021701344700100bqg35e>; Mon, 17 Feb 2003 01:34:48 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id RAA07525; Sun, 16 Feb 2003 17:34:46 -0800 (PST) Date: Sun, 16 Feb 2003 17:34:45 -0800 (PST) From: Julian Elischer To: Bruce Evans Cc: Alfred Perlstein , Max Khon , src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern sysv_shm.c In-Reply-To: <20030217111423.R3751-100000@gamplex.bde.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 17 Feb 2003, Bruce Evans wrote: > > Overflow checking of shminfo.shmmax isn't very useful. Most tunables > have no sanity checking, and none have complete sanity checking. For > shminfo.shmmax, users can get the same effect as overflow by setting > kern.ipc.shmmaxpages to a too-small value. E.g., 0 gives the same > result as 2^32/PAGE_SIZE after overflow, and overflow is benign on all > supported machines so the effect is also the same. > I've often thought at it would be good to be able to specify a sysctl or tunable (loader tunable) in a way that some simple min and max values are checked.. Ther are a lot of cases for sysctls where there needs to be a special handler because we need to check that the input is between 1