[PATCH 1/2] coresight: Use %px to print pcsr instead of %p

Mathieu Poirier mathieu.poirier at linaro.org
Fri Apr 6 08:47:31 PDT 2018


On 5 April 2018 at 00:26, Kees Cook <keescook at chromium.org> wrote:
> On Tue, Mar 13, 2018 at 10:24 AM, Mathieu Poirier
> <mathieu.poirier at linaro.org> wrote:
>> From: Leo Yan <leo.yan at 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



More information about the linux-arm-kernel mailing list