lkml.org 
[lkml]   [2016]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] x86/head_64.S: remove redundant check that kernel address is 2M aligned
Hello Brian,

On 01-22-16, Brian Gerst wrote:
> >
> > - /* Is the address not 2M aligned? */
> > - movq %rbp, %rax
> > - andl $~PMD_PAGE_MASK, %eax
> > - testl %eax, %eax
> > - jnz bad_address
> > -
> > /*
> > * Is the address too large?
> > */
>
> I think we still need to do the check, in case we came from a 64-bit
> bootloader that directly jumped to startup_64. However, this check
> can be simplified to:
>
> testl $~PMD_PAGE_MASK, %ebp
> jnz bad_address

Ah, ok, in this way we can't trust a bootloader. I just thought that
64-bit entry point is startup_64 from arch/x86/boot/compressed/head_64.S

Thank you.

\
 
 \ /
  Last update: 2016-01-23 08:21    [W:0.216 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site