]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/5.0.10/percpu-stop-printing-kernel-addresses.patch
fix up queue-5.15/mm-fix-race-between-__split_huge_pmd_locked-and-gup-.patch
[thirdparty/kernel/stable-queue.git] / releases / 5.0.10 / percpu-stop-printing-kernel-addresses.patch
1 From 00206a69ee32f03e6f40837684dcbe475ea02266 Mon Sep 17 00:00:00 2001
2 From: Matteo Croce <mcroce@redhat.com>
3 Date: Mon, 18 Mar 2019 02:32:36 +0100
4 Subject: percpu: stop printing kernel addresses
5
6 From: Matteo Croce <mcroce@redhat.com>
7
8 commit 00206a69ee32f03e6f40837684dcbe475ea02266 upstream.
9
10 Since commit ad67b74d2469d9b8 ("printk: hash addresses printed with %p"),
11 at boot "____ptrval____" is printed instead of actual addresses:
12
13 percpu: Embedded 38 pages/cpu @(____ptrval____) s124376 r0 d31272 u524288
14
15 Instead of changing the print to "%px", and leaking kernel addresses,
16 just remove the print completely, cfr. e.g. commit 071929dbdd865f77
17 ("arm64: Stop printing the virtual memory layout").
18
19 Signed-off-by: Matteo Croce <mcroce@redhat.com>
20 Signed-off-by: Dennis Zhou <dennis@kernel.org>
21 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22
23 ---
24 mm/percpu.c | 8 ++++----
25 1 file changed, 4 insertions(+), 4 deletions(-)
26
27 --- a/mm/percpu.c
28 +++ b/mm/percpu.c
29 @@ -2531,8 +2531,8 @@ int __init pcpu_embed_first_chunk(size_t
30 ai->groups[group].base_offset = areas[group] - base;
31 }
32
33 - pr_info("Embedded %zu pages/cpu @%p s%zu r%zu d%zu u%zu\n",
34 - PFN_DOWN(size_sum), base, ai->static_size, ai->reserved_size,
35 + pr_info("Embedded %zu pages/cpu s%zu r%zu d%zu u%zu\n",
36 + PFN_DOWN(size_sum), ai->static_size, ai->reserved_size,
37 ai->dyn_size, ai->unit_size);
38
39 rc = pcpu_setup_first_chunk(ai, base);
40 @@ -2653,8 +2653,8 @@ int __init pcpu_page_first_chunk(size_t
41 }
42
43 /* we're ready, commit */
44 - pr_info("%d %s pages/cpu @%p s%zu r%zu d%zu\n",
45 - unit_pages, psize_str, vm.addr, ai->static_size,
46 + pr_info("%d %s pages/cpu s%zu r%zu d%zu\n",
47 + unit_pages, psize_str, ai->static_size,
48 ai->reserved_size, ai->dyn_size);
49
50 rc = pcpu_setup_first_chunk(ai, vm.addr);