lkml.org 
[lkml]   [2015]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] x86, kaslr: Access the correct kaslr_enabled variable
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



\
 
 \ /
  Last update: 2015-03-16 06:21    [W:0.043 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site