Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mm/page_alloc: Remove kernel address exposure in free_reserved_area()
Linus suggested we try to remove some of the low-hanging fruit related to kernel address exposure in dmesg. The only leaks I see on my local system are: Freeing SMP alternatives memory: 32K (ffffffff9e309000 - ffffffff9e311000) Freeing initrd memory: 10588K (ffffa0b736b42000 - ffffa0b737599000) Freeing unused kernel memory: 3592K (ffffffff9df87000 - ffffffff9e309000) Freeing unused kernel memory: 1352K (ffffa0b7288ae000 - ffffa0b728a00000) Freeing unused kernel memory: 632K (ffffa0b728d62000 - ffffa0b728e00000) Linus says: "I suspect we should just remove [the addresses in the 'Freeing' messages]. I'm sure they are useful in theory, but I suspect they were more useful back when the whole "free init memory" was originally done. These days, if we have a use-after-free, I suspect the init-mem situation is the easiest situation by far. Compared to all the dynamic allocations which are much more likely to show it anyway. So having debug output for that case is likely not all that productive." With this patch the freeing messages now look like this: Freeing SMP alternatives memory: 32K Freeing initrd memory: 10588K Freeing unused kernel memory: 3592K Freeing unused kernel memory: 1352K Freeing unused kernel memory: 632K Suggested-by: Linus Torvalds <firstname.lastname@example.org> Signed-off-by: Josh Poimboeuf <email@example.com> Cc: Andy Lutomirski <firstname.lastname@example.org> Cc: Borislav Petkov <email@example.com> Cc: Brian Gerst <firstname.lastname@example.org> Cc: Denys Vlasenko <email@example.com> Cc: H. Peter Anvin <firstname.lastname@example.org> Cc: Peter Zijlstra <email@example.com> Cc: Thomas Gleixner <firstname.lastname@example.org> Cc: email@example.com Link: http://firstname.lastname@example.org Signed-off-by: Ingo Molnar <email@example.com>
- Loading branch information
Showing with 2 additions and 2 deletions.
- +2 −2 mm/page_alloc.c