From owner-freebsd-current Mon Feb 4 8: 4: 8 2002 Delivered-To: freebsd-current@freebsd.org Received: from modemcable044.152-202-24.mtl.mc.videotron.ca (modemcable044.152-202-24.mtl.mc.videotron.ca [24.202.152.44]) by hub.freebsd.org (Postfix) with ESMTP id 36B6E37B41B; Mon, 4 Feb 2002 08:04:00 -0800 (PST) Received: from anphor (anphor.grandpre.mindstep.com [192.168.0.8]) by jacuzzi.grandpre.mindstep.com (Postfix) with SMTP id A3B1D14D3F; Mon, 4 Feb 2002 11:03:21 -0500 (EST) From: "Patrick Bihan-Faou" To: , Subject: RE: Junior Annoying Hacker Task Date: Mon, 4 Feb 2002 17:03:52 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 In-Reply-To: <15452.50112.625066.914576@guru.mired.org> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, I don't know whether the suggested approach is really a good one or not, but as far as implementing some registry-like features in FreeBSD, we have developped something that proves to be useful. The idea was to extend the sysctl mechanism to make it dynamic from the user-land point of view. This was implemented as a kernel module (a simple one too) and a modified sysctl command line. With this mod we can add/remove nodes in the sysctl tree and use it to store information that is needed by many applications. The implementation we have is certainly rough, but it gets the job done and represents a very easy and convenient tool for: - sharing non sensitive bits of information between processes - storing configuration/status data in an easy to use manner - benefit from the tree like presentation of sysctl (building a gui around this should be easy) - don't loose the 'vi' compatibility (sysctl values can be loaded at boot time from a text file) Note that the security model around these 'user-land dynamic sysctl entries' can be improved significantly, but as a proof of concept the mod is useful. Some may argue that storing userland data in the kernel space is Not A Nice Thing(tm) but it certainly makes things a lot easier. Patrick. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message