netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] printk: Let %pR handle NULL pointers
       [not found]     ` <Pine.LNX.4.58.0901031827380.25853@shell2.speakeasy.net>
@ 2009-01-04  5:14       ` Valdis.Kletnieks
  2009-01-04  9:31         ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Valdis.Kletnieks @ 2009-01-04  5:14 UTC (permalink / raw)
  To: Trent Piepho
  Cc: Benjamin Herrenschmidt, Linus Torvalds, Linux Kernel Mailing List,
	Harvey Harrison, David S. Miller, netdev

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

On Sat, 03 Jan 2009 21:02:15 PST, Trent Piepho said:
> resource pointer.  Maybe "[]" or "[-]" would be better?  A null MAC address
> could be ":::::" or "x:x:x:x:x:x".  "N.U.L.L" or "x.x.x.x" for a null IP4
> address.  And so on.  So the printout looks nicer when a NULL pointer isn't
> a bug.

Have to be careful for IPv6 addresses - '::' is a legal representation of
an all-zeros address.  Also, N.U.L.L. may give indigestion to logfile parsers
that are expecting a numeric value in the IP address.  It's however unclear
whether we should pick something that doesn't have 3 periods in it, so it
can't match, or whether *that* will give regexp-based logfile readers
indigestion when they don't pick up an IP address where they expected...

Do we want the %pI6 format to do the multiple-zeros -> :: compression?

(Adding netdev to cc: list)

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

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

* Re: [PATCH] printk: Let %pR handle NULL pointers
  2009-01-04  5:14       ` [PATCH] printk: Let %pR handle NULL pointers Valdis.Kletnieks
@ 2009-01-04  9:31         ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2009-01-04  9:31 UTC (permalink / raw)
  To: Valdis.Kletnieks
  Cc: Trent Piepho, Benjamin Herrenschmidt, Linus Torvalds,
	Linux Kernel Mailing List, Harvey Harrison, David S. Miller,
	netdev

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

On Sun, 2009-01-04 at 00:14 -0500, Valdis.Kletnieks@vt.edu wrote:
> On Sat, 03 Jan 2009 21:02:15 PST, Trent Piepho said:
> > resource pointer.  Maybe "[]" or "[-]" would be better?  A null MAC address
> > could be ":::::" or "x:x:x:x:x:x".  "N.U.L.L" or "x.x.x.x" for a null IP4
> > address.  And so on.  So the printout looks nicer when a NULL pointer isn't
> > a bug.
> 
> Have to be careful for IPv6 addresses - '::' is a legal representation of
> an all-zeros address.  Also, N.U.L.L. may give indigestion to logfile parsers
> that are expecting a numeric value in the IP address.  It's however unclear
> whether we should pick something that doesn't have 3 periods in it, so it
> can't match, or whether *that* will give regexp-based logfile readers
> indigestion when they don't pick up an IP address where they expected...
> 
> Do we want the %pI6 format to do the multiple-zeros -> :: compression?

Eh, why ever care? We aren't passing NULL pointers in, hopefully, or the
code was crashing, at least before the conversion... So as long as we're
careful adding new users, I don't see a problem with not handling NULL.

FWIW, I'd think for MAC addresses there are multiple possible
interpretations, some wireless code assumes broadcast for NULL, and I'm
sure there are others like all-zeroes.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2009-01-04  9:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1230979341-23029-1-git-send-email-xyzzy@speakeasy.org>
     [not found] ` <alpine.LFD.2.00.0901030905140.3179@localhost.localdomain>
     [not found]   ` <1231019614.15389.104.camel@pasglop>
     [not found]     ` <Pine.LNX.4.58.0901031827380.25853@shell2.speakeasy.net>
2009-01-04  5:14       ` [PATCH] printk: Let %pR handle NULL pointers Valdis.Kletnieks
2009-01-04  9:31         ` Johannes Berg

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).