linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Ratelimit SO_BSDCOMPAT warnings
@ 2003-08-18 22:06 Phil Oester
  2003-08-18 22:15 ` Valdis.Kletnieks
  0 siblings, 1 reply; 7+ messages in thread
From: Phil Oester @ 2003-08-18 22:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-net

Back in March, there was some discussion about ratelimiting the
BSDCOMPAT errors, and James Morris provided a patch to achieve
this.

http://www.ussg.iu.edu/hypermail/linux/kernel/0303.3/1078.html

To which David Miller stated the patch had been applied.

http://www.ussg.iu.edu/hypermail/linux/kernel/0303.3/1081.html

Unfortunately, it seems to have fallen through the cracks.  Below
is the patch again, updated for 2.6.0-test3 - please apply.

Phil Oester

--- linux-2.6.0-test3-orig/net/core/sock.c      Sat Aug  9 00:38:59 2003
+++ linux-2.6.0-test3/net/core/sock.c   Mon Aug 18 18:01:15 2003
@@ -153,8 +153,13 @@
 
 static void sock_warn_obsolete_bsdism(const char *name)
 {
-       printk(KERN_WARNING "process `%s' is using obsolete "
-              "%s SO_BSDCOMPAT\n", current->comm, name);
+       static int warned;
+
+       if (!warned) {
+               warned = 1;
+               printk(KERN_WARNING "process `%s' is using obsolete "
+                      "%s SO_BSDCOMPAT\n", current->comm, name);
+       }
 }
 
 /*


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

* Re: [PATCH] Ratelimit SO_BSDCOMPAT warnings
  2003-08-18 22:06 [PATCH] Ratelimit SO_BSDCOMPAT warnings Phil Oester
@ 2003-08-18 22:15 ` Valdis.Kletnieks
  2003-08-18 22:48   ` David S. Miller
  2003-08-19  0:37   ` James Morris
  0 siblings, 2 replies; 7+ messages in thread
From: Valdis.Kletnieks @ 2003-08-18 22:15 UTC (permalink / raw)
  To: Phil Oester; +Cc: linux-kernel, linux-net

[-- Attachment #1: Type: text/plain, Size: 897 bytes --]

On Mon, 18 Aug 2003 15:06:05 PDT, Phil Oester said:
> Back in March, there was some discussion about ratelimiting the
> BSDCOMPAT errors, and James Morris provided a patch to achieve
> this.

> Unfortunately, it seems to have fallen through the cracks.  Below
> is the patch again, updated for 2.6.0-test3 - please apply.

>  static void sock_warn_obsolete_bsdism(const char *name)
>  {
> -       printk(KERN_WARNING "process `%s' is using obsolete "
> -              "%s SO_BSDCOMPAT\n", current->comm, name);
> +       static int warned;
> +
> +       if (!warned) {
> +               warned = 1;


Umm.. am I dense, or does this only warn once for *the first program*
to do it after the system boots?  And you don't get another warning about
any OTHER programs until you reboot in a few weeks (possibly)?

If so, why are we bothering at all?  Once *per process* I could see, but
once per boot?

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

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

* Re: [PATCH] Ratelimit SO_BSDCOMPAT warnings
  2003-08-18 22:15 ` Valdis.Kletnieks
@ 2003-08-18 22:48   ` David S. Miller
  2003-08-19  0:36     ` Jamie Lokier
  2003-08-19  0:37   ` James Morris
  1 sibling, 1 reply; 7+ messages in thread
From: David S. Miller @ 2003-08-18 22:48 UTC (permalink / raw)
  To: Valdis.Kletnieks; +Cc: kernel, linux-kernel, linux-net

On Mon, 18 Aug 2003 18:15:40 -0400
Valdis.Kletnieks@vt.edu wrote:

> On Mon, 18 Aug 2003 15:06:05 PDT, Phil Oester said:
> >  static void sock_warn_obsolete_bsdism(const char *name)
> >  {
> > -       printk(KERN_WARNING "process `%s' is using obsolete "
> > -              "%s SO_BSDCOMPAT\n", current->comm, name);
> > +       static int warned;
> > +
> > +       if (!warned) {
> > +               warned = 1;
> 
> Umm.. am I dense, or does this only warn once for *the first program*
> to do it after the system boots?  And you don't get another warning about
> any OTHER programs until you reboot in a few weeks (possibly)?

Yes, this patch does suck hard.

I see no reason to apply this, just fix your apps and the
warning will stop.  There's only a handful of programs
that trigger this at all.


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

* Re: [PATCH] Ratelimit SO_BSDCOMPAT warnings
  2003-08-18 22:48   ` David S. Miller
@ 2003-08-19  0:36     ` Jamie Lokier
  2003-08-19  1:05       ` Jamie Lokier
  0 siblings, 1 reply; 7+ messages in thread
From: Jamie Lokier @ 2003-08-19  0:36 UTC (permalink / raw)
  To: David S. Miller; +Cc: Valdis.Kletnieks, kernel, linux-kernel, linux-net

David S. Miller wrote:
> I see no reason to apply this, just fix your apps and the
> warning will stop.  There's only a handful of programs
> that trigger this at all.

Unfortunately Red Hat's BIND is among the more prominent. :-/

-- Jamie

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

* Re: [PATCH] Ratelimit SO_BSDCOMPAT warnings
  2003-08-18 22:15 ` Valdis.Kletnieks
  2003-08-18 22:48   ` David S. Miller
@ 2003-08-19  0:37   ` James Morris
  1 sibling, 0 replies; 7+ messages in thread
From: James Morris @ 2003-08-19  0:37 UTC (permalink / raw)
  To: Valdis.Kletnieks; +Cc: Phil Oester, linux-kernel, linux-net

On Mon, 18 Aug 2003 Valdis.Kletnieks@vt.edu wrote:

> If so, why are we bothering at all?  Once *per process* I could see, but
> once per boot?

Once per process is too complicated, and an aggregate of people reporting 
the message should lead to all of the major apps being fixed.


- James
-- 
James Morris
<jmorris@intercode.com.au>


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

* Re: [PATCH] Ratelimit SO_BSDCOMPAT warnings
  2003-08-19  0:36     ` Jamie Lokier
@ 2003-08-19  1:05       ` Jamie Lokier
  2003-08-19 14:32         ` Phil Oester
  0 siblings, 1 reply; 7+ messages in thread
From: Jamie Lokier @ 2003-08-19  1:05 UTC (permalink / raw)
  To: David S. Miller; +Cc: Valdis.Kletnieks, kernel, linux-kernel, linux-net

Jamie Lokier wrote:
> David S. Miller wrote:
> > I see no reason to apply this, just fix your apps and the
> > warning will stop.  There's only a handful of programs
> > that trigger this at all.
> 
> Unfortunately Red Hat's BIND is among the more prominent. :-/

Sorry, I didn't mean to imply _just_ Red Hat.  Probably all distros'
BINDs use SO_BSDCOMPAT.  What I meant was this is the only program I
notice the warning from, when running a 2.5 kernel on an otherwise Red
Hat 9 system.  And it comes up every time I connect to the net, when I
restart named with new forwarders, which is about hourly :/

-- Jamie


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

* Re: [PATCH] Ratelimit SO_BSDCOMPAT warnings
  2003-08-19  1:05       ` Jamie Lokier
@ 2003-08-19 14:32         ` Phil Oester
  0 siblings, 0 replies; 7+ messages in thread
From: Phil Oester @ 2003-08-19 14:32 UTC (permalink / raw)
  To: Jamie Lokier; +Cc: Valdis.Kletnieks, linux-kernel, linux-net

Admittedly, recompiling Bind after commenting out the #define from
asm/socket.h does also solve the errors.  But it does seem overkill
to warn on every single use of this...

Phil

On Tue, Aug 19, 2003 at 02:05:50AM +0100, Jamie Lokier wrote:
> Jamie Lokier wrote:
> > David S. Miller wrote:
> > > I see no reason to apply this, just fix your apps and the
> > > warning will stop.  There's only a handful of programs
> > > that trigger this at all.
> > 
> > Unfortunately Red Hat's BIND is among the more prominent. :-/
> 
> Sorry, I didn't mean to imply _just_ Red Hat.  Probably all distros'
> BINDs use SO_BSDCOMPAT.  What I meant was this is the only program I
> notice the warning from, when running a 2.5 kernel on an otherwise Red
> Hat 9 system.  And it comes up every time I connect to the net, when I
> restart named with new forwarders, which is about hourly :/
> 
> -- Jamie

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

end of thread, other threads:[~2003-08-19 14:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-18 22:06 [PATCH] Ratelimit SO_BSDCOMPAT warnings Phil Oester
2003-08-18 22:15 ` Valdis.Kletnieks
2003-08-18 22:48   ` David S. Miller
2003-08-19  0:36     ` Jamie Lokier
2003-08-19  1:05       ` Jamie Lokier
2003-08-19 14:32         ` Phil Oester
2003-08-19  0:37   ` James Morris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).