Received: by 10.223.164.221 with SMTP id h29csp201583wrb; Fri, 3 Nov 2017 12:56:08 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RmWKLF8/AHNgAD4i+aE6WKz+LIku3QKuNpZyErXjdinKwjkHT75DiTNXaVMvXSj0p6LP3X X-Received: by 10.99.94.198 with SMTP id s189mr8270488pgb.32.1509738968599; Fri, 03 Nov 2017 12:56:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509738968; cv=none; d=google.com; s=arc-20160816; b=0at0vdjFxNCWz9eDRJ9pOo/vmi6RHhUEkatVDJoKp00UvUnZP0Bu0pOVn1QqPkHQZ+ BfobRy2ZVHK4U9VdNJCdut0mcKYa3IeOvaJV7QJUwRzEWp62x+T16rQ65OVwVbYtAyP2 ZDNPMhkaJE8MB7xdua5h/kF/JUHQYOJA68tZ+XK52s6g8JUSWghX3fmQB4oCquOLF/JK AWwIHnR7yxTVJ89xaJyyoE6AMZSb73Du5quVX5elBZFYyxAhK6uuZorIRLuzYob+BhrA UkNuDPuvsU0E716PkkOjFa5z0o3OuStzPOdL+6YfcUUwWCFzHjEyww5p9BOgKAjj8j5I AE5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=V3Y9X54vU4/6iIgOSKFTTZv0wpGUKvT7K1DwnEVjbAY=; b=1EnG9VYaqFSDF1GlPcq+ddlXQttiiYw9NqKpq9x3fa2bD0fF3NxkiXRFn7Au6agbl4 KDpGCLOlHKGlHRvuHlcXgNgCP82ngo8riTD2G0YuPUQ+oH9mxCT08Y0qs6Zv/caSGlbq 0iL4kz/HX51P0vHz1o+Mx7p8qN5eDc8BI0l3wOOjsqoCWkxs2Tur4xGt787XfBn/yII6 2W6vAFRnvSu/0TafibTjY3qcaZazZ8L2Bpsf6T5JfNYtTcsTATfdo+90jO5hhzaFjTZx 4OxRUPFEGwf/gdqAzMnT+kxfizjktO/2fH7j4RjH2UWSsdhrJVzCa3vWcBpAuXtcTfKb MV5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=W8zT4oX7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s11si5361041plp.812.2017.11.03.12.55.56; Fri, 03 Nov 2017 12:56:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=W8zT4oX7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933452AbdKCTyS (ORCPT + 92 others); Fri, 3 Nov 2017 15:54:18 -0400 Received: from mail-wr0-f170.google.com ([209.85.128.170]:50128 "EHLO mail-wr0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752170AbdKCTyQ (ORCPT ); Fri, 3 Nov 2017 15:54:16 -0400 Received: by mail-wr0-f170.google.com with SMTP id g90so3451451wrd.6 for ; Fri, 03 Nov 2017 12:54:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=V3Y9X54vU4/6iIgOSKFTTZv0wpGUKvT7K1DwnEVjbAY=; b=W8zT4oX72bC2XRrxqWAU3l0NnQ4LUd/rJhPqw6Cq9Wui5E3m65AfjSr8xMfK4MMcBU /HZvMKnIfWag+Y2IspD6t587Oyal+tsKvYPeJKUTwTMlAutxWnT8EIz8AHtDUZgQ019a fmoDEnZWuWJS4iZAjS/B4YJ8blLb18dWf+cyBC0zEYP8Op+Pi8f6MEB/kwlbZi65EJse NXDea7xOuuAFozNlQpnr0Df9kQIWgLwlTCi2uwrsVuTdM23ZJOg2U8bvN17DvG5id7i8 ZTy8/FXNPv3vqviwffcNXs2yj0kPA5BJEiTbQcBX56CcNtGAzgFM/UPTxzh3SbS0egrD yvdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=V3Y9X54vU4/6iIgOSKFTTZv0wpGUKvT7K1DwnEVjbAY=; b=uGSQ1GDoK47nn8AZQpJR4rn1FuhRV8X62nBvmDQ0Jujd+lIVq8Q+t9H+aLYD2dvVSt oDRCN9LJLOyTZ658jzkiwHKpZymAvQnKBrW7XwV8IX2NCfJG+XJPJugLWBVKFR/4e4WF 6lqGlujImbANj3Evty3L9kVU80iCYKFe/lzUXd7SqyL8UKSSI8+re9+OveDWORfrGaPW 3ko4frsRygLURm6WhEzDs+XgMiluOGdPzjux2UAPbCWK9uXKr9PF13kcx283AapNQdYP uZrFmwrGFnY+sv4yh0scH41Wm61QtH8mgGYPHRQf5eJN9M9qZQScwbehEhaknpNkNA3+ lopQ== X-Gm-Message-State: AMCzsaXoiydfuSIMp66iyPVtDqdpJk+qJE70Jk6XHvkEERntt+q8pMGB ofqfST7gk2xhk0aXCbMPPMupAeSvpEolZCtpFigIzg== X-Received: by 10.223.186.140 with SMTP id p12mr6576893wrg.235.1509738855369; Fri, 03 Nov 2017 12:54:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.176.4 with HTTP; Fri, 3 Nov 2017 12:54:14 -0700 (PDT) In-Reply-To: References: <440615a7-6cc0-a607-ce7c-22a34b69e8fe@eikelenboom.it> <1d203c07-0595-a33a-620b-c51eea9721d1@eikelenboom.it> <8721eeac-a644-e815-55e9-5f01956dd22a@eikelenboom.it> <20171026163911.dnovh4zaik5qumtt@gmail.com> <20171026190229.zt743ooxvjsukmis@gmail.com> <20171027192417.d2x4cy6ra7fghjzw@gmail.com> From: Craig Bergstrom Date: Fri, 3 Nov 2017 13:54:14 -0600 Message-ID: Subject: Re: ce56a86e2a ("x86/mm: Limit mmap() of /dev/mem to valid physical addresses"): kernel BUG at arch/x86/mm/physaddr.c:79! To: Ingo Molnar Cc: Linus Torvalds , Sander Eikelenboom , Boris Ostrovsky , Fengguang Wu , wfg@linux.intel.com, Linux Kernel Mailing List , LKP Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 wrote: >> >> * Craig Bergstrom 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 From 1582440216304573982@xxx Fri Oct 27 19:29:51 +0000 2017 X-GM-THRID: 1582105239086831553 X-Gmail-Labels: Inbox,Category Forums