Skip to content

Commit

Permalink
percpu: stop printing kernel addresses
Browse files Browse the repository at this point in the history
Since commit ad67b74 ("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 071929d
("arm64: Stop printing the virtual memory layout").

Signed-off-by: Matteo Croce <[email protected]>
Signed-off-by: Dennis Zhou <[email protected]>
  • Loading branch information
teknoraver authored and dennisszhou committed Mar 18, 2019
1 parent 9e98c67 commit 00206a6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mm/percpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 00206a6

Please sign in to comment.