All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 1/3] x86/EFI: don't apply relocations to l{2, 3}_bootmap
Date: Fri, 19 Aug 2016 06:05:50 -0600	[thread overview]
Message-ID: <57B7123E0200007800107622@prv-mh.provo.novell.com> (raw)
In-Reply-To: <8713cae2-512a-cca3-b9ef-43e863fe5b89@citrix.com>

>>> On 19.08.16 at 12:34, <andrew.cooper3@citrix.com> wrote:
> On 19/08/16 08:50, Jan Beulich wrote:
>> Other than claimed in commit 2ce5963727's ("x86: construct the
>> {l2,l3}_bootmap at compile time") the initialization of the two page
>> tables doesn't take care of everything without furher adjustment: The
>> compile time initialization obviously requires base relocations, and
>> those get processed after efi_arch_memory_setup(). Hence without
>> additional care the correctly initialized values may then get wrongly
>> "adjusted" again. Except the two table from being subject to base
>> relocation.
> 
> Do you mean Exempt? "Except the two tables" doesn't parse.

Hmm, my dictionary tells me that "except" can be used as a verb,
and it also tells me that I rather don't mean "exempt".

>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>>
>> --- a/xen/arch/x86/efi/efi-boot.h
>> +++ b/xen/arch/x86/efi/efi-boot.h
>> @@ -47,11 +47,23 @@ static void __init efi_arch_relocate_ima
>>  
>>      for ( base_relocs = __base_relocs_start; base_relocs < __base_relocs_end; )
>>      {
>> -        unsigned int i, n;
>> +        unsigned int i = 0, n;
>>  
>>          n = (base_relocs->size - sizeof(*base_relocs)) /
>>              sizeof(*base_relocs->entries);
>> -        for ( i = 0; i < n; ++i )
>> +
>> +        /*
>> +         * Relevant l{2,3}_bootmap entries get initialized explicitly in
>> +         * efi_arch_memory_setup(), so we must not apply relocations there.
>> +         * l2_identmap's first slot, otoh, should be handled normally, as
> 
> And l3 surely?

Generally yes, but the comment refers to efi_arch_memory_setup(),
which only touches l2_identmap[]. I.e. I'm trying to answer the
reasonably to raise question why it doesn't need special casing here
despite that function touching it.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2016-08-19 12:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-19  7:39 [PATCH 0/3] x86/EFI: boot adjustments Jan Beulich
2016-08-19  7:50 ` [PATCH 1/3] x86/EFI: don't apply relocations to l{2, 3}_bootmap Jan Beulich
2016-08-19 10:34   ` Andrew Cooper
2016-08-19 12:05     ` Jan Beulich [this message]
2016-08-19  7:51 ` [PATCH 2/3] x86/EFI: be cautious about being handed control with CR4.PGE enabled Jan Beulich
2016-08-19 12:26   ` Andrew Cooper
2016-08-19  7:52 ` [PATCH 3/3] x86/EFI: don't accept 64-bit base relocations on page tables Jan Beulich
2016-08-19 12:39   ` Andrew Cooper
2016-08-19 12:57     ` Jan Beulich
2016-08-30 16:35       ` Andrew Cooper
2016-08-31 12:28         ` Jan Beulich
2016-08-31 12:32           ` Andrew Cooper
2016-08-31 13:03             ` Jan Beulich
2016-08-30 16:18   ` Ping: " Jan Beulich

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=57B7123E0200007800107622@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=xen-devel@lists.xenproject.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.