x86/realmode: don't leak kernel addresses
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 19 lines · Matteo Croce
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 24576Remove the address from the print as we don't want to leak kernel addresses.
Fixes ad67b74d2469d9b8 ("printk: hash addresses printed with %p")Signed-off-by Matteo Croce <[email protected]>--- arch/x86/realmode/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/x86/realmode/init.c +0
-0
arch/x86/realmode/init.c void __init set_real_mode_mem(phys_addr_t mem, size_t size) · line 24
Quoted 7 lines
arch/x86/realmode/init.c +2
-2@@ -20,8 +20,8 @@ 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); +printk (KERN_DEBUG "Base memory trampoline at %llx size %zu\n" , + (unsigned long long )mem, size);
In case this wasn't clear, please remove the whole printk. And don't forget to CC lkml on your submissions. CCed now.
Signature · 4 lines
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.Quoted 32 lines · Borislav Petkov
Quoted 19 lines · Matteo Croce
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 24576Remove the address from the print as we don't want to leak kernel addresses.
Fixes ad67b74d2469d9b8 ("printk: hash addresses printed with %p")Signed-off-by Matteo Croce <[email protected]>--- arch/x86/realmode/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/x86/realmode/init.c +0
-0arch/x86/realmode/init.c void __init set_real_mode_mem(phys_addr_t mem, size_t size) · line 24
Quoted 7 lines
arch/x86/realmode/init.c +2
-2@@ -20,8 +20,8 @@ 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); +printk (KERN_DEBUG "Base memory trampoline at %llx size %zu\n" , + (unsigned long long )mem, size);In case this wasn't clear, please remove the whole printk. And don't forget to CC lkml on your submissions. CCed now.
Quoted 5 lines
--
Regards/Gruss,
Boris.Good mailing practices for 400: avoid top-posting and trim the reply.
Got it, sent a v3 with the printk removed.
Anyway, I wonder if we can remove the 'size' argument and/or moving set_real_mode_mem() into realmode.h to have it inlined. Or maybe it's not worth it.
Regards,
Signature · 2 lines
Matteo Croce per aspera ad upstream
Quoted 4 lines · Matteo Croce
Got it, sent a v3 with the printk removed.
Anyway, I wonder if we can remove the 'size' argument and/or movingset_real_mode_mem()intorealmode.hto have it inlined. Or maybe it's not worth it.
Sure, why not. Making the code simpler is always a GoodThing(tm). :)
Signature · 4 lines
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.