public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* PROBLEM: misleading error message
@ 2004-11-30 19:45 Bebel
  2004-11-30 20:56 ` Misleading " Jan Engelhardt
  2004-11-30 21:58 ` PROBLEM: misleading " Jesper Juhl
  0 siblings, 2 replies; 13+ messages in thread
From: Bebel @ 2004-11-30 19:45 UTC (permalink / raw)
  To: linux-kernel

This may be a BUG REPORT, as I see it, allthough more experienced Linux 
users might think differently:

I compiled built-in support for iptables in my new 2.6.9 kernel, but when my 
legacy firewall does a "modprobe ip_tables" , I get the startling message: 
"FATAL: module ip_tables not found" .
Please note that I am a Linux newbie and I think messages should help people 
solve problems, but this particular message made me re-compile the kernel 2 
more times ( stupid, huh ?) before I realized that iptables actually works, 
though the message had me thinking it wasn't :))
The message was probably caused by modprobe trying to load ip_tables module 
and not finding it, since support for it was built in the kernel (not as a 
module).
So I find this message quite misleading, firstly because the error was in no 
way "FATAL" (since iptables in fact WORKED) and secondly because it doesn't 
tell the user that iptables was already supported by the kernel.
A message like "Module ip_tables not needed; support already built in the 
kernel" would be much more helpfull, as I see it.

If it matters, I'm running Slackware 10.0 on a 500MHz Pentium 3 with 256MB 
RAM and a basic iptables firewall, on which I did a kernel upgrade from 
2.4.26 to 2.6.9 .
But this problem is common to many distros, as I could see on several 
forums.

Best regards,     Wussie . 


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Misleading error message
  2004-11-30 19:45 PROBLEM: misleading error message Bebel
@ 2004-11-30 20:56 ` Jan Engelhardt
  2004-11-30 23:36   ` Greg KH
  2004-11-30 21:58 ` PROBLEM: misleading " Jesper Juhl
  1 sibling, 1 reply; 13+ messages in thread
From: Jan Engelhardt @ 2004-11-30 20:56 UTC (permalink / raw)
  Cc: linux-kernel

>I compiled built-in support for iptables in my new 2.6.9 kernel, but when my
>legacy firewall does a "modprobe ip_tables" , I get the startling message:
>"FATAL: module ip_tables not found" .
k

Linux Developers,

what would you think of say, a line added to modules' code that identifies
compiled-in components?
modprobe could then be adjusted to
1. try loading something.ko
2. looking for a component "something" within the compiled-in stuff

I'd imagine a module's init could look like:

int __init init_module(void) {
	...
	register_static_module("ip_tables");
	...
}

Or using some linker magic to generate a table/array full with strings to
indicate their presence. (I though of kstrtab, which is, to my knowledge, also
composed of multiple single symbols into one.)

Awaiting list feedback.




>A message like "Module ip_tables not needed; support already built in the
>kernel" would be much more helpfull, as I see it.

modprobe should just return 0 as is with the case for already-loaded modules.



Jan Engelhardt
-- 
ENOSPC

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: PROBLEM: misleading error message
  2004-11-30 19:45 PROBLEM: misleading error message Bebel
  2004-11-30 20:56 ` Misleading " Jan Engelhardt
@ 2004-11-30 21:58 ` Jesper Juhl
  2004-11-30 22:10   ` [RFC] " Jan Engelhardt
  1 sibling, 1 reply; 13+ messages in thread
From: Jesper Juhl @ 2004-11-30 21:58 UTC (permalink / raw)
  To: Bebel; +Cc: linux-kernel

On Tue, 30 Nov 2004, Bebel wrote:

> This may be a BUG REPORT, as I see it, allthough more experienced Linux users
> might think differently:
> 
> I compiled built-in support for iptables in my new 2.6.9 kernel, but when my
> legacy firewall does a "modprobe ip_tables" , I get the startling message:
> "FATAL: module ip_tables not found" .

In my oppinion the message is perfectly clear. You told modprobe to load a 
module, the file was not found so it is forced to give up - and that's 
exactely what it told you.

modprobe knows nothing about the functionality provided by any given 
module, it's only task in life is to attempt to load modules you tell it 
to load. So, it cannot tell you that "I didn't find this and besides, you 
don't need it since it's already build in", since modprobe does not have 
that information. 

All modprobe can do is try to load the module you told it to load, and 
when the file is missing that *is* a fatal error from modrobes point of 
view - it has absolutely no way to recover or give you any sane 
diagnostics since it has no idea what the mystery module you asked it to 
load that wasn't there was supposed to do.


-- 
Jesper Juhl



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFC] misleading error message
  2004-11-30 21:58 ` PROBLEM: misleading " Jesper Juhl
@ 2004-11-30 22:10   ` Jan Engelhardt
  2004-11-30 22:29     ` Jesper Juhl
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Engelhardt @ 2004-11-30 22:10 UTC (permalink / raw)
  Cc: linux-kernel

>> This may be a BUG REPORT, as I see it, allthough more experienced Linux users
>> might think differently:
>>
>> I compiled built-in support for iptables in my new 2.6.9 kernel, but when my
>> legacy firewall does a "modprobe ip_tables" , I get the startling message:
>> "FATAL: module ip_tables not found" .
>
>In my oppinion the message is perfectly clear. You told modprobe to load a
>module, the file was not found so it is forced to give up - and that's
>exactely what it told you.

So how would you go about finding out whether something is compiled-in?




Jan Engelhardt
-- 
ENOSPC

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFC] misleading error message
  2004-11-30 22:29     ` Jesper Juhl
@ 2004-11-30 22:27       ` Phil Oester
  2004-11-30 22:29       ` Lee Revell
  2004-11-30 22:30       ` Jan Engelhardt
  2 siblings, 0 replies; 13+ messages in thread
From: Phil Oester @ 2004-11-30 22:27 UTC (permalink / raw)
  To: Jesper Juhl; +Cc: Jan Engelhardt, linux-kernel

On Tue, Nov 30, 2004 at 11:29:20PM +0100, Jesper Juhl wrote:
> On Tue, 30 Nov 2004, Jan Engelhardt wrote:
> 
> > >> This may be a BUG REPORT, as I see it, allthough more experienced Linux users
> > >> might think differently:
> > >>
> > >> I compiled built-in support for iptables in my new 2.6.9 kernel, but when my
> > >> legacy firewall does a "modprobe ip_tables" , I get the startling message:
> > >> "FATAL: module ip_tables not found" .
> > >
> > >In my oppinion the message is perfectly clear. You told modprobe to load a
> > >module, the file was not found so it is forced to give up - and that's
> > >exactely what it told you.
> > 
> > So how would you go about finding out whether something is compiled-in?
> > 
> Personally I'd just go check my kernels .config

Or adjust your (broken) firewall script to do something like:

[ -f /proc/net/ip_tables_names ] || modprobe ip_tables

Phil


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFC] misleading error message
  2004-11-30 22:10   ` [RFC] " Jan Engelhardt
@ 2004-11-30 22:29     ` Jesper Juhl
  2004-11-30 22:27       ` Phil Oester
                         ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Jesper Juhl @ 2004-11-30 22:29 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: linux-kernel

On Tue, 30 Nov 2004, Jan Engelhardt wrote:

> >> This may be a BUG REPORT, as I see it, allthough more experienced Linux users
> >> might think differently:
> >>
> >> I compiled built-in support for iptables in my new 2.6.9 kernel, but when my
> >> legacy firewall does a "modprobe ip_tables" , I get the startling message:
> >> "FATAL: module ip_tables not found" .
> >
> >In my oppinion the message is perfectly clear. You told modprobe to load a
> >module, the file was not found so it is forced to give up - and that's
> >exactely what it told you.
> 
> So how would you go about finding out whether something is compiled-in?
> 
Personally I'd just go check my kernels .config

-- 
Jesper Juhl



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFC] misleading error message
  2004-11-30 22:29     ` Jesper Juhl
  2004-11-30 22:27       ` Phil Oester
@ 2004-11-30 22:29       ` Lee Revell
  2004-11-30 22:30       ` Jan Engelhardt
  2 siblings, 0 replies; 13+ messages in thread
From: Lee Revell @ 2004-11-30 22:29 UTC (permalink / raw)
  To: Jesper Juhl; +Cc: Jan Engelhardt, linux-kernel

On Tue, 2004-11-30 at 23:29 +0100, Jesper Juhl wrote:
> > 
> > So how would you go about finding out whether something is compiled-in?
> > 
> Personally I'd just go check my kernels .config

zgrep CONFIG_FOO /proc/config.gz

This requires CONFIG_IKCONFIG_PROC.  Many distros inexplicably do not
enable this by default.

Lee


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFC] misleading error message
  2004-11-30 22:29     ` Jesper Juhl
  2004-11-30 22:27       ` Phil Oester
  2004-11-30 22:29       ` Lee Revell
@ 2004-11-30 22:30       ` Jan Engelhardt
  2004-12-02 12:33         ` David Ford
  2 siblings, 1 reply; 13+ messages in thread
From: Jan Engelhardt @ 2004-11-30 22:30 UTC (permalink / raw)
  To: Jesper Juhl; +Cc: linux-kernel

>> >> I compiled built-in support for iptables in my new 2.6.9 kernel, but when my
>> >> legacy firewall does a "modprobe ip_tables" , I get the startling message:
>> >> "FATAL: module ip_tables not found" .
>> >
>> >In my oppinion the message is perfectly clear. You told modprobe to load a
>> >module, the file was not found so it is forced to give up - and that's
>> >exactely what it told you.
>>
>> So how would you go about finding out whether something is compiled-in?
>>
>Personally I'd just go check my kernels .config

Please, think of the newbies (tm)



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Misleading error message
  2004-11-30 20:56 ` Misleading " Jan Engelhardt
@ 2004-11-30 23:36   ` Greg KH
  0 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2004-11-30 23:36 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: linux-kernel

On Tue, Nov 30, 2004 at 09:56:25PM +0100, Jan Engelhardt wrote:
> >I compiled built-in support for iptables in my new 2.6.9 kernel, but when my
> >legacy firewall does a "modprobe ip_tables" , I get the startling message:
> >"FATAL: module ip_tables not found" .
> k
> 
> Linux Developers,
> 
> what would you think of say, a line added to modules' code that identifies
> compiled-in components?

See the patches posted to lkml to have modules that are built into the
kernel show up in sysfs.  Hopefully the remaining issues to that patch
are being addressed and then it will eventually make it into the main
kernel tree.  That should help with this issue a lot.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFC] misleading error message
  2004-11-30 22:30       ` Jan Engelhardt
@ 2004-12-02 12:33         ` David Ford
  2004-12-02 23:40           ` Ken Moffat
  2004-12-05  0:32           ` Horst von Brand
  0 siblings, 2 replies; 13+ messages in thread
From: David Ford @ 2004-12-02 12:33 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Jesper Juhl, linux-kernel

Random side thoughts..

a) is there a simple way to search for symbols in a running kernel's 
memory area that
b) can differentiate between module and static, and if so
c) is there an interest in a tiny tool that scripts  could use to 
determine existing support?

I want to be able to request information about a whooplesnoople without 
it triggering a module load request, to determine if it's compiled in 
statically.  I want to be able to distinguish static a static 
whooplesnoople from a modularly loaded whooplesnoople.

i.e.
Scott ~$ kernfunctionexists "iptables"
builtin

Other possible values:
module
not found

The tool would do the work of doing a lookup on "iptables" to match it 
with a certain name.  I.e "irda" would be resolved to a known proper 
irda_function_name() value.

The purpose of this is not to be able to research any given function 
name in the kernel, but to look for major support functions such as 
iptables.

David


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFC] misleading error message
  2004-12-02 12:33         ` David Ford
@ 2004-12-02 23:40           ` Ken Moffat
  2004-12-03 10:35             ` Jan Engelhardt
  2004-12-05  0:32           ` Horst von Brand
  1 sibling, 1 reply; 13+ messages in thread
From: Ken Moffat @ 2004-12-02 23:40 UTC (permalink / raw)
  To: David Ford; +Cc: Jan Engelhardt, Jesper Juhl, linux-kernel

On Thu, 2 Dec 2004, David Ford wrote:

> Random side thoughts..
>
> a) is there a simple way to search for symbols in a running kernel's
> memory area that
> b) can differentiate between module and static, and if so
> c) is there an interest in a tiny tool that scripts  could use to
> determine existing support?
>

 Take a look in /proc/kallsyms when you have a module loaded.  The
addresses are nowhere near the rest of the kernel, and the module names
appear in square brackets at the end of the lines, so something like

grep '\[natsemi\]' /proc/kallsyms

will find out if the natsemi driver is loaded.

Ken
-- 
 das eine Mal als Tragödie, das andere Mal als Farce


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFC] misleading error message
  2004-12-02 23:40           ` Ken Moffat
@ 2004-12-03 10:35             ` Jan Engelhardt
  0 siblings, 0 replies; 13+ messages in thread
From: Jan Engelhardt @ 2004-12-03 10:35 UTC (permalink / raw)
  Cc: linux-kernel

>> Random side thoughts..
>>
>> a) is there a simple way to search for symbols in a running kernel's
>> memory area that
>> b) can differentiate between module and static, and if so
>> c) is there an interest in a tiny tool that scripts  could use to
>> determine existing support?
>>
>
> Take a look in /proc/kallsyms when you have a module loaded. [...]
>grep '\[natsemi\]' /proc/kallsyms

Most distributors do not have the CONFIG_KALLSYMS (or whatever it is called)
active. And IIRC, the help texts say that it consumes a lot of memory (which is
probably due to kallsyms storing not only symbols we need).


Jan Engelhardt
-- 
ENOSPC

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFC] misleading error message
  2004-12-02 12:33         ` David Ford
  2004-12-02 23:40           ` Ken Moffat
@ 2004-12-05  0:32           ` Horst von Brand
  1 sibling, 0 replies; 13+ messages in thread
From: Horst von Brand @ 2004-12-05  0:32 UTC (permalink / raw)
  To: David Ford; +Cc: Jan Engelhardt, Jesper Juhl, linux-kernel

David Ford <david+challenge-response@blue-labs.org> said:

[...]

> I want to be able to request information about a whooplesnoople without 
> it triggering a module load request, to determine if it's compiled in 
> statically.  I want to be able to distinguish static a static 
> whooplesnoople from a modularly loaded whooplesnoople.

The running kernel might have been compiled with whooplesnoople support,
but the module isn't there (or is broken); there are modules (think the
infamous binary drivers, but the NTFS and ipw-2x00 drivers are fully open
source examples I use) that can be loaded into "any" running kernel (even
build them after the kernel was built). A part of the module mechanism is
exactly for making that possible, so this is not a _kernel_ property, but a
_setup_ property.

The only reliable way of finding out if support is there is by using it. Or
groping inside /etc/modprobe.conf and /lib/modules &c to find out, if you
are brave. I'm chicken.
-- 
Dr. Horst H. von Brand                   User #22616 counter.li.org
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2004-12-05  5:28 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-30 19:45 PROBLEM: misleading error message Bebel
2004-11-30 20:56 ` Misleading " Jan Engelhardt
2004-11-30 23:36   ` Greg KH
2004-11-30 21:58 ` PROBLEM: misleading " Jesper Juhl
2004-11-30 22:10   ` [RFC] " Jan Engelhardt
2004-11-30 22:29     ` Jesper Juhl
2004-11-30 22:27       ` Phil Oester
2004-11-30 22:29       ` Lee Revell
2004-11-30 22:30       ` Jan Engelhardt
2004-12-02 12:33         ` David Ford
2004-12-02 23:40           ` Ken Moffat
2004-12-03 10:35             ` Jan Engelhardt
2004-12-05  0:32           ` Horst von Brand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox