Skip to contentSkip to conversation

x86/realmode: don't leak kernel addresses

PATCH New Matteo Croce 2 participants 2 messages Mar 26, 2019 – Mar 27, 2019 x86

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 x86/realmode: don't leak kernel addresses

Since commit ad67b74d2469d9b8 ("printk: hash addresses printed with %p"), at boot "____ptrval____" is printed instead of the trampoline addresses:

    Base memory trampoline at [(____ptrval____)] 99000 size 24576

Remove the print as we don't want to leak kernel addresses.

Fixes ad67b74d2469d9b8 ("printk: hash addresses printed with %p")
---
 arch/x86/realmode/init.c | 2 --
 1 file changed, 2 deletions(-)
arch/x86/realmode/init.c +0 -2
index d10105825d57..47d097946872 100644
@@ -20,8 +20,6 @@ void __init set_real_mode_mem(phys_addr_t mem, size_t size)
 	void *base = __va(mem);
 
 	real_mode_header = (struct real_mode_header *) base;
-	printk(KERN_DEBUG "Base memory trampoline at [%p] %llx size %zu\n",
-	       base, (unsigned long long)mem, size);
 }
 
 void __init reserve_real_mode(void)
Signature · 1 line
2.20.1
#1 lore raw

[tip:x86/urgent] x86/realmode: Don't leak the trampoline kernel address

x86/realmode: Don't leak the trampoline kernel address
Commit-ID:  b929a500d68479163c48739d809cbf4c1335db6f
Gitweb:     https://git.kernel.org/tip/b929a500d68479163c48739d809cbf4c1335db6f
Author:     Matteo Croce <[email protected]>
AuthorDate: Tue, 26 Mar 2019 21:30:46 +0100
Committer:  Borislav Petkov <[email protected]>
CommitDate: Wed, 27 Mar 2019 14:22:08 +0100

x86/realmode: Don't leak the trampoline kernel address

Since commit

ad67b74d2469 ("printk: hash addresses printed with %p")

at boot "____ptrval____" is printed instead of the trampoline addresses:

Base memory trampoline at [(____ptrval____)] 99000 size 24576

Remove the print as we don't want to leak kernel addresses and this statement is not needed anymore.

Fixes ad67b74d2469d9b8 ("printk: hash addresses printed with %p")
Cc "H. Peter Anvin" <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc x86-ml <[email protected]>
---
 arch/x86/realmode/init.c | 2 --
 1 file changed, 2 deletions(-)
arch/x86/realmode/init.c +0 -2
index d10105825d57..47d097946872 100644
@@ -20,8 +20,6 @@ void __init set_real_mode_mem(phys_addr_t mem, size_t size)
 	void *base = __va(mem);
 
 	real_mode_header = (struct real_mode_header *) base;
-	printk(KERN_DEBUG "Base memory trampoline at [%p] %llx size %zu\n",
-	       base, (unsigned long long)mem, size);
 }
 
 void __init reserve_real_mode(void)