From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 10 08:18:06 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 20CD8106567A for ; Thu, 10 Jun 2010 08:18:06 +0000 (UTC) (envelope-from gljennjohn@googlemail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 94F338FC19 for ; Thu, 10 Jun 2010 08:18:05 +0000 (UTC) Received: by fxm7 with SMTP id 7so485745fxm.13 for ; Thu, 10 Jun 2010 01:18:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:reply-to:x-mailer:mime-version :content-type:content-transfer-encoding; bh=nTzdZYGBxhgIDv+FjpuygmAf6MBJgEsX3D6p3MPD2Co=; b=B9d3wdFgBdYQQngHUG1DG4gvSiKGNIssGnO4NUsxz393PsSVGHXij49TRc46riQMDw r/9r7FikN3vzCWiRhZ95UppjuTOML/oNzqvpZ/NYAsFScrBmPdJMdCbv4mWeRNaAfI0p kh/es3d7Ye//kq4SwvYz52CLacQQqo7I+k+Nk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :x-mailer:mime-version:content-type:content-transfer-encoding; b=TMWBmEOGJDHBJPQ4L6N5OIymowaGOj3Y34e+t/Wg31zjGsEqQitYTQkzcl4wSWbWT8 D0bORrnJnvqRqfxk7fmRl0NGD+nPi+HFkdb5CLvY0M102KFbHlzikxPUeivxWO6D6T4F 1W2i87wapexFswo2vb94kAFh6a//+4XT3nJFE= Received: by 10.223.97.149 with SMTP id l21mr3957145fan.91.1276157884191; Thu, 10 Jun 2010 01:18:04 -0700 (PDT) Received: from ernst.jennejohn.org (p578E22C4.dip.t-dialin.net [87.142.34.196]) by mx.google.com with ESMTPS id j23sm7647546faa.14.2010.06.10.01.18.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 10 Jun 2010 01:18:03 -0700 (PDT) Date: Thu, 10 Jun 2010 10:18:01 +0200 From: Gary Jennejohn To: Garrett Cooper Message-ID: <20100610101801.742fac25@ernst.jennejohn.org> In-Reply-To: References: <20100609121453.095d92b4@kibab.com> <4C0F9394.9030202@dataix.net> <20100609132543.GI83316@deviant.kiev.zoral.com.ua> X-Mailer: Claws Mail 3.7.5 (GTK+ 2.18.7; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Kostik Belousov , freebsd-hackers@freebsd.org, Bakulin , Ilya 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 Reply-To: gljennjohn@googlemail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2010 08:18:06 -0000 On Wed, 9 Jun 2010 10:12:54 -0700 Garrett Cooper wrote: > On Jun 9, 2010, at 6:25 AM, Kostik Belousov wrote: > > > On Wed, Jun 09, 2010 at 09:13:56AM -0400, jhell wrote: > >> On 06/09/2010 04:14, Ilya Bakulin wrote: > >>> Hi hackers! > >>> > >>> While discussing my project's implementation details with my mentor, > >>> Alexander Leidinger, we've found that one of the ideas needs to be discussed with community, > >>> to find out possible use cases. > >>> That is, if it should be possible to spoof non-existing features. For > >>> example, if currently running kernel doesn't support FreeBSD 5.0 compat > >>> layer, "kern.features.compat_freebsd5" will be absent when querying > >>> features list. The question is -- are there any cases when we want > >>> "kern.features.compat_freebsd5" be present? If some feature is not in > >>> kernel, then presenting its existence to the userland is useless > >>> and may be even harmful, if, for example, some application relies on this feature. > >>> Or there are some scenarios where such cheat is useful? > >>> > >> > >> I can not think of any viable reason why one would want to "spoof" this > >> when it is not available. > > Many ports are doing wrong thing there, checking for run-time features at > > the build-time, turning on/off some functionality depending on its > > presence on the build host. > > It's present in the ports Makefiles as well as in many autoconf scripts. It's bad because it causes problems with cross-build and other related scenarios, where you can't assume that the host system is going to match the target system. > I don't find one single file in the ports tree which uses kern.features. But I just checked what's in the tree, not what may be in the ports themselves, i.e., I didn't extract/configure any ports. -- Gary Jennejohn