From: Baoquan He <bhe@redhat.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>,
Kees Cook <keescook@chromium.org>, Borislav Petkov <bp@suse.de>,
Thomas Gleixner <tglx@linutronix.de>,
Jiri Kosina <jkosina@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Matt Fleming <matt.fleming@intel.com>
Subject: Re: [PATCH v4] x86, kaslr: Access the correct kaslr_enabled variable
Date: Mon, 16 Mar 2015 13:11:52 +0800 [thread overview]
Message-ID: <20150316051152.GE26587@dhcp-16-105.nay.redhat.com> (raw)
In-Reply-To: <CAE9FiQWdBP5z5ADUTdoyVAnoUer9JaODbn5tsYj2Y+jUUaNoBg@mail.gmail.com>
On 03/15/15 at 09:36pm, Yinghai Lu wrote:
> On Sun, Mar 15, 2015 at 8:28 PM, Baoquan He <bhe@redhat.com> wrote:
> > On 03/15/15 at 12:49am, Yinghai Lu wrote:
> > It's good to check the ret value as Boris suggested. However it could
> > fail since early_memremap self fail, e.g slot not found. In this case
> > making kaslr_enabled true may not be good.
> >
> > As Minfei talked with you kaslr_setup_data is a global variable inside
> > kernel code, it has been ident mapped. Just derefencing the physical
> > address which is virtual address too and getting the real stored value
> > may be safer. And also parse_kaslr_setup is a function specified to
> > handle kaslr, it doesn't make me uncomfortable to implement with a
> > specific knowledge which here means the setup_data is a global varialbe
> > in kernel code and no need to do early_memremap since mapping has been
> > built .
>
> I should not put that checking in. even parse_setup_data does not check
> early_memmap return.
Yes, I think so. Otherwise it involves incorrect handling.
Still I think no need to do early_memremap. Because kaslr_setup_data is
ident mapped, it's not like other setup_data info which is passed in
from bootloader. But I am fine too if only do early_memremap
without checking.
Thanks
Baoquan
next prev parent reply other threads:[~2015-03-16 5:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-15 7:49 Yinghai Lu
2015-03-15 12:18 ` Minfei Huang
2015-03-15 17:02 ` Yinghai Lu
2015-03-16 3:08 ` Minfei Huang
2015-03-16 3:28 ` Baoquan He
2015-03-16 4:36 ` Yinghai Lu
2015-03-16 5:11 ` Baoquan He [this message]
2015-03-16 5:04 ` Yinghai Lu
2015-03-16 5:19 ` Baoquan He
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=20150316051152.GE26587@dhcp-16-105.nay.redhat.com \
--to=bhe@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=bp@suse.de \
--cc=hpa@zytor.com \
--cc=jkosina@suse.cz \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt.fleming@intel.com \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=yinghai@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®