lkml.org 
[lkml]   [2013]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: CONFIG_* used by user-space to figure out whether a feature is on/off
On Mon, Jul 15, 2013 at 11:40:50AM -0400, Konrad Rzeszutek Wilk wrote:
> Hey Linus,
>
> I am hoping you can help me draw an understanding and a line in sand whether:
> a) Tools should not depend on /proc/config.gz to figure out whether
> a kernel has some CONFIG_X=y feature.
>
> b) If they are OK to do so, what do we do when certain CONFIG_X options
> get reworked/removed. Would they be considered regressions? Aka
> is this similar to 'you shall not break user-space'?

CONFIG_ values never get exported to userspace, you need to dig to find
them, and they don't "mean" anything to userspace.

You should test for the functionality of the kernel, not a CONFIG
option, in my opinion.

I've been working with some userspace tools that were blindly looking at
kernel version numbers (i.e. docker), and that too is not a good idea as
distros backport features and fixes to older kernel versions, so you
can't "rely" on that either.

> Irrespective of that, do you have any ideas of how a user-space program (say GRUB)
> can figure out whether the configuration stanze it generates is supported by
> the kernel. If you don't want to answer this question - since this might
> open a can of worms you prefer not to deal with - that is absolutly OK.

Why does grub need to care about the kernel configuration? Other
bootloaders sure don't. A bootloader just needs to load a blob and pass
control over to it, no need to care what is in that blob at all, right?

What am I missing here?

thanks,

gre gk-h


\
 
 \ /
  Last update: 2013-07-15 21:41    [W:0.158 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site