lkml.org 
[lkml]   [2015]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86, boot: Allow 64bit EFI kernel to be loaded above 4G
On 02/18/15 at 11:47am, Yinghai Lu wrote:
> On Wed, Feb 18, 2015 at 3:29 AM, Baoquan He <bhe@redhat.com> wrote:
> > On 02/17/15 at 11:22pm, Yinghai Lu wrote:
> >> On Tue, Feb 10, 2015 at 10:11 PM, Baoquan He <bhe@redhat.com> wrote:
> > I am sorry I didn't get what you mean. I have tried to set another ident
> > mapping for new range and it is successful seeing from debug message
> > printing. However it always reboot because of GPF. That's why I made
> > that small debug patch which add another 4G ident mapping and hardcoded
> > to put kernel between 4G and 8G.
> >
> > Could you say more of it? Or which direction should I go?
>
> I would suggest:
> leave physical address random handling to bootloader, as bootloader always
> need to set ident mapping to cover kernel/bootparam/cmdline.
>
> For virtual address random handling it should go kasl in kernel.

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

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.

In normal kernel it jump from 32bit to 64bit and enter into 64bit mode
of long mode. I am wondering why it will cause a GPF when kernel is put
above 4G. Adding a IDT and #PF handler to solve the ident page mapping
on demand has been done now, I am blocked by the GPF now, otherwise I can
post it very soon for testing.

Thanks
Baoquan
>
> Thanks
>
> Yinghai


\
 
 \ /
  Last update: 2015-02-20 03:41    [W:0.097 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site