lkml.org 
[lkml]   [2022]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next] net: use the %px format to display sock
Hi Jason,

On Thu, May 05, 2022 at 09:08:26PM +0800, kerneljasonxing@gmail.com wrote:
> - pr_err("Attempt to release TCP socket in state %d %p\n",
> + pr_err("Attempt to release TCP socket in state %d %px\n",

I think we cannot use %px here for security reasons? checkpatch is also
warning about it:

WARNING: Using vsprintf specifier '%px' potentially exposes the kernel memory layout, if you don't really need the address please consider using '%p'.
#21: FILE: net/ipv4/af_inet.c:142:
+ pr_err("Attempt to release TCP socket in state %d %px\n",
sk->sk_state, sk);

Thanks,
Peilin Ye

\
 
 \ /
  Last update: 2022-05-06 20:57    [W:0.065 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site