linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Craig Bergstrom <craigb@google.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Sander Eikelenboom <linux@eikelenboom.it>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Fengguang Wu <fengguang.wu@intel.com>,
	wfg@linux.intel.com,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	LKP <lkp@01.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: Fri, 3 Nov 2017 13:54:14 -0600	[thread overview]
Message-ID: <CAOJUGydv751M2p8iXHqOBEMCg5Zp2PfLZ=pzTC+nu-Qu0x5-tQ@mail.gmail.com> (raw)
In-Reply-To: <CAOJUGydTX7A=1-ZnODDJ+qAMbvFeb1TabLRKKx9BaLmDUOSj6Q@mail.gmail.com>

Just a follow up, since I said I would come back around this week.

I've come up with a couple patchsets that I'm going to attempt to test
internally before I sent out more widely.  I'm thinking it's
appropriate to mail out two changes:

 (1) Reject attempts to map physical memory addresses outside the
valid physical memory bus width of the system.  This should reject
mappings that will obviously break the page fault handler without
affecting any memory mapped devices.

 (2) Make a page fault handler that's called with a reserved bit set
kill the process instead of reboot the whole kernel. This is based on
Linus' comment "I think we might also look at just also handling the
whole RSVD page fault case more gracefully".

Standby while I test these changes.

Cheers,
Craig

On Fri, Oct 27, 2017 at 1:28 PM, Craig Bergstrom <craigb@google.com> wrote:
> Sounds good.  Thanks for the context.
>
> I'll keep this on my plate and I'll turn something around once I've
> had a chance to test a bit, probably next week.
>
> On Fri, Oct 27, 2017 at 1:24 PM, Ingo Molnar <mingo@kernel.org> wrote:
>>
>> * Craig Bergstrom <craigb@google.com> wrote:
>>
>>> Reverting seems like the right approach at the moment.  My apologies
>>> for the breakage so late the in the cycle.
>>
>> Note that there's no need for you to apologize and you carry exactly zero amount
>> of blame for the late-cycle breakage: it was my decision to send it to Linus so
>> quickly, you never asked for it to be sent upstream on such a short notice.
>>
>> ( Classic "patch makes sense, looks good, other arches ar doing this too, and I
>>   tested it myself too on multiple systems, so it must be obviously fine for
>>   everyone" moment. )
>>
>> Your change still makes sense from a robustness POV, so please send it again with
>> the suggested fixes - and I'll be more careful with the upstream merge this time.
>>
>> Thanks,
>>
>>         Ingo

  reply	other threads:[~2017-11-03 19:54 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-24  2:44 ce56a86e2a ("x86/mm: Limit mmap() of /dev/mem to valid physical addresses"): kernel BUG at arch/x86/mm/physaddr.c:79! 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 [this message]
2017-10-27  8:25                     ` Ingo Molnar
2017-10-26 19:29                 ` Sander Eikelenboom
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='CAOJUGydv751M2p8iXHqOBEMCg5Zp2PfLZ=pzTC+nu-Qu0x5-tQ@mail.gmail.com' \
    --to=craigb@google.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=fengguang.wu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@eikelenboom.it \
    --cc=lkp@01.org \
    --cc=mingo@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=wfg@linux.intel.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).