lkml.org 
[lkml]   [2021]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] infiniband hfi1: fix misuse of %x in ipoib_tx.c
On Wed, Sep 22, 2021 at 11:05:42AM -0700, Bart Van Assche wrote:
> On 9/22/21 10:51 AM, Marciniszyn, Mike wrote:
> > > Subject: [PATCH] infiniband hfi1: fix misuse of %x in ipoib_tx.c
> > >
> > > Pointers should be printed with %p or %px rather than cast to (unsigned long
> > > long) and printed with %llx.
> > > Change %llx to %p to print the pointer.
> > >
> > > Signed-off-by: Guo Zhi <qtxuning1999@sjtu.edu.cn>
> >
> > The unsigned long long was originally used to insure the entire accurate pointer as emitted.
> >
> > This is to ensure the pointers in prints and event traces match values in stacks and register dumps.
> >
> > I think the %p will obfuscate the pointer so %px is correct for our use case.
>
> How about applying Guo's patch and adding a configuration option to the
> kernel for disabling pointer hashing for %p and related format specifiers?

Isn't kptr_restrict sysctl is for that?

> Pointer hashing is useful on production systems but not on development
> systems.
>
> Thanks,
>
> Bart.
>

\
 
 \ /
  Last update: 2021-09-23 08:46    [W:0.112 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site