From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 11 09:08:35 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 639721065678 for ; Fri, 11 Jun 2010 09:08:35 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id F1D678FC18 for ; Fri, 11 Jun 2010 09:08:34 +0000 (UTC) Received: from outgoing.leidinger.net (pD954FC95.dip.t-dialin.net [217.84.252.149]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 4790784400A; Fri, 11 Jun 2010 11:08:31 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 1B39B51EF; Fri, 11 Jun 2010 11:08:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1276247308; bh=ESYvyCrmvNF8fhUwqQmmY3jf2mun8ksn70Zx/3UvZrw=; h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding; b=0xqf1YMPDHSIx2r5R0E3Ze0weXgz1fLRYIYYTINZ19H+2MpvO+8Xrjz6tu8WmbO4G J8fFVl1pSB4f+XHHEH/u3FRgch14g+5RZXa2OSFfTeLjhaM9OWU+6yJ5MAeObR14EK kCQglK/AO1zZbuN8Uh5jfls+K3KP3hddSj7QsQfqlNwuzJ8R6G4fPEQTZdfkYP54Qp Wkrf1y9/bTFLshIcaNZFRbJqew0cRz7el9Na81IXXY26Sjihu7LC28jBXsnFchCIS2 CHszW3sRqBpO/UKq4l3S6TsguVmcmZauBSj5FVefoRpaMHME8iw+tpJAAn5tOgU1x9 dLia/lcy0c4jQ== Received: (from www@localhost) by webmail.leidinger.net (8.14.4/8.13.8/Submit) id o5B98RaY065406; Fri, 11 Jun 2010 11:08:27 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.ec.europa.eu (pslux.ec.europa.eu [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Fri, 11 Jun 2010 11:08:27 +0200 Message-ID: <20100611110827.94483dvv07ske0ao@webmail.leidinger.net> Date: Fri, 11 Jun 2010 11:08:27 +0200 From: Alexander Leidinger To: Adrian Chadd References: <20100609121453.095d92b4@kibab.com> <4C0F9394.9030202@dataix.net> <20100609132543.GI83316@deviant.kiev.zoral.com.ua> <20100610101801.742fac25@ernst.jennejohn.org> <20100610160109.19585782fyr3buw4@webmail.leidinger.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 4790784400A.A6A85 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-1.1, required 6, autolearn=disabled, ALL_TRUSTED -1.00, DKIM_SIGNED 0.10, DKIM_VALID -0.10, DKIM_VALID_AU -0.10) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1276852112.72435@CDTtea5FgK2PSJANK4i97g X-EBL-Spam-Status: No X-Mailman-Approved-At: Fri, 11 Jun 2010 11:10:16 +0000 Cc: Kostik Belousov , freebsd-hackers@freebsd.org, Garrett Cooper , Ilya Bakulin Subject: Re: GSoC: registration of optional kernel features via sysctl: a question to the community X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2010 09:08:35 -0000 Quoting Adrian Chadd (from Fri, 11 Jun 2010 12:28:58 +0800): > How about exposing a simple userspace API for doing this, rather than > doing it via sysctl? > > That way you could "simply" tie alternative overrides in as needed for > builds (eg, environment variables setting overrides; and/or pointing > to a configuration file with such) but not affect any runtime > detection the rest of the system is doing. There is a framework (ok, one macro: FEATURE()) for the kern.features.X sysctl's. This exposes the features in sysctl when they are there. The goals of the GSoC project are to add more FEATURE()'s to the kernel, and to develop a way to spoof features. A simple way of doing the spoofing part would be some bsd.XXX.mk for ports so that you can maybe set an env-variable to spoof features. This way ports can have a look at it at build-time. This is not an option if you want to know if a feature is there at run-time (spoofing-off a feature just hides the sysctl, it does not disable the feature or prevents the use of it, it is just an administrative way of telling "please respect my wish, do not use XXX", and as such we wheren't able to come up with an use for spoof-on). Using an userland program -- maybe "featurectl" or "ftctl" or whatever -- does not hide the sysctl's, so any program which decides to use the sysctl's instead, will still see the administratively hidden features. If you want to make features (sysctl) hidden in a jail (not from within the jail but from outside the jail), you have to do something in the kernel anyway, so you do not really need an additional userland program (it's not a problem with sysctl to do it, the question is if spoof-on can only cause harm or not). So far I've seen only responses which I would describe as: - "rumors are there are some ports that maybe could use this" - "I do not have an answer for you, but maybe you could do X" Thank you to all such answers, but as this is not some just-for-fun project (Google is paying money to the students for their work), I will tell Ilya to not care about spoof-on, if nobody is showing us a specific example of where spoof-on would make sense (a port where this makes sense would be the best way, an hypotetical example will have to pass a likelyness-analysis and an are-there-good-alternatives-check). As the GSoC is also having a deadline, I will set the deadline for providing such ports/examples to the end of this month. Bye, Alexander. -- You are only young once, but you can stay immature indefinitely. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137