Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1315526
| From | Alexander Kuleshov <kuleshovmail@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH] x86/head_64.S: remove redundant check that kernel address is 2M aligned |
| Date | 2016-01-23 07:50 +0100 |
| Message-ID | <qU0bf-7h2-3@gated-at.bofh.it> (permalink) |
| References | <qTOtr-7NF-13@gated-at.bofh.it> <qTVuV-3XO-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[RFC PATCH] x86/head_64.S: remove redundant check that kernel address is 2M aligned Alexander Kuleshov <kuleshovmail@gmail.com> - 2016-01-22 19:20 +0100
Re: [RFC PATCH] x86/head_64.S: remove redundant check that kernel address is 2M aligned Brian Gerst <brgerst@gmail.com> - 2016-01-23 02:50 +0100
Re: [RFC PATCH] x86/head_64.S: remove redundant check that kernel address is 2M aligned Alexander Kuleshov <kuleshovmail@gmail.com> - 2016-01-23 07:50 +0100
csiph-web