[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <276b9343-c23d-ac15-bb73-d7b42e7e7f0f@acm.org>
Date: Wed, 22 Sep 2021 11:05:42 -0700
From: Bart Van Assche <bvanassche@....org>
To: "Marciniszyn, Mike" <mike.marciniszyn@...nelisnetworks.com>,
Guo Zhi <qtxuning1999@...u.edu.cn>,
"Dalessandro, Dennis" <dennis.dalessandro@...nelisnetworks.com>,
"dledford@...hat.com" <dledford@...hat.com>
Cc: "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] infiniband hfi1: fix misuse of %x in ipoib_tx.c
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@...u.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?
Pointer hashing is useful on production systems but not on development
systems.
Thanks,
Bart.
Powered by blists - more mailing lists