From owner-freebsd-current@FreeBSD.ORG Mon Jul 2 08:28:42 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CE881065715; Mon, 2 Jul 2012 08:28:42 +0000 (UTC) (envelope-from rwatson@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 342678FC08; Mon, 2 Jul 2012 08:28:39 +0000 (UTC) Received: from [192.168.2.111] (host86-149-82-83.range86-149.btcentralplus.com [86.149.82.83]) by cyrus.watson.org (Postfix) with ESMTPSA id 6D4C946B1A; Mon, 2 Jul 2012 04:28:37 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=iso-8859-1 From: "Robert N. M. Watson" In-Reply-To: Date: Mon, 2 Jul 2012 09:28:35 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: mdf@FreeBSD.org X-Mailer: Apple Mail (2.1278) Cc: bp@freebsd.org, Arnaud Lacombe , freebsd-hackers@freebsd.org, FreeBSD Current , kby@freebsd.org, Wojciech Puchar , Chris Rees Subject: Re: sysctl filesystem ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 08:28:42 -0000 On 26 Jun 2012, at 15:42, mdf@FreeBSD.org wrote: > While I understand the problems you allude to, the sysctl(8) binary > can protect itself from them. IMO the biggest problem with sysctls > not being files is that it makes no sense from the core UNIX > philosophy that everything is a file. Sockets and pipes and character > devices and even unseekable things like stdout are files; why aren't > these other objects that allow read, write, and have their own > namespace? I think I agree with what you're saying, subject to one modification: = rather than saying "files", say "file descriptors", which are not quite = the same but are, I think, what you mean. This doesn't mean you end up = with a special file system mounted on /foo -- we don't do that for = sockets or pipes --- but rather, we end up with using a similar = object-oriented interface. And hence, BTW, our recent experimental = addition of process descriptors to the API in support of Capsicum. = However, I wonder how well that applies to sysctls, which unlike = pipes/sockets, don't have an event model, etc... Robert=