Skip to contentSkip to conversation

watchdog: i6300esb: stop printing kernel addresses

PATCH In review Matteo Croce 2 participants 4 messages Mar 18, 2019 – Mar 19, 2019 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 watchdog: i6300esb: stop printing kernel addresses

Since commit ad67b74d2469d9b8 ("printk: hash addresses printed with %p"), i6300esb prints "____ptrval____" instead of actual addresses:

    i6300ESB timer 0000:00:03.0: initialized (0x(____ptrval____)). heartbeat=30 sec (nowayout=1)

Instead of changing the print to "%px", and leaking kernel addresses, just remove the print completely, cfr. e.g. commit 071929dbdd865f77 ("arm64: Stop printing the virtual memory layout").

---
 drivers/watchdog/i6300esb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/watchdog/i6300esb.c +2 -2
index 950c71a8bb22..e312a2aeecad 100644
@@ -328,8 +328,8 @@ static int esb_probe(struct pci_dev *pdev,
 		goto err_unmap;
 	}
 	dev_info(&pdev->dev,
-		"initialized (0x%p). heartbeat=%d sec (nowayout=%d)\n",
-		edev->base, edev->wdd.timeout, nowayout);
+		"initialized. heartbeat=%d sec (nowayout=%d)\n",
+		edev->wdd.timeout, nowayout);
 	return 0;
 
 err_unmap:
Signature · 1 line
2.20.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Matteo Croce

Since commit ad67b74d2469d9b8 ("printk: hash addresses printed with %p"), i6300esb prints "____ptrval____" instead of actual addresses:

     i6300ESB timer 0000:00:03.0: initialized (0x(____ptrval____)). heartbeat=30 sec (nowayout=1)

Instead of changing the print to "%px", and leaking kernel addresses, just remove the print completely, cfr. e.g. commit 071929dbdd865f77 ("arm64: Stop printing the virtual memory layout").

Quoted 20 lines
---
  drivers/watchdog/i6300esb.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/watchdog/i6300esb.c +2 -2
index 950c71a8bb22..e312a2aeecad 100644
@@ -328,8 +328,8 @@ static int esb_probe(struct pci_dev *pdev,
  		goto err_unmap;
  	}
  	dev_info(&pdev->dev,
-		"initialized (0x%p). heartbeat=%d sec (nowayout=%d)\n",
-		edev->base, edev->wdd.timeout, nowayout);
+		"initialized. heartbeat=%d sec (nowayout=%d)\n",
+		edev->wdd.timeout, nowayout);
  	return 0;
 
  err_unmap:
#2 lore raw
Quoted 33 lines · Guenter Roeck
Quoted 10 lines · Matteo Croce

Since commit ad67b74d2469d9b8 ("printk: hash addresses printed with %p"), i6300esb prints "____ptrval____" instead of actual addresses:

     i6300ESB timer 0000:00:03.0: initialized (0x(____ptrval____)). heartbeat=30 sec (nowayout=1)

Instead of changing the print to "%px", and leaking kernel addresses, just remove the print completely, cfr. e.g. commit 071929dbdd865f77 ("arm64: Stop printing the virtual memory layout").

Quoted 18 lines
---
  drivers/watchdog/i6300esb.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/watchdog/i6300esb.c +2 -2
index 950c71a8bb22..e312a2aeecad 100644
@@ -328,8 +328,8 @@ static int esb_probe(struct pci_dev *pdev,
              goto err_unmap;
      }
      dev_info(&pdev->dev,
-             "initialized (0x%p). heartbeat=%d sec (nowayout=%d)\n",
-             edev->base, edev->wdd.timeout, nowayout);
+             "initialized. heartbeat=%d sec (nowayout=%d)\n",
+             edev->wdd.timeout, nowayout);
      return 0;
 
Quoted 3 lines

drivers/watchdog/i6300esb.c static int esb_probe(struct pci_dev *pdev, · line 335

Quoted 2 lines
drivers/watchdog/i6300esb.c +0 -0
  err_unmap:

Nit: can someone add the fixes tag before merge?

Fixes ad67b74d2469d9b8 ("printk: hash addresses printed with %p")

Thanks,

Signature · 2 lines
Matteo Croce
per aspera ad upstream
maintainer
#3 lore raw
Quoted 34 lines · Matteo Croce
Quoted 33 lines · Guenter Roeck
Quoted 10 lines · Matteo Croce

Since commit ad67b74d2469d9b8 ("printk: hash addresses printed with %p"), i6300esb prints "____ptrval____" instead of actual addresses:

      i6300ESB timer 0000:00:03.0: initialized (0x(____ptrval____)). heartbeat=30 sec (nowayout=1)

Instead of changing the print to "%px", and leaking kernel addresses, just remove the print completely, cfr. e.g. commit 071929dbdd865f77 ("arm64: Stop printing the virtual memory layout").

Quoted 18 lines
---
   drivers/watchdog/i6300esb.c | 4 ++--
   1 file changed, 2 insertions(+), 2 deletions(-)
drivers/watchdog/i6300esb.c +2 -2
index 950c71a8bb22..e312a2aeecad 100644
@@ -328,8 +328,8 @@ static int esb_probe(struct pci_dev *pdev,
               goto err_unmap;
       }
       dev_info(&pdev->dev,
-             "initialized (0x%p). heartbeat=%d sec (nowayout=%d)\n",
-             edev->base, edev->wdd.timeout, nowayout);
+             "initialized. heartbeat=%d sec (nowayout=%d)\n",
+             edev->wdd.timeout, nowayout);
       return 0;
 
Quoted 8 lines
Quoted 3 lines

drivers/watchdog/i6300esb.c static int esb_probe(struct pci_dev *pdev, · line 335

Quoted 2 lines
drivers/watchdog/i6300esb.c +0 -0
   err_unmap:

Nit: can someone add the fixes tag before merge?

Fixes ad67b74d2469d9b8 ("printk: hash addresses printed with %p")

This isn't really a bug fix.

Guenter