lkml.org 
[lkml]   [2018]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH V2] riscv: Convert uses of REG_FMT to %p
From
Date
On Sun, 2018-07-29 at 17:21 +0300, Andy Shevchenko wrote:
> On Sat, Jul 28, 2018 at 7:39 PM, Joe Perches <joe@perches.com> wrote:
> > Use %p pointer output instead of REG_FMT and cast the unsigned longs to
> > (void *) to avoid exposing kernel addresses.
> >
> > Miscellanea:
> >
> > o Convert pr_cont to printk(KERN_DEFAULT as these uses are
> > new logging lines and not previous line continuations
> > o Remove the now unused REG_FMT defines
> > + pr_alert("Unable to handle kernel %s at virtual address %p\n",
> > + (addr < PAGE_SIZE) ? "NULL pointer dereference" :
> > + "paging request", (void *)addr);
>
> Hmm... This is what printf() should take care of.

Why is that so here?

Here this is just a description of the address.
It's not actually dereferencing the address.

> Petr, what is the status of your series to unify this kind of
> addresses to be printed?

\
 
 \ /
  Last update: 2018-07-29 18:32    [W:0.071 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site