From: Stefan Bader <stefan.bader@canonical.com>
To: Kees Cook <keescook@chromium.org>
Cc: David Vrabel <david.vrabel@citrix.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [Xen-devel] Xen PV domain regression with KASLR enabled (kernel 3.16)
Date: Tue, 12 Aug 2014 20:05:54 +0200 [thread overview]
Message-ID: <53EA5782.1080301@canonical.com> (raw)
In-Reply-To: <CAGXu5jJ+FTqgYpLH5x0VBm9QMND-b0Sze6q6pc=tRe2oFMu5uA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2284 bytes --]
On 12.08.2014 19:28, Kees Cook wrote:
> On Fri, Aug 8, 2014 at 7:35 AM, Stefan Bader <stefan.bader@canonical.com> wrote:
>> On 08.08.2014 14:43, David Vrabel wrote:
>>> On 08/08/14 12:20, Stefan Bader wrote:
>>>> Unfortunately I have not yet figured out why this happens, but can confirm by
>>>> compiling with or without CONFIG_RANDOMIZE_BASE being set that without KASLR all
>>>> is ok, but with it enabled there are issues (actually a dom0 does not even boot
>>>> as a follow up error).
>>>>
>>>> Details can be seen in [1] but basically this is always some portion of a
>>>> vmalloc allocation failing after hitting a freshly allocated PTE space not being
>>>> PTE_NONE (usually from a module load triggered by systemd-udevd). In the
>>>> non-dom0 case this repeats many times but ends in a guest that allows login. In
>>>> the dom0 case there is a more fatal error at some point causing a crash.
>>>>
>>>> I have not tried this for a normal PV guest but for dom0 it also does not help
>>>> to add "nokaslr" to the kernel command-line.
>>>
>>> Maybe it's overlapping with regions of the virtual address space
>>> reserved for Xen? What the the VA that fails?
>>>
>>> David
>>>
>> Yeah, there is some code to avoid some regions of memory (like initrd). Maybe
>> missing p2m tables? I probably need to add debugging to find the failing VA (iow
>> not sure whether it might be somewhere in the stacktraces in the report).
>>
>> The kernel-command line does not seem to be looked at. It should put something
>> into dmesg and that never shows up. Also today's random feature is other PV
>> guests crashing after a bit somewhere in the check_for_corruption area...
>
> Right now, the kaslr code just deals with initrd, cmdline, etc. If
> there are other reserved regions that aren't listed in the e820, it'll
> need to locate and skip them.
>
> -Kees
>
Making my little steps towards more understanding I figured out that it isn't
the code that does the relocation. Even with that completely disabled there were
the vmalloc issues. What causes it seems to be the default of the upper limit
and that this changes the split between kernel and modules to 1G+1G instead of
512M+1.5G. That is the reason why nokaslr has no effect.
-Stefan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-08-12 18:05 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-08 11:20 Xen PV domain regression with KASLR enabled (kernel 3.16) Stefan Bader
2014-08-08 12:43 ` [Xen-devel] " David Vrabel
2014-08-08 14:35 ` Stefan Bader
2014-08-12 17:28 ` Kees Cook
2014-08-12 18:05 ` Stefan Bader [this message]
2014-08-12 18:53 ` Kees Cook
2014-08-12 19:07 ` Konrad Rzeszutek Wilk
2014-08-21 16:03 ` Kees Cook
2014-08-22 9:20 ` Stefan Bader
2014-08-26 16:01 ` Konrad Rzeszutek Wilk
2014-08-27 8:03 ` Stefan Bader
2014-08-27 20:49 ` Konrad Rzeszutek Wilk
2014-08-28 18:01 ` [PATCH] Solved the Xen PV/KASLR riddle Stefan Bader
2014-08-28 22:22 ` Kees Cook
2014-08-28 22:42 ` Andrew Cooper
2014-08-29 8:37 ` [Xen-devel] " Stefan Bader
2014-08-29 14:19 ` Andrew Cooper
2014-08-29 14:32 ` Stefan Bader
2014-08-29 14:43 ` Andrew Cooper
2014-08-29 14:08 ` Konrad Rzeszutek Wilk
2014-08-29 14:27 ` Stefan Bader
2014-08-29 14:31 ` David Vrabel
2014-08-29 14:35 ` Stefan Bader
2014-08-29 14:44 ` [Xen-devel] " Jan Beulich
2014-08-29 14:55 ` Konrad Rzeszutek Wilk
2014-09-01 4:03 ` Juergen Gross
2014-09-02 19:22 ` Konrad Rzeszutek Wilk
2014-09-03 4:07 ` Juergen Gross
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=53EA5782.1080301@canonical.com \
--to=stefan.bader@canonical.com \
--cc=david.vrabel@citrix.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xen-devel@lists.xensource.com \
/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).