From: Borislav Petkov <bp@alien8.de>
To: Matteo Croce <mcroce@redhat.com>
Cc: x86@kernel.org, "H . Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] x86/realmode: don't leak kernel addresses
Date: Tue, 26 Mar 2019 17:15:29 +0100 [thread overview]
Message-ID: <20190326161457.GN1867@zn.tnic> (raw)
In-Reply-To: <20190324190504.29906-1-mcroce@redhat.com>
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.
next parent reply other threads:[~2019-03-26 16:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190324190504.29906-1-mcroce@redhat.com>
2019-03-26 16:15 ` Borislav Petkov [this message]
2019-03-26 20:36 ` Matteo Croce
2019-03-27 9:05 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190326161457.GN1867@zn.tnic \
--to=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mcroce@redhat.com \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®