Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Jun 2010 16:01:04 +0200
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        jhell <jhell@dataix.net>
Cc:        Kostik Belousov <kostikbel@gmail.com>, Ilya Bakulin <webmaster@kibab.com>, freebsd-hackers@freebsd.org
Subject:   Re: GSoC: registration of optional kernel features via sysctl: a question to the community
Message-ID:  <20100610160104.16285uq2jhuio34s@webmail.leidinger.net>
In-Reply-To: <4C0FAB18.7010902@dataix.net>
References:  <20100609121453.095d92b4@kibab.com> <4C0F9394.9030202@dataix.net> <20100609132543.GI83316@deviant.kiev.zoral.com.ua> <4C0FAB18.7010902@dataix.net>

next in thread | previous in thread | raw e-mail | index | archive | help

Quoting jhell <jhell@dataix.net> (from Wed, 09 Jun 2010 10:54:16 -0400):

> That would lead me to believe that the elimination of this sysctl would
> be better suited to solve the outcome of cases like this.
>
> And leads me to believe that it still rests on the end-user to tell
> whether or not they have that compatibility layer compiled in.
>
> Like I stated more towards the end of my last message "I believe"
> checking __FreeBSD_version should suffice and leave the final result up
> to the end-user as GENERIC will have the COMPAT_FREEBSD{N} layers
> compiled in that it needs or can support or are recommended.
>
> Being that this is a broad scenario and many different compilations of
> kernels could be used I still do not see a need to test for every one of
> them if an adequate means already exists. GENERIC in any case should be
> the kernel that is depended on and testing against __FreeBSD_version for
> what COMPAT versions are supported.

Maybe there is a misconception of what is being done.

We will have something like (out of the top of my head, do not nail me  
on the spelling or a particular feature):
  kern.features.compat_4
  kern.features.compat_6
  kern.features.softupdates
  kern.features.ufs_snapshots

As soon as something is active in the kernel (directly compiled in or  
via a module), the corresponding kern.features.XXX entry will show up  
(with a value of 1). The spoofing feature which Ilya was talking about  
in this thread will for sure allow to mask an existing feature away.

__FreeBSD_version is not adequate at all for things which require a  
feature to be present in the kernel (can be removed in a custom  
kernel) and are required at run-time (build-time checks do not help  
here, just think about building and installing a program, and then  
changing the kernel config and installing a new kernel).

Bye,
Alexander.

-- 
"Don't worry. Clemenza is OK. It's Paulie."
		-- Santino Corleone, "Chapter 4", page 93

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100610160104.16285uq2jhuio34s>