From: mathieu.poirier@linaro.org (Mathieu Poirier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] coresight: Use %px to print pcsr instead of %p
Date: Fri, 6 Apr 2018 09:47:31 -0600 [thread overview]
Message-ID: <CANLsYkwseQo1+PfTuhkgvx=AyLs3dL+zkSxwbkuu9JhLwTDqHQ@mail.gmail.com> (raw)
In-Reply-To: <CAGXu5jJKG1Qo4r537uER3_i-kkZvq2BKfXM0pGTb+jZ1JfZT_w@mail.gmail.com>
On 5 April 2018 at 00:26, Kees Cook <keescook@chromium.org> wrote:
> On Tue, Mar 13, 2018 at 10:24 AM, Mathieu Poirier
> <mathieu.poirier@linaro.org> wrote:
>> From: Leo Yan <leo.yan@linaro.org>
>>
>> Commit ad67b74d2469 ("printk: hash addresses printed with %p") lets
>> printk specifier %p to hash all addresses before printing, this was
>> resulting in the high 32 bits of pcsr can only output zeros. So
>> module cannot completely print pc value and it's pointless for debugging
>> purpose.
>>
>> This patch fixes this by using %px to print pcsr instead.
>
> Why is %p (and now %px) needed here at all? %pS is already used, which
> should give useful debugging details, yes?
Hey Leo,
I've taken a second look at this and Kees has a point, %pS should be
sufficient here. Please test again and see if %px is absolutely
necessary. If you think that is the case please provide a snapshot of
the corner case that makes the change mandatory.
>
> -Kees
>
> --
> Kees Cook
> Pixel Security
next prev parent reply other threads:[~2018-04-06 15:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-13 17:24 [PATCH 0/2] coresight: next v4.16-rc5 Mathieu Poirier
2018-03-13 17:24 ` [PATCH 1/2] coresight: Use %px to print pcsr instead of %p Mathieu Poirier
2018-04-05 6:26 ` Kees Cook
2018-04-06 15:47 ` Mathieu Poirier [this message]
2018-04-09 16:10 ` Leo Yan
2018-04-09 17:54 ` Kees Cook
2018-04-09 23:44 ` Leo Yan
2018-03-13 17:24 ` [PATCH 2/2] coresight: etm4x: Fix bit shifting Mathieu Poirier
2018-03-14 16:59 ` [PATCH 0/2] coresight: next v4.16-rc5 Greg KH
2018-03-15 14:41 ` Mathieu Poirier
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='CANLsYkwseQo1+PfTuhkgvx=AyLs3dL+zkSxwbkuu9JhLwTDqHQ@mail.gmail.com' \
--to=mathieu.poirier@linaro.org \
--cc=linux-arm-kernel@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;
as well as URLs for NNTP newsgroup(s).