linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] watchdog: i6300esb: stop printing kernel addresses
@ 2019-03-18  1:19 Matteo Croce
  2019-03-18  2:53 ` Guenter Roeck
  0 siblings, 1 reply; 4+ messages in thread
From: Matteo Croce @ 2019-03-18  1:19 UTC (permalink / raw)
  To: linux-watchdog; +Cc: Guenter Roeck, Wim Van Sebroeck

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

Signed-off-by: Matteo Croce <mcroce@redhat.com>
---
 drivers/watchdog/i6300esb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/watchdog/i6300esb.c b/drivers/watchdog/i6300esb.c
index 950c71a8bb22..e312a2aeecad 100644
--- a/drivers/watchdog/i6300esb.c
+++ b/drivers/watchdog/i6300esb.c
@@ -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.20.1


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

* Re: [PATCH] watchdog: i6300esb: stop printing kernel addresses
  2019-03-18  1:19 [PATCH] watchdog: i6300esb: stop printing kernel addresses Matteo Croce
@ 2019-03-18  2:53 ` Guenter Roeck
  2019-03-18 23:53   ` Matteo Croce
  0 siblings, 1 reply; 4+ messages in thread
From: Guenter Roeck @ 2019-03-18  2:53 UTC (permalink / raw)
  To: Matteo Croce, linux-watchdog; +Cc: Wim Van Sebroeck

On 3/17/19 6:19 PM, Matteo Croce wrote:
> 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").
> 
> Signed-off-by: Matteo Croce <mcroce@redhat.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>   drivers/watchdog/i6300esb.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/watchdog/i6300esb.c b/drivers/watchdog/i6300esb.c
> index 950c71a8bb22..e312a2aeecad 100644
> --- a/drivers/watchdog/i6300esb.c
> +++ b/drivers/watchdog/i6300esb.c
> @@ -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:
> 


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

* Re: [PATCH] watchdog: i6300esb: stop printing kernel addresses
  2019-03-18  2:53 ` Guenter Roeck
@ 2019-03-18 23:53   ` Matteo Croce
  2019-03-19  0:17     ` Guenter Roeck
  0 siblings, 1 reply; 4+ messages in thread
From: Matteo Croce @ 2019-03-18 23:53 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: linux-watchdog, Wim Van Sebroeck

On Mon, Mar 18, 2019 at 3:53 AM Guenter Roeck <linux@roeck-us.net> wrote:
>
> On 3/17/19 6:19 PM, Matteo Croce wrote:
> > 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").
> >
> > Signed-off-by: Matteo Croce <mcroce@redhat.com>
>
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
>
> > ---
> >   drivers/watchdog/i6300esb.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/watchdog/i6300esb.c b/drivers/watchdog/i6300esb.c
> > index 950c71a8bb22..e312a2aeecad 100644
> > --- a/drivers/watchdog/i6300esb.c
> > +++ b/drivers/watchdog/i6300esb.c
> > @@ -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:
> >
>

Nit: can someone add the fixes tag before merge?

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

Thanks,
-- 
Matteo Croce
per aspera ad upstream

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

* Re: [PATCH] watchdog: i6300esb: stop printing kernel addresses
  2019-03-18 23:53   ` Matteo Croce
@ 2019-03-19  0:17     ` Guenter Roeck
  0 siblings, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2019-03-19  0:17 UTC (permalink / raw)
  To: Matteo Croce; +Cc: linux-watchdog, Wim Van Sebroeck

On 3/18/19 4:53 PM, Matteo Croce wrote:
> On Mon, Mar 18, 2019 at 3:53 AM Guenter Roeck <linux@roeck-us.net> wrote:
>>
>> On 3/17/19 6:19 PM, Matteo Croce wrote:
>>> 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").
>>>
>>> Signed-off-by: Matteo Croce <mcroce@redhat.com>
>>
>> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
>>
>>> ---
>>>    drivers/watchdog/i6300esb.c | 4 ++--
>>>    1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/watchdog/i6300esb.c b/drivers/watchdog/i6300esb.c
>>> index 950c71a8bb22..e312a2aeecad 100644
>>> --- a/drivers/watchdog/i6300esb.c
>>> +++ b/drivers/watchdog/i6300esb.c
>>> @@ -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:
>>>
>>
> 
> 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



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

end of thread, other threads:[~2019-03-19  0:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-18  1:19 [PATCH] watchdog: i6300esb: stop printing kernel addresses Matteo Croce
2019-03-18  2:53 ` Guenter Roeck
2019-03-18 23:53   ` Matteo Croce
2019-03-19  0:17     ` Guenter Roeck

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