Skip to contentSkip to conversation

How to check the kernel compile options ?

DISCUSSION David Balazic 19 participants 45 messages Feb 4, 2002 – Feb 11, 2002

lore
Share & tools
lore
#0 lore raw

Hi!

This problem again :-)

I purchase/download a program for linux.
It says it requires certain kernel features, for example :
CONFIG_PROC_FS,CONFIG_NET,CONFIG_INET

How can I figure out in 5 minutes, without a kernel hacker, if my linux system has the correct settings ?

This is a real life question, probably more suitable to ask on some distributions mail list, but I thought I'll start here.

TIA,
david

P.S.: Please CC me on the answers.

Signature · 4 lines
David Balazic
--------------
"Be excellent to each other." - Bill S. Preston, Esq., & "Ted" Theodore Logan
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#1 lore raw
Quoted 6 lines

I purchase/download a program for linux.
It says it requires certain kernel features, for example :
CONFIG_PROC_FS,CONFIG_NET,CONFIG_INET

How can I figure out in 5 minutes, without a kernel hacker, if my linux system has the correct settings ?

Use the vendor supplied kernels ?

#2 lore raw
Quoted 9 lines · Alan Cox
Quoted 7 lines

I purchase/download a program for linux.
It says it requires certain kernel features, for example :
CONFIG_PROC_FS,CONFIG_NET,CONFIG_INET

How can I figure out in 5 minutes, without a kernel hacker, if my linux system has the correct settings ?

Use the vendor supplied kernels ?

Yes, I am using them.
Now back to my question, how do I found out if option X is set or not ?

Signature · 4 lines
David Balazic
--------------
"Be excellent to each other." - Bill S. Preston, Esq., & "Ted" Theodore Logan
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#3 lore raw
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

How can I figure out in 5 minutes, without a kernel hacker, if my linux system has the correct settings ?

Use the vendor supplied kernels ?

Yes, I am using them.
Now back to my question, how do I found out if option X is set or not ?

Check the vendor supplied source package ?

#4 lore raw
Quoted 10 lines · Alan Cox
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

How can I figure out in 5 minutes, without a kernel hacker, if my linux system has the correct settings ?

Use the vendor supplied kernels ?

Yes, I am using them.
Now back to my question, how do I found out if option X is set or not ?

Check the vendor supplied source package ?

Part of the question was "in 5 minutes". Finding the install CD, installing the source package, "checking" it... are more than 5 minutes. Compared to checking out the kernel parameters on HP-UX, for example.

Signature · 4 lines
David Balazic
--------------
"Be excellent to each other." - Bill S. Preston, Esq., & "Ted" Theodore Logan
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#5 lore raw
In reply to Alan Cox
Quoted 6 lines · David Balazic
Quoted 5 lines · Alan Cox
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines

How can I figure out in 5 minutes, without a kernel hacker, if my linux system has the correct settings ?

Use the vendor supplied kernels ?

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Yes, I am using them.
Now back to my question, how do I found out if option X is set or not ?

Check the vendor supplied source package ?

Part of the question was "in 5 minutes". Finding the install CD, installing the source package, "checking" it... are more than 5 minutes. Compared to checking out the kernel parameters on HP-UX, for example.

What he is saying is that you can't do that, generically. Some options are available at runtime through /proc, but most are not. You need to check what happend back at compile time.

-Allan

#6 lore raw
In reply to Alan Cox
Quoted 12 lines · Allan Sandfeld
Quoted 11 lines · David Balazic
Quoted 9 lines · Alan Cox
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

How can I figure out in 5 minutes, without a kernel hacker, if my linux system has the correct settings ?

Use the vendor supplied kernels ?

Yes, I am using them.
Now back to my question, how do I found out if option X is set or not ?

Check the vendor supplied source package ?

Quoted 7 lines
Quoted 3 lines

Part of the question was "in 5 minutes". Finding the install CD, installing the source package, "checking" it... are more than 5 minutes. Compared to checking out the kernel parameters on HP-UX, for example.

What he is saying is that you can't do that, generically. Some options are available at runtime through /proc, but most are not. You need to check what happend back at compile time.

Right, there is a religious issue here: some core kernel hackers believe that it is wrong to encode kernel configuration in the kernel, and that is why it's not available. Technically it is not difficult, nor is it difficult to make it memory-efficient.

Signature · 1 line
Daniel
#7 lore raw
In reply to Alan Cox
Quoted 9 lines
Quoted 4 lines

What he is saying is that you can't do that, generically. Some options are available at runtime through /proc, but most are not. You need to check what happend back at compile time.

Right, there is a religious issue here: some core kernel hackers believe that it is wrong to encode kernel configuration in the kernel, and that is why it's not available. Technically it is not difficult, nor is it difficult to make it memory-efficient.

It's silly to put it permanently in unswappable memory; putting it in /lib/modules/`uname -r/
somewhere does make tons of sense instead.

#8 lore raw
In reply to Alan Cox
Quoted 4 lines · Arjan van de Ven
Quoted 4 lines
Quoted 3 lines

What he is saying is that you can't do that, generically. Some options are available at runtime through /proc, but most are not. You need to check what happend back at compile time.

Quoted 8 lines
Quoted 4 lines

Right, there is a religious issue here: some core kernel hackers believe that it is wrong to encode kernel configuration in the kernel, and that is why it's not available. Technically it is not difficult, nor is it difficult to make it memory-efficient.

It's silly to put it permanently in unswappable memory; putting it in /lib/modules/`uname -r/
somewhere does make tons of sense instead.

Could you show me where I suggested putting it "permanently in unswappable memory"?

Signature · 1 line
Daniel
#9 lore raw
In reply to Alan Cox
Quoted 4 lines · Arjan van de Ven
Quoted 4 lines
Quoted 4 lines

What he is saying is that you can't do that, generically. Some options are available at runtime through /proc, but most are not. You need to check what happend back at compile time.

Quoted 8 lines
Quoted 5 lines

Right, there is a religious issue here: some core kernel hackers believe that it is wrong to encode kernel configuration in the kernel, and that is why it's not available. Technically it is not difficult, nor is it difficult to make it memory-efficient.

It's silly to put it permanently in unswappable memory; putting it in /lib/modules/`uname -r/ somewhere does make tons of sense instead.

That is not guaranteed to be correct though. Why not allow the builder of the kernel to choose an option to keep it in the kernel unswappable memory, or to place it in the lib/modules directory? That should allow the builder to choose tho option that is best for them, with no adverse impacts on those who choose a different option...

Signature · 3 lines
Ben Greear <[email protected]>       <Ben_Greear AT excite.com>
President of Candela Technologies Inc      http://www.candelatech.com
ScryMUD:  http://scry.wanfear.com     http://scry.wanfear.com/~greear
#10 lore raw
In reply to Alan Cox
Followup to:  <[email protected]>
By author:    Daniel Phillips <[email protected]>
In newsgroup: linux.dev.kernel
Quoted 7 lines
Quoted 4 lines

It's silly to put it permanently in unswappable memory; putting it in /lib/modules/`uname -r/
somewhere does make tons of sense instead.

Could you show me where I suggested putting it "permanently in unswappable memory"?

You suggested putting it in the kernel, which is permanently in unswappable memory. Using a module is, as I pointed out earlier, worse than useless.

-hpa

Signature · 3 lines
<[email protected]> at work, <[email protected]> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt	<[email protected]>
#11 lore raw
In reply to Alan Cox
Quoted 5 lines · On 20020204 Arjan van de Ven wrote:
Quoted 5 lines
Quoted 4 lines

What he is saying is that you can't do that, generically. Some options are available at runtime through /proc, but most are not. You need to check what happend back at compile time.

Quoted 8 lines
Quoted 4 lines

Right, there is a religious issue here: some core kernel hackers believe that it is wrong to encode kernel configuration in the kernel, and that is why it's not available. Technically it is not difficult, nor is it difficult to make it memory-efficient.

It's silly to put it permanently in unswappable memory; putting it in /lib/modules/`uname -r/
somewhere does make tons of sense instead.

Mandrake (and think also redhat) save the kenel config used at /boot/config-x.y.z-abc

So look for /boot/config-uname -r

Signature · 4 lines
J.A. Magallon                           #  Let the source be with you...        
mailto:[email protected]
Mandrake Linux release 8.2 (Cooker) for i586
Linux werewolf 2.4.18-pre7-slb #1 SMP Mon Feb 4 21:21:52 CET 2002 i686
#12 lore raw
In reply to Alan Cox
Quoted 10 lines · H. Peter Anvin

By author: Daniel Phillips <[email protected]>

Quoted 5 lines
Quoted 2 lines · Somebody

It's silly to put it permanently in unswappable memory; putting it in /lib/modules/`uname -r/ somewhere does make tons of sense instead.

Could you show me where I suggested putting it "permanently in unswappable memory"?

You suggested putting it in the kernel, which is permanently in unswappable memory. Using a module is, as I pointed out earlier, worse than useless.

Is this what you you're referring to:

Quoted 3 lines · H. Peter Anvin

Uhm, no.  The problem with it is that you're using kernel memory because you're not willing to manage userspace competently, so modules (in fact, *using modules at all*) would be right out.

I don't see your point.

/me points to where he said 'religious issue' above.

Signature · 1 line
Daniel
#13 lore raw
In reply to Alan Cox
Quoted 4 lines · David Balazic
Quoted 1 line · Alan Cox

Use the vendor supplied kernels ?

Yes, I am using them.
Now back to my question, how do I found out if option X is set or not ?

It depends on the vendor. All Debian kernel-packages have kernel's config-file in /boot. Which is nice.

Suonpää...

#14 lore raw
In reply to David Balazic

A really useful patch makes all the options appeared in /proc/config.gz. It's used by SuSE kernels among others (mine, too :)
You can find the patch on kernelnewbies.org (don't remember where exactly)

zgrep CONFIG_PROC /proc/config.gz
will give you the answer.

I have absolutely no clue why such a useful things is not integrated into the kernel yet. It's even useful for such things as "build a kernel using the same options as I have on current kernel but I don't know where my .config is".

FWICS It seems harmful to me.

Thomas

Quoted 18 lines · David Balazic

Hi!

This problem again :-)

I purchase/download a program for linux.
It says it requires certain kernel features, for example :
CONFIG_PROC_FS,CONFIG_NET,CONFIG_INET

How can I figure out in 5 minutes, without a kernel hacker, if my linux system has the correct settings ?

This is a real life question, probably more suitable to ask on some distributions mail list, but I thought I'll start here.

TIA,
david

P.S.: Please CC me on the answers.

#15 lore raw
Quoted 13 lines · you

A really useful patch makes all the options appeared in /proc/config.gz. It's used by SuSE kernels among others (mine, too :)
You can find the patch on kernelnewbies.org (don't remember where exactly)

zgrep CONFIG_PROC /proc/config.gz
will give you the answer.

I have absolutely no clue why such a useful things is not integrated into the kernel yet. It's even useful for such things as "build a kernel using the same options as I have on current kernel but I don't know where my .config is".

Quoted 4 lines

FWICS It seems harmful to me.

Thomas

I remember discussion of that patch some time ago and the main complaint about it was that it increases the size of the kernel, i.e. vmlinuz. Why not put the need info in a module? Doing that would enable the following command:

zgrep CONFIG_PROC /lib/modules/uname -r/config.gz

(or something similar).

David

#16 lore raw
In reply to David Balazic
Followup to:  <[email protected]>
By author:    David Relson <[email protected]>
In newsgroup: linux.dev.kernel
Quoted 10 lines

I remember discussion of that patch some time ago and the main complaint about it was that it increases the size of the kernel, i.e. vmlinuz. Why not put the need info in a module? Doing that would enable the following command:

zgrep CONFIG_PROC /lib/modules/uname -r/config.gz

(or something similar).

Uhm, no. The problem with it is that you're using kernel memory because you're not willing to manage userspace competently, so modules (in fact, *using modules at all*) would be right out.

I have had in my /sbin/installkernel a clause to save .config as config-<foo> when I install vmlinuz-<foo>; I believe anyone not doing that[1] is, quite frankly, a moron.

-hpa

[1] or rather, not doing it without knowing exactly why they aren't -- sometimes there are good reasons for doing so.

Signature · 3 lines
<[email protected]> at work, <[email protected]> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt	<[email protected]>
#17 lore raw
Quoted 9 lines · you
Followup to:  <[email protected]>
By author:    David Relson <[email protected]>
In newsgroup: linux.dev.kernel
Quoted 6 lines

I remember discussion of that patch some time ago and the main complaint about it was that it increases the size of the kernel, i.e. vmlinuz. Why not put the need info in a module? Doing that would enable the following command:

Quoted 8 lines
Quoted 4 lines

zgrep CONFIG_PROC /lib/modules/uname -r/config.gz

(or something similar).

Uhm, no. The problem with it is that you're using kernel memory because you're not willing to manage userspace competently, so modules (in fact, *using modules at all*) would be right out.

Yeah, it does have the undesirable dependency on modules, doesn't it?

Quoted 3 lines

I have had in my /sbin/installkernel a clause to save .config as config-<foo> when I install vmlinuz-<foo>; I believe anyone not doing that[1] is, quite frankly, a moron.

Why not a simple patch for "make install" to do this?

#18 lore raw
Quoted 6 lines · David Relson
Quoted 3 lines · you

I have had in my /sbin/installkernel a clause to save .config as config-<foo> when I install vmlinuz-<foo>; I believe anyone not doing that[1] is, quite frankly, a moron.

Why not a simple patch for "make install" to do this?

Simple? From kbuild 2.5 which does exactly this ...

mainmenu_name "ix86 Installation"

choice 'Format to compile kernel in' \

	"vmlinux	CONFIG_VMLINUX \
	 vmlinuz	CONFIG_VMLINUZ \
	 bzImage	CONFIG_BZIMAGE \
	 zImage		CONFIG_ZIMAGE" bzImage

bool 'Use a prefix on install paths' CONFIG_INSTALL_PREFIX
if [ "$CONFIG_INSTALL_PREFIX" = "y" ]; then
string ' Prefix for install paths' CONFIG_INSTALL_PREFIX_NAME ""
fi
string 'Where to install the kernel' CONFIG_INSTALL_KERNEL_NAME "/lib/modules/KERNELRELEASE/KERNELBASENAME" bool 'Install System.map' CONFIG_INSTALL_SYSTEM_MAP
if [ "$CONFIG_INSTALL_SYSTEM_MAP" = "y" ]; then
string ' Where to install System.map' CONFIG_INSTALL_SYSTEM_MAP_NAME "/lib/modules/KERNELRELEASE/System.map"
fi
bool 'Install .config' CONFIG_INSTALL_CONFIG
if [ "$CONFIG_INSTALL_CONFIG" = "y" ]; then
string ' Where to install .config' CONFIG_INSTALL_CONFIG_NAME "/lib/modules/KERNELRELEASE/.config"
fi
if [ "$CONFIG_VMLINUX" != "y" ]; then
bool ' Install vmlinux for debugging' CONFIG_INSTALL_VMLINUX
if [ "$CONFIG_INSTALL_VMLINUX" = "y" ]; then
string ' Where to install vmlinux' CONFIG_INSTALL_VMLINUX_NAME "/lib/modules/KERNELRELEASE/vmlinux"
fi
fi
bool 'Run a post-install script or command' CONFIG_INSTALL_SCRIPT
if [ "$CONFIG_INSTALL_SCRIPT" = "y" ]; then
string ' Post-install script or command name' CONFIG_INSTALL_SCRIPT_NAME ""
fi

#19 lore raw

I like this. Which bring me to the latest FAQ : when will that be integrated?

Has linus ever stated why kbuil/cml2 haven't been integrated yet ? They're almost orthogonal to the IO changes. And, anyway, the compilation of 2.5.x seems _already_ broken.

Thomas

Quoted 50 lines · Keith Owens

On Mon, 04 Feb 2002 13:34:40 -0500,

Quoted 6 lines · David Relson
Quoted 3 lines · you

I have had in my /sbin/installkernel a clause to save .config as config-<foo> when I install vmlinuz-<foo>; I believe anyone not doing that[1] is, quite frankly, a moron.

Why not a simple patch for "make install" to do this?

Simple? From kbuild 2.5 which does exactly this ...

mainmenu_name "ix86 Installation"

choice 'Format to compile kernel in' \

	"vmlinux	CONFIG_VMLINUX \
	 vmlinuz	CONFIG_VMLINUZ \
	 bzImage	CONFIG_BZIMAGE \
	 zImage		CONFIG_ZIMAGE" bzImage

bool 'Use a prefix on install paths' CONFIG_INSTALL_PREFIX
if [ "$CONFIG_INSTALL_PREFIX" = "y" ]; then
string ' Prefix for install paths' CONFIG_INSTALL_PREFIX_NAME ""
fi
string 'Where to install the kernel' CONFIG_INSTALL_KERNEL_NAME "/lib/modules/KERNELRELEASE/KERNELBASENAME" bool 'Install System.map' CONFIG_INSTALL_SYSTEM_MAP
if [ "$CONFIG_INSTALL_SYSTEM_MAP" = "y" ]; then
string ' Where to install System.map' CONFIG_INSTALL_SYSTEM_MAP_NAME
"/lib/modules/KERNELRELEASE/System.map" fi
bool 'Install .config' CONFIG_INSTALL_CONFIG
if [ "$CONFIG_INSTALL_CONFIG" = "y" ]; then
string ' Where to install .config' CONFIG_INSTALL_CONFIG_NAME
"/lib/modules/KERNELRELEASE/.config" fi
if [ "$CONFIG_VMLINUX" != "y" ]; then
bool ' Install vmlinux for debugging' CONFIG_INSTALL_VMLINUX if [ "$CONFIG_INSTALL_VMLINUX" = "y" ]; then
string ' Where to install vmlinux' CONFIG_INSTALL_VMLINUX_NAME
"/lib/modules/KERNELRELEASE/vmlinux" fi
fi
bool 'Run a post-install script or command' CONFIG_INSTALL_SCRIPT if [ "$CONFIG_INSTALL_SCRIPT" = "y" ]; then
string ' Post-install script or command name' CONFIG_INSTALL_SCRIPT_NAME
"" fi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#20 lore raw
In reply to H. Peter Anvin
Quoted 3 lines · --On Monday, 04 February, 2002 10:22 AM -0800 "H. Peter Anvin" <[email protected]>…

I have had in my /sbin/installkernel a clause to save .config as config-<foo> when I install vmlinuz-<foo>; I believe anyone not doing that[1] is, quite frankly, a moron.

Always being willing to rise to the challenge of being called a moron:

Seems to me that if the prefered method of booting becomes an initrd-esque thing + pivot_root, I /may/ (reasonably) perhaps have these files on the initrd anyway, and /might/ not have it mounted (or at least not mounted on the same path across multiple distributions), in which case being able to access them through /proc (which incidentally could do the decompression for us, giving plain text out of /proc and using minimal memory) might be useful. [of course this /is/ saving config-foo, but to a place where it's might be useful to access it from /proc]

Ditto ksyms etc.

An advantage of having the kernel, config, ksyms etc. as one atomic lump is one of the same reasons as people are looking to have kernel and modules as one atomic lump - i.e. much less chance of the wrong ones being looked at.

I would be surprised if there is anyone on this list who has not lost at some point either the .config, the kysms, or something similar associated with at least one build they've made.

--
Alex Bligh

#21 lore raw

On Tue, 5 Feb 2002, Alex Bligh - linux-kernel wrote:

May I suggest that you have you favorite install script put a copy in
/boot instead? I also hacked my startup to Slink in boot to the current modules directory, SystemMap and boot kernel.

Quoted 4 lines

I would be surprised if there is anyone on this list who has not lost at some point either the .config, the kysms, or something similar associated with at least one build they've made.

Or forgotten to make oldconfig, or lots of other things. But that
doesn't make a good argument for putting the config permanently in /proc instead of saving it if you want it, does it? If you could remember to make the module with the config, you could remember to save it. Or even have modules_install save the info in a file in the modules directory, that would get the info without locking it in memory.

Signature · 3 lines
bill davidsen <[email protected]>
  CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.
#22 lore raw
In reply to H. Peter Anvin
Quoted 6 lines · Alex Bligh - linux-kernel

I would be surprised if there is anyone on this list who has not lost at some point either the .config, the kysms, or something similar associated with at least one build they've made.

Sure. And people have lost their root filesystems due to "rm -rf /". That doesn't mean we build the entire (real) root filesystem into the kernel.

-hpa

#23 lore raw
In reply to H. Peter Anvin
Quoted 10 lines · H. Peter Anvin
Quoted 6 lines · Alex Bligh - linux-kernel

I would be surprised if there is anyone on this list who has not lost at some point either the .config, the kysms, or something similar associated with at least one build they've made.

Quoted 2 lines

Sure. And people have lost their root filesystems due to "rm -rf /". That doesn't mean we build the entire (real) root filesystem into the kernel.

Well, it seems to be down to you and Arjan aguing that this usability improvement isn't needed, vs quite a few *users* who are complaining about the current state of things, as well they should because it's less good than it could be.

Signature · 1 line
Daniel
#24 lore raw
In reply to H. Peter Anvin
Quoted 8 lines · Daniel Phillips
Quoted 7 lines · H. Peter Anvin
Quoted 4 lines · Alex Bligh - linux-kernel

I would be surprised if there is anyone on this list who has not lost at some point either the .config, the kysms, or something similar associated with at least one build they've made.

Quoted 8 lines
Quoted 3 lines

Sure. And people have lost their root filesystems due to "rm -rf /". That doesn't mean we build the entire (real) root filesystem into the kernel.

Well, it seems to be down to you and Arjan aguing that this usability improvement isn't needed, vs quite a few *users* who are complaining about the current state of things, as well they should because it's less good than it could be.

Numeric participation on lkml discussions is not an indication of much. If lkml accurately reflected the state of Linux and its userbase, Linux would be the most crash-prone, bug-ridden, chaotic environment ever :-).

There's probably a lot of people (like me) who use distribution tools like Debian's kernel-package to build and manage kernel packages. If you're used to using the right packaging tools, it looks kind of silly to stuff text files into the kernel in case they're deleted, instead of doing:

$ dpkg -x kernel-image-2.4.17_1.00.Custom_i386.deb ~/tmp/
$ cat ~/tmp/boot/config-2.4.17

The kernel is just a program, and this is a tools problem. You don't see people arguing that cat's documentation should be moved into /bin/cat in case administrators misplace "cat.1.gz".

miket

#25 lore raw

On Wed, 6 Feb 2002, Mike Touloumtzis wrote:

[...]

Quoted 3 lines

The kernel is just a program, and this is a tools problem. You don't see people arguing that cat's documentation should be moved into /bin/cat in case administrators misplace "cat.1.gz".

FSF. Compare cat --help on Linux and on Solaris... B-)

.TM.

Signature · 5 lines
      ____/  ____/   /
     /      /       /			Marco Colombo
    ___/  ___  /   /		      Technical Manager
   /          /   /			 ESI s.r.l.
 _____/ _____/  _/		       [email protected]
#26 lore raw
In reply to H. Peter Anvin
Quoted 9 lines · Mike Touloumtzis
Quoted 8 lines · Daniel Phillips
Quoted 7 lines · H. Peter Anvin
Quoted 4 lines · Alex Bligh - linux-kernel

I would be surprised if there is anyone on this list who has not lost at some point either the .config, the kysms, or something similar associated with at least one build they've made.

Quoted 7 lines
Quoted 7 lines
Quoted 3 lines

Sure. And people have lost their root filesystems due to "rm -rf /". That doesn't mean we build the entire (real) root filesystem into the kernel.

Well, it seems to be down to you and Arjan aguing that this usability improvement isn't needed, vs quite a few *users* who are complaining about the current state of things, as well they should because it's less good

than

Quoted 11 lines
Quoted 1 line

it could be.

Numeric participation on lkml discussions is not an indication of much. If lkml accurately reflected the state of Linux and its userbase, Linux would be the most crash-prone, bug-ridden, chaotic environment ever :-).

There's probably a lot of people (like me) who use distribution tools like Debian's kernel-package to build and manage kernel packages. If you're used to using the right packaging tools, it looks kind of silly to stuff text files into the kernel in case they're deleted, instead of doing:

Quoted 6 lines
$ dpkg -x kernel-image-2.4.17_1.00.Custom_i386.deb ~/tmp/
$ cat ~/tmp/boot/config-2.4.17

The kernel is just a program, and this is a tools problem. You don't see people arguing that cat's documentation should be moved into /bin/cat in case administrators misplace "cat.1.gz".

Cat is standard, kernels aren't. When was the last time you installed a custom cat?

Signature · 1 line
Daniel
#27 lore raw
In reply to H. Peter Anvin
Quoted 8 lines · Daniel Phillips
Quoted 4 lines · Mike Touloumtzis

The kernel is just a program, and this is a tools problem. You don't see people arguing that cat's documentation should be moved into /bin/cat in case administrators misplace "cat.1.gz".

Cat is standard, kernels aren't. When was the last time you installed a custom cat?

I installed a custom rsync just the other day, and I did it by downloading the Debian rsync source, patching it, and building a Debian package. I would certainly do the same for cat if I needed to.

Sorry, I still don't see any fundamental difference.

miket

#28 lore raw
In reply to H. Peter Anvin
Quoted 7 lines · Mike Touloumtzis
Quoted 6 lines · Daniel Phillips
Quoted 4 lines · Mike Touloumtzis

The kernel is just a program, and this is a tools problem. You don't see people arguing that cat's documentation should be moved into /bin/cat in case administrators misplace "cat.1.gz".

Quoted 8 lines
Quoted 2 lines

Cat is standard, kernels aren't. When was the last time you installed a custom cat?

I installed a custom rsync just the other day, and I did it by downloading the Debian rsync source, patching it, and building a Debian package. I would certainly do the same for cat if I needed to.

Sorry, I still don't see any fundamental difference.

Yes, and would you configure cat? Which options would you select?

I'm trying to avoid just saying 'you're being silly', but it's what I really mean.

Signature · 1 line
Daniel
#29 lore raw
In reply to H. Peter Anvin
Quoted 6 lines · Daniel Phillips
Quoted 5 lines · Mike Touloumtzis

I installed a custom rsync just the other day, and I did it by downloading the Debian rsync source, patching it, and building a Debian package. I would certainly do the same for cat if I needed to.

Quoted 6 lines
Quoted 1 line

Sorry, I still don't see any fundamental difference.

Yes, and would you configure cat? Which options would you select?

I'm trying to avoid just saying 'you're being silly', but it's what I really mean.

I'm talking about rsync now, not cat (that was reductio ad absurdum to make a point). In case you haven't compiled any userspace programs in a while: many of them have configuration options. In the case of rsync, things like "--enable-profile" and "--disable-ipv6".

I fail to see how tracking a custom compiled rsync is any different from tracking a custom compiled kernel. In both cases you have local history to track and a group of files to bundle together.

Let's replay this discussion as I see it:

You: Users are clamoring for the inclusion of configuration information
in the kernel. They clearly need it, so let's include it even though it has no functional purpose.

Me: Actually, I'm a user and the distribution-provided packaging tools
work fine for this purpose. We don't bundle similar information into the binaries of userspace tools.

You: Userspace tools don't have configuration options like the kernel.

Me: Yes they do.

Arguing that people don't custom configure anything but the kernel is a dead end. Also, I have already claimed that I don't need any of the "stuffing config info into kernels" solutions mentioned on this thread, so it's hard to try to convince me I need this feature.

Some possible available avenues of argument for you are:

-- "You don't know what you're missing".

You can argue that moving configuration info into the kernel is fundamentally better than, or makes things easier than, bundling it into a package. This is a hard sell, since in an earlier mail I demonstrated that I can get at the configuration info in a kernel package with two commands.

-- "You are not a typical user".

Since I'm satisfied with the status quo, your best defense of this change is to argue that I am not the target audience for this change.

As far as I can tell, the userbase of Linux, includes, in descending order of frequency:

1) People who use prepackaged distribution kernels.
2) People who build their own kernels based on distribution packaging systems, or have evolved their own systems of kernel management over the years.
3) People who sling kernels around like loose change and forget where each kernel came from.

AFAICT most of the "config info needs to go in the kernel" arguments seem to come from camp #3. I think those people should just get their acts together or start using the right tools instead.

When I first started using Unix (on a multiuser system, back in school), I was struck by how messy it was. The root directories contained all kinds of locally added directories and forgotten crap. The systems were a mishmash of forgotten compiled-from-source packages, temporary workarounds, expedient measures, and haphazardly patcheded kernels.

The extent to which the distributors and other measures like the FHS have rationalized this situation, and automated the tasks it sprung from, continues to amaze me. My sneaking suspicion is that people who want to stuff configuration info into the kernel haven't made that leap yet. That's why I'm being a bit of a harsh critic of the concept (plus, it seems to be par for the course on lkml :-).

A final argument for using packaging/bundling tools and userspace files instead of files in /proc for tracking kernel metadata:

-- Kernels are no longer single files, at least for most people.
A _harder_ problem than this one is tracking which modules go with which kernel. Solving this problem solves the configuration tracking problem as a _side_effect_. Conversely, solving the configuration tracking problem without solving the module tracking problem is largely useless.

miket

#30 lore raw
Quoted 4 lines · --On Thursday, 07 February, 2002 12:34 PM -0800 Mike Touloumtzis…

I'm talking about rsync now, not cat (that was reductio ad absurdum to make a point). In case you haven't compiled any userspace programs in a while: many of them have configuration options. In the case of rsync, things like "--enable-profile" and "--disable-ipv6".

Well, picking a package with a non-trivial config file for compilation, and picking the one which is most easy to recompile (postfix):

shed:/home/amb# postconf | head
2bounce_notice_recipient = postmaster
access_map_reject_code = 554
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
allow_mail_to_commands = alias,forward
...
command_directory = /usr/sbin
...

I'd say that's storing it's compilation config (it's in there too) live - at least sufficient to allow me to rebuild it. And I've used it.

Quoted 2 lines

A final argument for using packaging/bundling tools and userspace files instead of files in /proc for tracking kernel metadata:

Noone is suggesting that it be compulsorary to delete your 'userspace' (read 'conventional file system') version of .config etc. The argument is merely that it is worth the few thousand bytes (one page) of swapoutable stuff kept with the kernel as well to aid debugging, rebuilding, etc.; for instance, if you've ever done a binary chop for 'which config livelocks my kernel on load', this means typing cp/mv rather fewer times. If you've ever misplaced/mismatched your .config/kysms, whatever, this will help immeasurably. If you are booting in an environment where it's easier to move a single file about (think tftp boot in a network environment for example), you get the config on there for free. Each of these I have used.

--
Alex Bligh

#31 lore raw
In reply to H. Peter Anvin
Quoted 1 line · Mike Touloumtzis

Some possible available avenues of argument for you are:

I think you're just arguing for the sake of argument, which basically sums up all the arguments we've seen against this.

Let me put it in simple terms: you've got an alarm clock, haven't you? When you set the alarm, you don't need to have any little light on the front that tells you the alarm is set, do you? Because, after all you're not stupid, you know you set it. And you can always get out of bed and look at the position of the switch, right?

(I hope I just demonstrated the difference between reducto ad absurdum and 'just plain silly'.)

Signature · 1 line
Daniel
#32 lore raw
In reply to H. Peter Anvin
Quoted 9 lines · Mike Touloumtzis

A final argument for using packaging/bundling tools and userspace files instead of files in /proc for tracking kernel metadata:

-- Kernels are no longer single files, at least for most people.
A _harder_ problem than this one is tracking which modules go with which kernel. Solving this problem solves the configuration tracking problem as a _side_effect_. Conversely, solving the configuration tracking problem without solving the module tracking problem is largely useless.

I can always rebuild the modules from a standard source tree, given the config. This makes the config a far more important piece of data than the modules themselves, and that is why I want it stuck right on the side of the kernel, the way my memory sticks have a little sticker on them telling me what I've got.

As an option of course, you're welcome to build your kernel without it, and you can also peel the stickers off your memory sticks and file them in a drawer if you like.

Signature · 1 line
Daniel
#33 lore raw
In reply to H. Peter Anvin
Quoted 5 lines · Daniel Phillips
Quoted 1 line · Mike Touloumtzis

Some possible available avenues of argument for you are:

I think you're just arguing for the sake of argument, which basically sums up all the arguments we've seen against this.

Not at all. I really believe that embedded unnecessary information in the kernel is a bad idea. I don't want my kernels to get any bigger than they are now unless useful features are being added (I have no problem with that). I develop for embedded devices, so I'm particularly sensitive to this issue.

My understanding is that "keep features out of the kernel if possible" is the majority opinion, not a crackpot weirdo stance.

Quoted 5 lines

Let me put it in simple terms: you've got an alarm clock, haven't you? When you set the alarm, you don't need to have any little light on the front that tells you the alarm is set, do you? Because, after all you're not stupid, you know you set it. And you can always get out of bed and look at the position of the switch, right?

I don't think this is a close enough analogy to illustrate anything. The examples I chose to illustrate my points were IMHO closely related software packaging issues.

miket

#34 lore raw
Quoted 2 lines · --On Thursday, 07 February, 2002 1:08 PM -0800 Mike Touloumtzis…

My understanding is that "keep features out of the kernel if possible" is the majority opinion, not a crackpot weirdo stance.

Mmmm... well my understanding is that the majority opinion is not to minimize kernel functionality as a goal in isolation, but to minimize putting into the kernel features which are done just as well in userspace. Note the words 'just as well'. Consider, for instance, the recent discussion (like it or not) on packing some initrd equivalent with modules for all drivers, as opposed to keeping said modules in separate files on traditional disk storage. I cite this as it's about the closest analogy.

The argument comes down to 'do you want the option of dealing with your kernel as one lump, or multiple smaller lumps' (i.e. kernel as we know it, modules, ksysms, config file, tea cosy, jacuzzi etc. - remember I suggested one be able to stick any files there). It seems sensible at a distribution level to restrict the use of this option (you could put the whole of /bin there if you wanted). It seems perverse to reject the concept of the option in toto, given that it's, urm, an option. Just like any option, it is possible, though far from compulsorary, to mindlessly abuse it.

--
Alex Bligh

#35 lore raw
In reply to H. Peter Anvin
Quoted 4 lines · Mike Touloumtzis
Quoted 3 lines · Daniel Phillips
Quoted 1 line · Mike Touloumtzis

Some possible available avenues of argument for you are:

Quoted 8 lines
Quoted 2 lines

I think you're just arguing for the sake of argument, which basically sums up all the arguments we've seen against this.

Not at all. I really believe that embedded unnecessary information in the kernel is a bad idea. I don't want my kernels to get any bigger than they are now unless useful features are being added (I have no problem with that). I develop for embedded devices, so I'm particularly sensitive to this issue.

I've heard that one before, from people who should know better. That's what config options are for, or it's certainly a major reason for having config options. Heck, I'd be satisfied if it was off by default. I'd *always* turn it on, personally.

Quoted 2 lines

My understanding is that "keep features out of the kernel if possible" is the majority opinion, not a crackpot weirdo stance.

Right, but would you buy a car without upholstery on the seats? Wait, maybe you would.

Quoted 7 lines
Quoted 5 lines

Let me put it in simple terms: you've got an alarm clock, haven't you? When you set the alarm, you don't need to have any little light on the front that tells you the alarm is set, do you? Because, after all you're not stupid, you know you set it. And you can always get out of bed and look at the position of the switch, right?

I don't think this is a close enough analogy to illustrate anything.

Right, it's tough to explain usability to someone who has no clue what that is.

OK, I'm out, I've made my point, you are welcome to attempt to demolish it without fear of retaliation.

Signature · 1 line
Daniel
#36 lore raw
In reply to H. Peter Anvin
Quoted 17 lines · Daniel Phillips
Quoted 9 lines · Mike Touloumtzis

A final argument for using packaging/bundling tools and userspace files instead of files in /proc for tracking kernel metadata:

-- Kernels are no longer single files, at least for most people.
A _harder_ problem than this one is tracking which modules go with which kernel. Solving this problem solves the configuration tracking problem as a _side_effect_. Conversely, solving the configuration tracking problem without solving the module tracking problem is largely useless.

I can always rebuild the modules from a standard source tree, given the config. This makes the config a far more important piece of data than the modules themselves, and that is why I want it stuck right on the side of the kernel, the way my memory sticks have a little sticker on them telling me what I've got.

Quoted 3 lines

As an option of course, you're welcome to build your kernel without it, and you can also peel the stickers off your memory sticks and file them in a drawer if you like.

OK, this is getting a little silly, and I don't have many new arguments to make, so I'll just respond once. Feel free to have the last word :-).

Peeling information off memory sticks would be silly. It's already _on_ them memory, and it costs nothing to leave it there. Moreover, if you're using a packaging system, putting config info in the package is precisely analogous to attaching an informative sticker to the kernel.

Adding configuration information to the kernel is a change to the status quo, and has a cost. The cost is small, but I'm unsympathetic to that argument because many small convenience features, each with a small cost, add up to a large cost.

You appear to be justifying a change to the kernel status quo with the argument "it is a useful feature for some people, so it should go in". I agree that it's useful for some people, but I feel that the kernel should hold to a higher standard for feature inclusion: "It's a useful feature for some people, and it is impossible or impractical to implement it well in userspace." Even esoteric drivers meet my test; IMHO the inclusion of configuration files in the kernel does not.

My contention is that not only is it _possible_ to implement a solution in userspace (which alone should be enough), but that a userspace solution is _already implemented and widely used_, and that moreover I am perfectly happy using it. I don't see why that shouldn't be the kiss of death for adding a new feature to the kernel.

miket

#37 lore raw
In reply to H. Peter Anvin
Quoted 4 lines · Mike Touloumtzis

Adding configuration information to the kernel is a change to the status quo, and has a cost. The cost is small, but I'm unsympathetic to that argument because many small convenience features, each with a small cost, add up to a large cost.

The cost is *zero* if you don't enable the option, is this concept difficult for you?

Signature · 1 line
Daniel
#38 lore raw
Quoted 8 lines · Daniel Phillips
Quoted 4 lines · Mike Touloumtzis

Adding configuration information to the kernel is a change to the status quo, and has a cost. The cost is small, but I'm unsympathetic to that argument because many small convenience features, each with a small cost, add up to a large cost.

The cost is *zero* if you don't enable the option, is this concept difficult for you?

It isn't zero: Somebody has to add the support, check/fix interactions with other features, write documentation, keep the support and its documentation up to date when stuff in the kernel changes, userland (and user) has to be prepared (and checked that it works if the feature is present, and find workarounds if it isn't), ...

It might be a small cost, but N * small gets big _very_ fast, and the value is marginal at best in this case. There are many other such "small cost features" with equally small value results that haven't been included. One of the big reasons why I like Linux, BTW.

Signature · 1 line
Horst von Brand http://counter.li.org # 22616
#39 lore raw
Quoted 16 lines · Horst von Brand
Quoted 8 lines · Daniel Phillips
Quoted 4 lines · Mike Touloumtzis

Adding configuration information to the kernel is a change to the status quo, and has a cost. The cost is small, but I'm unsympathetic to that argument because many small convenience features, each with a small cost, add up to a large cost.

The cost is *zero* if you don't enable the option, is this concept difficult for you?

It isn't zero: Somebody has to add the support, check/fix interactions with other features, write documentation, keep the support and its documentation up to date when stuff in the kernel changes, userland (and user) has to be prepared (and checked that it works if the feature is present, and find workarounds if it isn't), ...

Quoted 4 lines

It might be a small cost, but N * small gets big _very_ fast, and the value is marginal at best in this case. There are many other such "small cost features" with equally small value results that haven't been included. One of the big reasons why I like Linux, BTW.

Non sequitur. You are talking about a completely different cost than he was.

But I'll bite: if a volunteer wishes to contribute the needed work, and the feature impacts no systems outside itself, then you have no argument.

Signature · 1 line
Daniel
#40 lore raw
In reply to Horst von Brand

On Fri, 8 Feb 2002, Horst von Brand wrote:

| Daniel Phillips <[email protected]> said:
| > On February 7, 2002 10:41 pm, Mike Touloumtzis wrote:
| > > Adding configuration information to the kernel is a change to the status
| > > quo, and has a cost.  The cost is small, but I'm unsympathetic to that
| > > argument because many small convenience features, each with a small cost,
| > > add up to a large cost.
| >
| > The cost is *zero* if you don't enable the option, is this concept difficult
| > for you?
|
| It isn't zero: Somebody has to add the support, check/fix interactions with
| other features, write documentation, keep the support and its documentation
| up to date when stuff in the kernel changes, userland (and user) has to be
| prepared (and checked that it works if the feature is present, and find
| workarounds if it isn't), ...

There are customers who actually require a decent, reasonable solution to this problem. If there is a decent, reasonable solution, great. If not, then one will be generated.

| It might be a small cost, but N * small gets big _very_ fast, and the value
| is marginal at best in this case. There are many other such "small cost
| features" with equally small value results that haven't been included. One
| of the big reasons why I like Linux, BTW.
Signature · 1 line
~Randy
#41 lore raw
In reply to H. Peter Anvin
Quoted 8 lines · Daniel Phillips
Quoted 4 lines · Mike Touloumtzis

Adding configuration information to the kernel is a change to the status quo, and has a cost. The cost is small, but I'm unsympathetic to that argument because many small convenience features, each with a small cost, add up to a large cost.

The cost is *zero* if you don't enable the option, is this concept difficult for you?

That argument can be used to justify almost anything. But it's not zero maintenance cost or code complexity cost. No one wants the kernel to be an unmaintainable nest of CONFIG_FOO and #ifdef BAR because of "zero cost" options.

miket

#42 lore raw
In reply to H. Peter Anvin
Quoted 7 lines · Mike Touloumtzis
Quoted 6 lines · Daniel Phillips
Quoted 4 lines · Mike Touloumtzis

Adding configuration information to the kernel is a change to the status quo, and has a cost. The cost is small, but I'm unsympathetic to that argument because many small convenience features, each with a small cost, add up to a large cost.

Quoted 7 lines
Quoted 2 lines

The cost is *zero* if you don't enable the option, is this concept difficult for you?

That argument can be used to justify almost anything. But it's not zero maintenance cost or code complexity cost. No one wants the kernel to be an unmaintainable nest of CONFIG_FOO and #ifdef BAR because of "zero cost" options.

OK, there we are, your real argument: you think adding this option will make the kernel unmaintainable.

feh.

Signature · 1 line
Daniel
#43 lore raw
In reply to H. Peter Anvin
Quoted 22 lines · Mike Touloumtzis
Quoted 5 lines · Daniel Phillips
Quoted 1 line · Mike Touloumtzis

Some possible available avenues of argument for you are:

I think you're just arguing for the sake of argument, which basically sums up all the arguments we've seen against this.

Not at all. I really believe that embedded unnecessary information in the kernel is a bad idea. I don't want my kernels to get any bigger than they are now unless useful features are being added (I have no problem with that). I develop for embedded devices, so I'm particularly sensitive to this issue.

My understanding is that "keep features out of the kernel if possible" is the majority opinion, not a crackpot weirdo stance.

Quoted 5 lines

Let me put it in simple terms: you've got an alarm clock, haven't you? When you set the alarm, you don't need to have any little light on the front that tells you the alarm is set, do you? Because, after all you're not stupid, you know you set it. And you can always get out of bed and look at the position of the switch, right?

Quoted 3 lines

I don't think this is a close enough analogy to illustrate anything. The examples I chose to illustrate my points were IMHO closely related software packaging issues.

An often heard argument is "can it be done in user space", which seems very applicable here.

john alvord

#44 lore raw
In reply to David Balazic
Followup to:  <[email protected]>
By author:    David Relson <[email protected]>
In newsgroup: linux.dev.kernel
Quoted 7 lines
Quoted 4 lines

I have had in my /sbin/installkernel a clause to save .config as config-<foo> when I install vmlinuz-<foo>; I believe anyone not doing that[1] is, quite frankly, a moron.

Why not a simple patch for "make install" to do this?

Good thought. I was waiting for the various kernel build changes in 2.5 to overhaul make install, but a small thing should be doable in 2.4. Note that if you have an /sbin/installkernel it overrides make install -- as it should be.

-hpa

Signature · 3 lines
<[email protected]> at work, <[email protected]> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt	<[email protected]>