* Re: [PATCH v2] x86/realmode: don't leak kernel addresses [not found] <20190324190504.29906-1-mcroce@redhat.com> @ 2019-03-26 16:15 ` Borislav Petkov 2019-03-26 20:36 ` Matteo Croce 0 siblings, 1 reply; 3+ messages in thread From: Borislav Petkov @ 2019-03-26 16:15 UTC (permalink / raw) To: Matteo Croce; +Cc: x86, H . Peter Anvin, Thomas Gleixner, Ingo Molnar, lkml On Sun, Mar 24, 2019 at 08:05:04PM +0100, Matteo Croce wrote: > 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 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 <mcroce@redhat.com> > --- > arch/x86/realmode/init.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/realmode/init.c b/arch/x86/realmode/init.c > index d10105825d57..d76a1380ec37 100644 > --- a/arch/x86/realmode/init.c > +++ b/arch/x86/realmode/init.c > @@ -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. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] x86/realmode: don't leak kernel addresses 2019-03-26 16:15 ` [PATCH v2] x86/realmode: don't leak kernel addresses Borislav Petkov @ 2019-03-26 20:36 ` Matteo Croce 2019-03-27 9:05 ` Borislav Petkov 0 siblings, 1 reply; 3+ messages in thread From: Matteo Croce @ 2019-03-26 20:36 UTC (permalink / raw) To: Borislav Petkov; +Cc: x86, H . Peter Anvin, Thomas Gleixner, Ingo Molnar, lkml On Tue, Mar 26, 2019 at 5:15 PM Borislav Petkov <bp@alien8.de> wrote: > > On Sun, Mar 24, 2019 at 08:05:04PM +0100, Matteo Croce wrote: > > 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 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 <mcroce@redhat.com> > > --- > > arch/x86/realmode/init.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/arch/x86/realmode/init.c b/arch/x86/realmode/init.c > > index d10105825d57..d76a1380ec37 100644 > > --- a/arch/x86/realmode/init.c > > +++ b/arch/x86/realmode/init.c > > @@ -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. > > -- > 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, -- Matteo Croce per aspera ad upstream ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] x86/realmode: don't leak kernel addresses 2019-03-26 20:36 ` Matteo Croce @ 2019-03-27 9:05 ` Borislav Petkov 0 siblings, 0 replies; 3+ messages in thread From: Borislav Petkov @ 2019-03-27 9:05 UTC (permalink / raw) To: Matteo Croce; +Cc: x86, H . Peter Anvin, Thomas Gleixner, Ingo Molnar, lkml On Tue, Mar 26, 2019 at 09:36:48PM +0100, Matteo Croce wrote: > 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. Sure, why not. Making the code simpler is always a GoodThing(tm). :) -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-27 9:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20190324190504.29906-1-mcroce@redhat.com>
2019-03-26 16:15 ` [PATCH v2] x86/realmode: don't leak kernel addresses Borislav Petkov
2019-03-26 20:36 ` Matteo Croce
2019-03-27 9:05 ` Borislav Petkov
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®