Date: Sat, 28 Feb 2004 22:05:47 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: arch@freebsd.org Subject: Re: per-device sysctls Message-ID: <20040228214619.S6048@gamplex.bde.org> In-Reply-To: <11616.1077888933@critter.freebsd.dk> References: <11616.1077888933@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 27 Feb 2004, Poul-Henning Kamp wrote: > In message <20040227230124.D2469@gamplex.bde.org>, Bruce Evans writes: > >Only broken drivers use sysctl variables. ioctl(3) is a much better > >interface that sysctl(3) for accessing per-device info. sysctl(8) is > >a better interface than ioctl(8) for handling the few device control > >things that can be done in a generic way, but this is only because > >there are so few such things that ioctl(8) doesn't exist. > > sysctl is superior for properties that should not be vulnerable > to any user who happens to be able to open the device. Nope. Only broken drivers would provide more features than are intended to any user who happens to be able to open the device. Many drivers require write access to do write-like operations, and some bogusly require appropriate privilege. Extra device nodes (control devices) are be required to provide access to certain features (especially when opening the normal device is required to have a side effect). There is much more support for access control on device nodes than on sysctls. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040228214619.S6048>