linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: linux1394-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org,
	Carl Karsten <carl@personnelware.com>
Subject: [PATCH 1/3] firewire: do not expose globally unique IDs in the kernel log
Date: Tue, 20 Dec 2011 21:31:20 +0100	[thread overview]
Message-ID: <20111220213120.5e275f10@stein> (raw)
In-Reply-To: <20111220213017.75ff380c@stein>

Printing worldwide unique IDs in the kernel log is questionable from a
privacy point of view.  Some people edit such IDs out of the log before
they post bug reports.  Make life easier for them and do not log GUIDs
anymore.  For local debugging, GUIDs are still available during the
lifetime of a device in /sys/bus/firewire/devices/fw*/guid.

Instead, log the vendor-unique part of the device ID (the OUI) in
firewire-core and bus IDs in firewire-net.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
 drivers/firewire/core-device.c |    8 ++++----
 drivers/firewire/net.c         |    8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

Index: b/drivers/firewire/core-device.c
===================================================================
--- a/drivers/firewire/core-device.c
+++ b/drivers/firewire/core-device.c
@@ -1036,16 +1036,16 @@ static void fw_device_init(struct work_s
 		fw_schedule_device_work(device, SHUTDOWN_DELAY);
 	} else {
 		if (device->config_rom_retries)
-			fw_notify("created device %s: GUID %08x%08x, S%d00, "
+			fw_notify("created device %s: OUI %06x, S%d00, "
 				  "%d config ROM retries\n",
 				  dev_name(&device->device),
-				  device->config_rom[3], device->config_rom[4],
+				  device->config_rom[3] >> 8,
 				  1 << device->max_speed,
 				  device->config_rom_retries);
 		else
-			fw_notify("created device %s: GUID %08x%08x, S%d00\n",
+			fw_notify("created device %s: OUI %06x, S%d00\n",
 				  dev_name(&device->device),
-				  device->config_rom[3], device->config_rom[4],
+				  device->config_rom[3] >> 8,
 				  1 << device->max_speed);
 		device->config_rom_retries = 0;
 
Index: b/drivers/firewire/net.c
===================================================================
--- a/drivers/firewire/net.c
+++ b/drivers/firewire/net.c
@@ -574,8 +574,8 @@ static int fwnet_finish_incoming_packet(
 		spin_unlock_irqrestore(&dev->lock, flags);
 
 		if (!peer) {
-			fw_notify("No peer for ARP packet from %016llx\n",
-				  (unsigned long long)peer_guid);
+			fw_notify("No peer for ARP packet from %04x\n",
+				  source_node_id);
 			goto no_peer;
 		}
 
@@ -1545,8 +1545,8 @@ static int fwnet_probe(struct device *_d
 	}
 
 	list_add_tail(&dev->dev_link, &fwnet_device_list);
-	fw_notify("%s: IPv4 over FireWire on device %016llx\n",
-		  net->name, (unsigned long long)card->guid);
+	fw_notify("%s: IPv4 over FireWire on card %d device %s\n",
+		  net->name, card->index, dev_name(card->device));
  have_dev:
 	ret = fwnet_add_peer(dev, unit, device);
 	if (ret && allocated_netdev) {

-- 
Stefan Richter
-=====-==-== ==-- =-=--
http://arcgraph.de/sr/

  reply	other threads:[~2011-12-20 20:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-20 20:30 [PATCH 0/3] firewire: some simple kernel log changes Stefan Richter
2011-12-20 20:31 ` Stefan Richter [this message]
2011-12-20 20:58   ` [PATCH 1/3] firewire: do not expose globally unique IDs in the kernel log Carl Karsten
2011-12-20 23:10     ` Stefan Richter
2011-12-20 23:42       ` Carl Karsten
2011-12-20 23:43       ` Stefan Richter
2011-12-20 23:50         ` Carl Karsten
2011-12-20 20:32 ` [PATCH 2/3] firewire: ohci: use dev_printk API Stefan Richter
2011-12-20 20:34 ` [PATCH 3/3] firewire: sbp2: " Stefan Richter

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=20111220213120.5e275f10@stein \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=carl@personnelware.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    /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 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).