linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@linux.intel.com>
To: Joerg Roedel <joro@8bytes.org>, Borislav Petkov <bp@suse.de>
Cc: Andy Lutomirski <luto@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Joerg Roedel <jroedel@suse.de>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>
Subject: Re: [PATCH] x86/ldt: Fix support_pte_mask filtering in map_ldt_struct()
Date: Thu, 19 Apr 2018 12:22:40 -0700	[thread overview]
Message-ID: <a47fd151-a691-6b11-597e-aad1f646fdef@linux.intel.com> (raw)
In-Reply-To: <20180419141134.GI15462@8bytes.org>

On 04/19/2018 07:11 AM, Joerg Roedel wrote:
> On Thu, Apr 19, 2018 at 03:00:11PM +0200, Borislav Petkov wrote:
>> fb43d6cb91ef x86/mm: Do not auto-massage page protections <--- NOT OK
> Hmm, that hunk from above patch looks suspicious:
> 
> -               set_pgd(pgd + pgd_index(restore_jump_address), __pgd(__pa(pud) | _KERNPG_TABLE));
> +               pgd_t new_pgd = __pgd(__pa(p4d) | pgprot_val(pgtable_prot));
> +               set_pgd(pgd + pgd_index(restore_jump_address), new_pgd);
> 
> The old code used __pa(pud) while the new one uses __pa(p4d).
> 
> Boris, can you change that back to __pa(pud) and test please?

That does look like the culprit.  I probably copy/pasted the p4d line
from above and missed that 'p4d' when converting it to pud.

Thanks for finding this, guys.

      parent reply	other threads:[~2018-04-19 19:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-16  9:43 [PATCH] x86/ldt: Fix support_pte_mask filtering in map_ldt_struct() Joerg Roedel
2018-04-16 15:16 ` Andy Lutomirski
2018-04-16 15:39   ` Dave Hansen
2018-04-18 12:18     ` Borislav Petkov
2018-04-19 13:00       ` Borislav Petkov
2018-04-19 14:11         ` Joerg Roedel
2018-04-19 14:58           ` Michal Kubecek
2018-04-19 15:11             ` Joerg Roedel
2018-04-19 16:04               ` Borislav Petkov
2018-04-19 19:22           ` Dave Hansen [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=a47fd151-a691-6b11-597e-aad1f646fdef@linux.intel.com \
    --to=dave.hansen@linux.intel.com \
    --cc=bp@suse.de \
    --cc=hpa@zytor.com \
    --cc=joro@8bytes.org \
    --cc=jroedel@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=tglx@linutronix.de \
    /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).