From: Baoquan He <bhe@redhat.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86, boot: Allow 64bit EFI kernel to be loaded above 4G
Date: Fri, 20 Feb 2015 17:28:59 +0800 [thread overview]
Message-ID: <20150220092859.GA1572@dhcp-17-102.nay.redhat.com> (raw)
In-Reply-To: <CAE9FiQVuT=6bDJujEK_A4CepDOq2T0bcesgiUqGh53L0aZ3xDA@mail.gmail.com>
On 02/19/15 at 07:35pm, Yinghai Lu wrote:
> On Thu, Feb 19, 2015 at 6:13 PM, Baoquan He <bhe@redhat.com> wrote:
> > On 02/18/15 at 11:47am, Yinghai Lu wrote:
> >
> > Kaslr need both virtual and physical address be randomized, otherwise
> > it doesn't make sense. Please check what hpa said about this issue:
> >
> > https://lkml.org/lkml/2014/10/13/350
> >
>
> If I read correctly, it could be separated. phy one could be on bootloader
> and virtual could be in kernel.
I think people want physical address randomization too. This is
what Vivek replied to hpa's comment:
https://lkml.org/lkml/2014/10/13/377
And after I posted the patchset handling randomization of virtual and
physical address separately, Kees Cook also think it makes sense:
http://www.gossamer-threads.com/lists/linux/kernel/2090014
>
> > And usually no bootloader often load kernel onto a random physical
> > address. Fow now we can often see kexec/kdump did this. I believe Kees
> > introduced kaslr to mainly solve security issue of normal kernel which
> > is not like kexec/kdump for testing or debugging. Randomizing physical
> > address makes sense for kaslr feature.
>
> I put some grub2 patches that extend grub2 to load kernel/initrd above
> 4G into github tree.
>
> https://github.com/yhlu/grub2.git
>
> main purpose for that feature is to handle initrd that bigger than 4G.
>
> or you can try you solution on system that have 64bit EFI support,
> then you will don't need to
> worry about set ident mapping even.
Actually kexec is a bootloader which can put kernel at any address. This
is done in user space program kexec-tools. However kexec-tools make
kernel jump from 64bit into 64bit directly, and has built ident mapping
of whole physical memory. I have tried this and it works. kexec is
mainly used for kernel developer, kaslr is meaningless for kexec.
However kaslr focus on normal kernel, and jump from 32bit to 64bit mode.
I can't figure out a way to work around this.
Now I just want to figure out what register setting cause GPF when
reload kernel above 4G in this jumping from 32bit to 64bit way.
>
> Thanks
>
> Yinghai
next prev parent reply other threads:[~2015-02-20 9:29 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-04 2:03 Yinghai Lu
2015-02-05 3:25 ` Dave Young
2015-02-05 5:25 ` Yinghai Lu
2015-02-05 6:09 ` Dave Young
2015-02-18 7:29 ` Yinghai Lu
2015-02-09 18:27 ` Matt Fleming
2015-02-09 20:23 ` Yinghai Lu
2015-02-11 15:55 ` Matt Fleming
2015-02-11 16:29 ` Peter Jones
2015-02-12 14:59 ` Matt Fleming
2015-02-11 6:11 ` Baoquan He
2015-02-18 7:22 ` Yinghai Lu
2015-02-18 11:29 ` Baoquan He
2015-02-18 19:47 ` Yinghai Lu
2015-02-20 2:13 ` Baoquan He
2015-02-20 3:35 ` Yinghai Lu
2015-02-20 9:28 ` Baoquan He [this message]
2015-02-20 23:53 ` Yinghai Lu
2015-02-21 2:49 ` Baoquan He
2015-02-21 20:00 ` Yinghai Lu
2015-02-22 13:18 ` 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=20150220092859.GA1572@dhcp-17-102.nay.redhat.com \
--to=bhe@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.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®