lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 23 Sep 2021 20:51:37 +0800 (CST)
From:   郭志 <>
To:     Mike Marciniszyn <>
Cc:     Dennis Dalessandro <>,
        dledford <>,
        linux-rdma <>,
        linux-kernel <>
Subject: Re: [PATCH] infiniband hfi1: fix misuse of %x in ipoib_tx.c

I have tried using %px rather than %p. However when checking the new patch through scripts/, there is a warning: Using vsprintf specifier '%px' potentially exposes the kernel memory layout. 

Maybe %pK is the right one?



----- Original Message -----
From: "Mike Marciniszyn" <>
To: "Guo Zhi" <>, "Dennis Dalessandro" <>, "dledford" <>
Cc: "linux-rdma" <>, "linux-kernel" <>
Sent: Thursday, September 23, 2021 1:51:08 AM
Subject: RE: [PATCH] infiniband hfi1: fix misuse of %x in ipoib_tx.c

> 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 <>

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.


Powered by blists - more mailing lists