From: Dennis Zhou <dennis@kernel.org>
To: Matteo Croce <mcroce@redhat.com>
Cc: linux-mm@kvack.org, Dennis Zhou <dennis@kernel.org>,
Tejun Heo <tj@kernel.org>, Christoph Lameter <cl@linux.com>
Subject: Re: [PATCH] percpu: stop printing kernel addresses
Date: Mon, 18 Mar 2019 13:40:04 -0400 [thread overview]
Message-ID: <20190318174004.GA60491@dennisz-mbp.dhcp.thefacebook.com> (raw)
In-Reply-To: <20190318013236.31755-1-mcroce@redhat.com>
Hi Matteo,
On Mon, Mar 18, 2019 at 02:32:36AM +0100, Matteo Croce wrote:
> Since commit ad67b74d2469d9b8 ("printk: hash addresses printed with %p"),
> at boot "____ptrval____" is printed instead of actual addresses:
>
> percpu: Embedded 38 pages/cpu @(____ptrval____) s124376 r0 d31272 u524288
>
> Instead of changing the print to "%px", and leaking kernel addresses,
> just remove the print completely, cfr. e.g. commit 071929dbdd865f77
> ("arm64: Stop printing the virtual memory layout").
>
> Signed-off-by: Matteo Croce <mcroce@redhat.com>
> ---
> mm/percpu.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/mm/percpu.c b/mm/percpu.c
> index 2e6fc8d552c9..68dd2e7e73b5 100644
> --- a/mm/percpu.c
> +++ b/mm/percpu.c
> @@ -2567,8 +2567,8 @@ int __init pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size,
> ai->groups[group].base_offset = areas[group] - base;
> }
>
> - pr_info("Embedded %zu pages/cpu @%p s%zu r%zu d%zu u%zu\n",
> - PFN_DOWN(size_sum), base, ai->static_size, ai->reserved_size,
> + pr_info("Embedded %zu pages/cpu s%zu r%zu d%zu u%zu\n",
> + PFN_DOWN(size_sum), ai->static_size, ai->reserved_size,
> ai->dyn_size, ai->unit_size);
>
> rc = pcpu_setup_first_chunk(ai, base);
> @@ -2692,8 +2692,8 @@ int __init pcpu_page_first_chunk(size_t reserved_size,
> }
>
> /* we're ready, commit */
> - pr_info("%d %s pages/cpu @%p s%zu r%zu d%zu\n",
> - unit_pages, psize_str, vm.addr, ai->static_size,
> + pr_info("%d %s pages/cpu s%zu r%zu d%zu\n",
> + unit_pages, psize_str, ai->static_size,
> ai->reserved_size, ai->dyn_size);
>
> rc = pcpu_setup_first_chunk(ai, vm.addr);
> --
> 2.20.1
>
I've applied this to for-5.1-fixes.
Thanks,
Dennis
prev parent reply other threads:[~2019-03-18 17:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-18 1:32 Matteo Croce
2019-03-18 17:40 ` Dennis Zhou [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=20190318174004.GA60491@dennisz-mbp.dhcp.thefacebook.com \
--to=dennis@kernel.org \
--cc=cl@linux.com \
--cc=linux-mm@kvack.org \
--cc=mcroce@redhat.com \
--cc=tj@kernel.org \
/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