From: joe@perches.com (Joe Perches)
To: linux-riscv@lists.infradead.org
Subject: [PATCH V2] riscv: Convert uses of REG_FMT to %p
Date: Sun, 29 Jul 2018 09:31:52 -0700 [thread overview]
Message-ID: <fe87537776a8a22676536babd2a8eba3c8667705.camel@perches.com> (raw)
In-Reply-To: <CAHp75VcvdAVWCuUpj+aQeD5aEU1LM1SjOPJ7_1hdQnQiya36SA@mail.gmail.com>
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?
next prev parent reply other threads:[~2018-07-29 16:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-28 16:39 [PATCH V2] riscv: Convert uses of REG_FMT to %p Joe Perches
2018-07-29 14:21 ` Andy Shevchenko
2018-07-29 16:31 ` Joe Perches [this message]
2018-08-16 8:48 ` Petr Mladek
2018-08-07 14:18 ` Petr Mladek
2018-08-07 15:12 ` Kees Cook
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=fe87537776a8a22676536babd2a8eba3c8667705.camel@perches.com \
--to=joe@perches.com \
--cc=linux-riscv@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox