linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Tatashin <pasha.tatashin@oracle.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Steve Sistare <steven.sistare@oracle.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	mingo@redhat.com, hpa@zytor.com, x86@kernel.org,
	Jiri Kosina <jkosina@suse.cz>, Hugh Dickins <hughd@google.com>,
	dave.hansen@linux.intel.com, Andy Lutomirski <luto@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH 4.9] x86/pti/efi: broken conversion from efi to kernel page table
Date: Sat, 13 Jan 2018 12:40:10 -0500	[thread overview]
Message-ID: <CAOAebxs2CEJF02wXi3X+7AbPnVP59TvvhujHqjn3pe5CDc1vmw@mail.gmail.com> (raw)
In-Reply-To: <20180113171253.GA6797@kroah.com>

Hi Greg,

Yeah, the one in pgtable.c needs to be removed, I wonder how it
compiled... I will submit a new patch for 4.9 sometime later.

Thank you,
Pavel

On Sat, Jan 13, 2018 at 12:12 PM, Greg KH <gregkh@linuxfoundation.org> wrote:
> On Thu, Jan 11, 2018 at 04:58:20PM -0500, Pavel Tatashin wrote:
>> The page table order must be increased for EFI table in order to avoid a
>> bug where NMI tries to change the page table to kernel page table, while
>> efi page table is active.
>>
>> For more disccussion about this bug, see this thread:
>> http://lkml.iu.edu/hypermail/linux/kernel/1801.1/00951.html
>>
>> Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
>> Reviewed-by: Steven Sistare <steven.sistare@oracle.com>
>> Acked-by: Jiri Kosina <jkosina@suse.cz>
>> ---
>>  arch/x86/include/asm/pgalloc.h | 11 +++++++++++
>>  arch/x86/platform/efi/efi_64.c |  2 +-
>>  2 files changed, 12 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/x86/include/asm/pgalloc.h b/arch/x86/include/asm/pgalloc.h
>> index b6d425999f99..1178a51b77f3 100644
>> --- a/arch/x86/include/asm/pgalloc.h
>> +++ b/arch/x86/include/asm/pgalloc.h
>> @@ -27,6 +27,17 @@ static inline void paravirt_release_pud(unsigned long pfn) {}
>>   */
>>  extern gfp_t __userpte_alloc_gfp;
>>
>> +#ifdef CONFIG_PAGE_TABLE_ISOLATION
>> +/*
>> + * Instead of one PGD, we acquire two PGDs.  Being order-1, it is
>> + * both 8k in size and 8k-aligned.  That lets us just flip bit 12
>> + * in a pointer to swap between the two 4k halves.
>> + */
>> +#define PGD_ALLOCATION_ORDER 1
>> +#else
>> +#define PGD_ALLOCATION_ORDER 0
>> +#endif
>
> This conflicts with the definition of PGD_ALLOCATION_ORDER in
> arch/x86/mm/pgtable.c that says:
>
> /*
>  * Instead of one pgd, Kaiser acquires two pgds.  Being order-1, it is
>  * both 8k in size and 8k-aligned.  That lets us just flip bit 12
>  * in a pointer to swap between the two 4k halves.
>  */
> #define PGD_ALLOCATION_ORDER    kaiser_enabled
>
> So, which is it?
>
> I'm going to go drop this from the 4.9 stable queue because of this.
>
> thanks,
>
> greg k-h

  reply	other threads:[~2018-01-13 17:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-11 21:58 [PATCH 4.9] x86/pti/efi: broken conversion from efi to kernel page table Pavel Tatashin
2018-01-12 13:58 ` Ingo Molnar
2018-01-12 14:09   ` Pavel Tatashin
2018-01-12 14:27 ` Jiri Kosina
2018-01-13 13:16   ` Greg KH
2018-01-13 13:18 ` Greg KH
2018-01-13 17:12 ` Greg KH
2018-01-13 17:40   ` Pavel Tatashin [this message]
2018-01-13 18:14     ` Greg KH

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=CAOAebxs2CEJF02wXi3X+7AbPnVP59TvvhujHqjn3pe5CDc1vmw@mail.gmail.com \
    --to=pasha.tatashin@oracle.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=hughd@google.com \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=steven.sistare@oracle.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).