public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Shut up about the damn modules already...
@ 2004-02-12  3:13 Rusty Russell
  2004-02-12 15:13 ` Rik van Riel
  2004-02-13 16:51 ` Bas Mevissen
  0 siblings, 2 replies; 7+ messages in thread
From: Rusty Russell @ 2004-02-12  3:13 UTC (permalink / raw)
  To: torvalds, akpm; +Cc: linux-kernel

Please apply before 2.6.3.

In almost all distributions, the kernel asks for modules which don't
exist, such as "net-pf-10" or whatever.  Changing "modprobe -q" to
"succeed" in this case is hacky and breaks some setups, and also we
want to know if it failed for the fallback code for old aliases in
fs/char_dev.c, for example.

Just remove the debugging message which fill people's logs: the
correct way of debugging module problems is something like this:

echo '#! /bin/sh' > /tmp/modprobe
echo 'echo "$@" >> /tmp/modprobe.log' >> /tmp/modprobe
echo 'exec /sbin/modprobe "$@"' >> /tmp/modprobe
chmod a+x /tmp/modprobe
echo /tmp/modprobe > /proc/sys/kernel/modprobe

Thanks!
Rusty.

diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.6.3-rc2-bk1/kernel/kmod.c tmp/kernel/kmod.c
--- linux-2.6.3-rc2-bk1/kernel/kmod.c	2004-01-10 13:59:39.000000000 +1100
+++ tmp/kernel/kmod.c	2004-02-12 14:07:33.000000000 +1100
@@ -105,16 +105,6 @@ int request_module(const char *fmt, ...)
 	}
 
 	ret = call_usermodehelper(modprobe_path, argv, envp, 1);
-	if (ret != 0) {
-		static unsigned long last;
-		unsigned long now = jiffies;
-		if (now - last > HZ) {
-			last = now;
-			printk(KERN_DEBUG
-			       "request_module: failed %s -- %s. error = %d\n",
-			       modprobe_path, module_name, ret);
-		}
-	}
 	atomic_dec(&kmod_concurrent);
 	return ret;
 }

--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

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

* Re: [PATCH] Shut up about the damn modules already...
  2004-02-12  3:13 Rusty Russell
@ 2004-02-12 15:13 ` Rik van Riel
  2004-02-13 16:51 ` Bas Mevissen
  1 sibling, 0 replies; 7+ messages in thread
From: Rik van Riel @ 2004-02-12 15:13 UTC (permalink / raw)
  To: Rusty Russell; +Cc: torvalds, akpm, linux-kernel

On Thu, 12 Feb 2004, Rusty Russell wrote:

> Just remove the debugging message which fill people's logs: the
> correct way of debugging module problems is something like this:

Could you add that to Documentation/  ;)

-- 
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan


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

* Re: [PATCH] Shut up about the damn modules already...
  2004-02-12  3:13 Rusty Russell
  2004-02-12 15:13 ` Rik van Riel
@ 2004-02-13 16:51 ` Bas Mevissen
  2004-02-13 18:55   ` Chris Wright
  2004-02-13 19:38   ` Russell King
  1 sibling, 2 replies; 7+ messages in thread
From: Bas Mevissen @ 2004-02-13 16:51 UTC (permalink / raw)
  To: Rusty Russell; +Cc: torvalds, akpm, linux-kernel

Rusty Russell wrote:

> Please apply before 2.6.3.
> 
> In almost all distributions, the kernel asks for modules which don't
> exist, such as "net-pf-10" or whatever.  Changing "modprobe -q" to
> "succeed" in this case is hacky and breaks some setups, and also we
> want to know if it failed for the fallback code for old aliases in
> fs/char_dev.c, for example.
> 
> Just remove the debugging message which fill people's logs:

Yup, those messages are really annoying.

I'm wondering why it is that the kernel is asking for non-existing 
modules so often. Is it that userspace applications try to access all 
kinds of devices too often (autoprobing) or it this (wanted) kernel 
behaviour?

If it is the former, I think that applications should be fixed in the 
first place. Maybe userspace and kernel should share knowledge about 
what devices are there and supported by the kernel(modules).

In the meantime, your patch needs to go in though because fixing this in 
userspace is not something that will happen on short term.

Regards,

Bas.



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

* Re: [PATCH] Shut up about the damn modules already...
@ 2004-02-13 17:38 Samium Gromoff
  2004-02-13 19:41 ` Russell King
  0 siblings, 1 reply; 7+ messages in thread
From: Samium Gromoff @ 2004-02-13 17:38 UTC (permalink / raw)
  To: ml; +Cc: linux-kernel

> Rusty Russell wrote:                                                                   
>                                                                                         
>  > Please apply before 2.6.3.                                                           
>  >                                                                                      
>  > In almost all distributions, the kernel asks for modules which don't                 
>  > exist, such as "net-pf-10" or whatever.  Changing "modprobe -q" to                   
>  > "succeed" in this case is hacky and breaks some setups, and also we                  
>  > want to know if it failed for the fallback code for old aliases in                   
>  > fs/char_dev.c, for example.                                                          
>  >                                                                                      
>  > Just remove the debugging message which fill people's logs:                          
>                                                                                         
>  Yup, those messages are really annoying.                                               
>                                                                                         
>  I'm wondering why it is that the kernel is asking for non-existing                     
>  modules so often. Is it that userspace applications try to access all                  
>  kinds of devices too often (autoprobing) or it this (wanted) kernel                    
>  behaviour?                                                                             
>                                                                                         
>  If it is the former, I think that applications should be fixed in the                  
>  first place. Maybe userspace and kernel should share knowledge about                   
>  what devices are there and supported by the kernel(modules).                           
>                                                                                         
>  In the meantime, your patch needs to go in though because fixing this in               
>  userspace is not something that will happen on short term.                             
Wouldn`t this remove the last reason to fix the broken software?

>  Regards,            
> 
>  Bas.                                                                  

regards, Samium Gromoff



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

* Re: [PATCH] Shut up about the damn modules already...
  2004-02-13 16:51 ` Bas Mevissen
@ 2004-02-13 18:55   ` Chris Wright
  2004-02-13 19:38   ` Russell King
  1 sibling, 0 replies; 7+ messages in thread
From: Chris Wright @ 2004-02-13 18:55 UTC (permalink / raw)
  To: Bas Mevissen; +Cc: linux-kernel

[trimmed back Cc:]

* Bas Mevissen (ml@basmevissen.nl) wrote:
> I'm wondering why it is that the kernel is asking for non-existing 
> modules so often. Is it that userspace applications try to access all 
> kinds of devices too often (autoprobing) or it this (wanted) kernel 
> behaviour?

The most common and annoying example (the one Rusty used), "net-pf-10,"
is a result of a userspace app doing simple socket(AF_INET6,...).

thanks,
-chris
-- 
Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net

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

* Re: [PATCH] Shut up about the damn modules already...
  2004-02-13 16:51 ` Bas Mevissen
  2004-02-13 18:55   ` Chris Wright
@ 2004-02-13 19:38   ` Russell King
  1 sibling, 0 replies; 7+ messages in thread
From: Russell King @ 2004-02-13 19:38 UTC (permalink / raw)
  To: Bas Mevissen; +Cc: Rusty Russell, torvalds, akpm, linux-kernel

On Fri, Feb 13, 2004 at 05:51:15PM +0100, Bas Mevissen wrote:
> I'm wondering why it is that the kernel is asking for non-existing 
> modules so often. Is it that userspace applications try to access all 
> kinds of devices too often (autoprobing) or it this (wanted) kernel 
> behaviour?

Userspace probes the kernel to see if IPv6 is available by trying to
create an IPv6 socket.

The correct solution is to fix /etc/modprobe.conf such that it doesn't
try to load the module when you don't have it configured:

install net-pf-10 /bin/true

Note that if you alias net-pf-10 to ipv6 before this install line, you
need to replace net-pf-10 with ipv6 in the install line.

PS, I notice Arjan's RPM packages don't seem to contain the modprobe.conf
manual page... maybe this is what's causing some of the confusion?

PPS, It might also help to either mention in the man page that the
above corresponds to the original "alias modulename off" _or_ add
"install off /bin/true" into modprobe.conf.dist such that the old
alias line works as expected.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

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

* Re: [PATCH] Shut up about the damn modules already...
  2004-02-13 17:38 [PATCH] Shut up about the damn modules already Samium Gromoff
@ 2004-02-13 19:41 ` Russell King
  0 siblings, 0 replies; 7+ messages in thread
From: Russell King @ 2004-02-13 19:41 UTC (permalink / raw)
  To: Samium Gromoff; +Cc: ml, linux-kernel

On Fri, Feb 13, 2004 at 08:38:19PM +0300, Samium Gromoff wrote:
> >  In the meantime, your patch needs to go in though because fixing this in               
> >  userspace is not something that will happen on short term.                             
> Wouldn`t this remove the last reason to fix the broken software?

I don't believe there's any code which needs fixing in userspace.  We just
need modprobe.conf to do the right thing when we convert peoples old
modules.conf files.

The original modprobe defaults to:

alias net-pf-10 off

unless net-pf-10 is explicitly aliased to something else (ipv6).  We
therefore just need peoples modprobe.conf files to contain:

install net-pf-10 /bin/true

provided they haven't aliased net-pf-10 to ipv6.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

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

end of thread, other threads:[~2004-02-13 19:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-13 17:38 [PATCH] Shut up about the damn modules already Samium Gromoff
2004-02-13 19:41 ` Russell King
  -- strict thread matches above, loose matches on Subject: below --
2004-02-12  3:13 Rusty Russell
2004-02-12 15:13 ` Rik van Riel
2004-02-13 16:51 ` Bas Mevissen
2004-02-13 18:55   ` Chris Wright
2004-02-13 19:38   ` Russell King

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