All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Kuleshov <kuleshovmail@gmail.com>
To: Brian Gerst <brgerst@gmail.com>
Cc: Alexander Kuleshov <kuleshovmail@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H . Peter Anvin" <hpa@zytor.com>,
	Andy Lutomirski <luto@kernel.org>, Borislav Petkov <bp@suse.de>,
	Denys Vlasenko <dvlasenk@redhat.com>,
	Andrey Ryabinin <ryabinin.a.a@gmail.com>,
	the arch/x86 maintainers <x86@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH] x86/head_64.S: remove redundant check that kernel address is 2M aligned
Date: Sat, 23 Jan 2016 12:37:56 +0600	[thread overview]
Message-ID: <20160123063756.GB1205@localhost> (raw)
In-Reply-To: <CAMzpN2gR2dpyDU1RDKtq0oeOqcFuJiVtMkN9TkZSUGQrsjGEJQ@mail.gmail.com>

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.

      reply	other threads:[~2016-01-23  6:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-22 18:13 [RFC PATCH] x86/head_64.S: remove redundant check that kernel address is 2M aligned Alexander Kuleshov
2016-01-23  1:42 ` Brian Gerst
2016-01-23  6:37   ` Alexander Kuleshov [this message]

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=20160123063756.GB1205@localhost \
    --to=kuleshovmail@gmail.com \
    --cc=bp@suse.de \
    --cc=brgerst@gmail.com \
    --cc=dvlasenk@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=ryabinin.a.a@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.