From: Andy Lutomirski <luto@kernel.org>
To: Benjamin Gilbert <benjamin.gilbert@coreos.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
X86 ML <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
linux-mm@kvack.org, stable <stable@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@kernel.org>, Andy Lutomirski <luto@kernel.org>,
Dave Hansen <dave.hansen@linux.intel.com>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: "bad pmd" errors + oops with KPTI on 4.14.11 after loading X.509 certs
Date: Wed, 3 Jan 2018 20:45:52 -0800 [thread overview]
Message-ID: <CALCETrW8NxLd4v_U_g8JyW5XdVXWhM_MZOUn05J8VTuWOwkj-A@mail.gmail.com> (raw)
In-Reply-To: <CAD3Vwcptxyf+QJO7snZs_-MHGV3ARmLeaFVR49jKM=6MAGMk7Q@mail.gmail.com>
On Wed, Jan 3, 2018 at 8:35 PM, Benjamin Gilbert
<benjamin.gilbert@coreos.com> wrote:
> On Wed, Jan 03, 2018 at 04:37:53PM -0800, Andy Lutomirski wrote:
>> Maybe try rebuilding a bad kernel with free_ldt_pgtables() modified
>> to do nothing, and the read /sys/kernel/debug/page_tables/current (or
>> current_kernel, or whatever it's called). The problem may be obvious.
>
> current_kernel attached. I have not seen any crashes with
> free_ldt_pgtables() stubbed out.
I haven't reproduced it, but I think I see what's wrong. KASLR sets
vaddr_end to a totally bogus value. It should be no larger than
LDT_BASE_ADDR. I suspect that your vmemmap is getting randomized into
the LDT range. If it weren't for that, it could just as easily land
in the cpu_entry_area range. This will need fixing in all versions
that aren't still called KAISER.
Our memory map code is utter shite. This kind of bug should not be
possible without a giant warning at boot that something is screwed up.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2018-01-04 4:46 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-03 8:36 "bad pmd" errors + oops with KPTI on 4.14.11 after loading X.509 certs Benjamin Gilbert
2018-01-03 8:46 ` Benjamin Gilbert
2018-01-03 9:20 ` Greg Kroah-Hartman
2018-01-03 15:48 ` Ingo Molnar
2018-01-03 22:32 ` Benjamin Gilbert
2018-01-03 22:34 ` Thomas Gleixner
2018-01-03 22:49 ` Benjamin Gilbert
2018-01-03 22:57 ` Thomas Gleixner
2018-01-03 22:58 ` Thomas Gleixner
2018-01-03 23:44 ` Andy Lutomirski
2018-01-03 23:46 ` Thomas Gleixner
2018-01-04 0:27 ` Andy Lutomirski
2018-01-04 0:38 ` Benjamin Gilbert
2018-01-04 0:33 ` Benjamin Gilbert
2018-01-04 0:37 ` Thomas Gleixner
2018-01-04 7:14 ` Ingo Molnar
2018-01-04 7:18 ` Greg Kroah-Hartman
2018-01-04 7:20 ` Ingo Molnar
2018-01-04 8:03 ` Greg Kroah-Hartman
2018-01-04 7:22 ` Ingo Molnar
2018-01-04 0:37 ` Andy Lutomirski
2018-01-04 4:35 ` Benjamin Gilbert
2018-01-04 4:45 ` Andy Lutomirski [this message]
2018-01-04 12:28 ` Thomas Gleixner
2018-01-04 16:17 ` Andy Lutomirski
2018-01-04 16:34 ` Thomas Gleixner
2018-01-04 19:38 ` Benjamin Gilbert
2018-01-04 1:37 ` Benjamin Gilbert
2018-01-04 4:36 ` Benjamin Gilbert
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=CALCETrW8NxLd4v_U_g8JyW5XdVXWhM_MZOUn05J8VTuWOwkj-A@mail.gmail.com \
--to=luto@kernel.org \
--cc=benjamin.gilbert@coreos.com \
--cc=dave.hansen@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=stable@vger.kernel.org \
--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 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).