All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Valdis.Kletnieks@vt.edu
Cc: Trent Piepho <xyzzy@speakeasy.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Harvey Harrison <harvey.harrison@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org
Subject: Re: [PATCH] printk: Let %pR handle NULL pointers
Date: Sun, 04 Jan 2009 10:31:26 +0100	[thread overview]
Message-ID: <1231061486.3313.5.camel@johannes> (raw)
In-Reply-To: <25339.1231046074@turing-police.cc.vt.edu> (sfid-20090104_061506_353829_E8D12250)

[-- 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 --]

  reply	other threads:[~2009-01-04  9:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-03 10:42 [PATCH] printk: Let %pR handle NULL pointers Trent Piepho
2009-01-03 17:10 ` Linus Torvalds
2009-01-03 19:33   ` Harvey Harrison
2009-01-03 21:53   ` Benjamin Herrenschmidt
2009-01-04  5:02     ` Trent Piepho
2009-01-04  5:14       ` Valdis.Kletnieks
2009-01-04  9:31         ` Johannes Berg [this message]
2009-01-04  9:48       ` Benjamin Herrenschmidt
2009-01-04 20:41         ` Trent Piepho

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1231061486.3313.5.camel@johannes \
    --to=johannes@sipsolutions.net \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=harvey.harrison@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=xyzzy@speakeasy.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.