linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Xiaobing Luo <luoxiaobing0926@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/cma: change print format of pointer in pr_debug() With %p, the pointer will be hashed and print (____ptrval____) instead.
Date: Wed, 27 Dec 2023 09:56:38 +0000	[thread overview]
Message-ID: <ZYv01tdp6/igAkJN@casper.infradead.org> (raw)
In-Reply-To: <20231227061825.116177-1-luoxiaobing0926@gmail.com>

On Wed, Dec 27, 2023 at 06:18:25AM +0000, Xiaobing Luo wrote:
>  [    0.070467] cma: cma_alloc(cma (____ptrval____), count 256, align 8)
>  [    0.073003] cma: cma_alloc(): returned (____ptrval____)
> 
> Use 0x%px instead of %p to print the pointer. Then the print will be like:
> 
>  [    0.054963] cma: cma_alloc(cma 0xffffffde9ad42a60, count 256, align 8)
>  [    0.057385] cma: cma_alloc(): returned 0xfffffffe003b0000

Please explain why we should leak this information to userspace,
making it easy for an attacker?


      reply	other threads:[~2023-12-27  9:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-27  6:18 Xiaobing Luo
2023-12-27  9:56 ` Matthew Wilcox [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZYv01tdp6/igAkJN@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luoxiaobing0926@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox