From: Sander Eikelenboom <linux@eikelenboom.it>
To: Craig Bergstrom <craigb@google.com>, Ingo Molnar <mingo@kernel.org>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Fengguang Wu <fengguang.wu@intel.com>,
wfg@linux.intel.com, linux-kernel@vger.kernel.org,
LKP <lkp@01.org>, Linus Torvalds <torvalds@linux-foundation.org>,
Xen-devel <xen-devel@lists.xen.org>
Subject: Re: ce56a86e2a ("x86/mm: Limit mmap() of /dev/mem to valid physical addresses"): kernel BUG at arch/x86/mm/physaddr.c:79!
Date: Thu, 26 Oct 2017 21:29:07 +0200 [thread overview]
Message-ID: <207b6a75-2eff-8e92-d50c-ec2022fddbf9@eikelenboom.it> (raw)
In-Reply-To: <CAOJUGycO494NcvJk89MMub9Tbrj6FUoSNN4SOci7NgJRKq7v=A@mail.gmail.com>
On 26/10/17 19:49, Craig Bergstrom wrote:
> Sander, thanks for the details, they've been very useful.
>
> I suspect that your host system's mem=2048M parameter is causing the
> problem. Any chance you can confirm by removing the parameter and
> running the guest code path?
I removed it, but kept the hypervisor limiting dom0 memory to 2046M intact (in grub using the xen bootcmd:
"multiboot /xen-4.10.gz dom0_mem=2048M,max:2048M ....."
Unfortunately that doesn't change anything, the guest still fails to start with the same errors.
> More specifically, since you're telling the kernel that it's high
> memory address is at 2048M and your device is at 0xfe1fe000 (~4G), the
> new mmap() limits are preventing you from mapping addresses that are
> explicitly disallowed by the parameter.
>
Which would probably mean the current patch prohibits hard limiting the dom0 memory to a certain value (below 4G)
at least in combination with PCI-passthrough. So the only thing left would be to have no hard memory restriction on dom0
and rely on auto-ballooning, but I'm not a great fan of that.
I don't know how KVM handles setting memory limits for the host system, but perhaps it suffers from the same issue.
I also tried the patch from one of your last mails to make the check "less strict",
but still get the same errors (when using the hard memory limits).
--
Sander
>
> On Thu, Oct 26, 2017 at 10:39 AM, Ingo Molnar <mingo@kernel.org> wrote:
>>
>> * Craig Bergstrom <craigb@google.com> wrote:
>>
>>> Yes, not much time left for 4.14, it might be reasonable to pull the
>>> change out since it's causing problems. [...]
>>
>> Ok, I'll queue up a revert tomorrow morning and send it to Linus ASAP if there's
>> no good fix by then. In hindsight I should have queued it for v4.15 ...
>>
>> Thanks,
>>
>> Ingo
next prev parent reply other threads:[~2017-10-26 19:29 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-24 2:44 Fengguang Wu
2017-10-25 20:50 ` Boris Ostrovsky
[not found] ` <CAOJUGyfTM2J-P29yPhUx2A2SDjA0rv972SE0hmbMHonthMd_bQ@mail.gmail.com>
2017-10-26 8:05 ` Sander Eikelenboom
2017-10-26 8:12 ` Sander Eikelenboom
2017-10-26 8:58 ` Sander Eikelenboom
2017-10-26 16:35 ` Craig Bergstrom
2017-10-26 16:39 ` Ingo Molnar
2017-10-26 17:49 ` Craig Bergstrom
2017-10-26 19:02 ` Ingo Molnar
2017-10-26 19:29 ` Linus Torvalds
2017-10-26 19:50 ` Craig Bergstrom
2017-10-26 21:12 ` Linus Torvalds
2017-11-16 15:49 ` [tip:x86/urgent] x86/mm: Limit mmap() of /dev/mem to valid physical addresses tip-bot for Craig Bergstrom
2017-10-27 19:24 ` ce56a86e2a ("x86/mm: Limit mmap() of /dev/mem to valid physical addresses"): kernel BUG at arch/x86/mm/physaddr.c:79! Ingo Molnar
2017-10-27 19:28 ` Craig Bergstrom
2017-11-03 19:54 ` Craig Bergstrom
2017-10-27 8:25 ` Ingo Molnar
2017-10-26 19:29 ` Sander Eikelenboom [this message]
2017-10-26 20:01 ` [Xen-devel] " Andrew Cooper
2017-10-27 7:07 ` 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=207b6a75-2eff-8e92-d50c-ec2022fddbf9@eikelenboom.it \
--to=linux@eikelenboom.it \
--cc=boris.ostrovsky@oracle.com \
--cc=craigb@google.com \
--cc=fengguang.wu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@01.org \
--cc=mingo@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=wfg@linux.intel.com \
--cc=xen-devel@lists.xen.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
all inboxes | Powered by JetHome®