From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-x22c.google.com (mail-oi0-x22c.google.com [IPv6:2607:f8b0:4003:c06::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 64EE22007E7E2 for ; Tue, 1 May 2018 20:22:06 -0700 (PDT) Received: by mail-oi0-x22c.google.com with SMTP id p62-v6so11684299oie.10 for ; Tue, 01 May 2018 20:22:06 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <152520750404.36522.15462513519590065300.stgit@dwillia2-desk3.amr.corp.intel.com> From: Dan Williams Date: Tue, 1 May 2018 20:22:05 -0700 Message-ID: Subject: Re: [PATCH 0/6] use memcpy_mcsafe() for copy_to_iter() List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Linus Torvalds Cc: Tony Luck , "linux-nvdimm@lists.01.org" , Peter Zijlstra , the arch/x86 maintainers , Linux Kernel Mailing List , Andy Lutomirski , Ingo Molnar , Borislav Petkov , Al Viro , Thomas Gleixner , Andrew Morton List-ID: On Tue, May 1, 2018 at 8:20 PM, Dan Williams wrote: > On Tue, May 1, 2018 at 8:13 PM, Linus Torvalds > wrote: >> On Tue, May 1, 2018 at 8:03 PM Dan Williams >> wrote: >> >>> Because dax. There's no page cache indirection games we can play here >>> to poison a page and map in another page. The mapped page is 1:1 >>> associated with the filesystem block and physical memory address. >> >> I'm not talking page cache indirection. >> >> I'm talking literally mapping a different page into the kernel virtual >> address space that the failing read was done for. >> >> But you seem to be right that we don't actually support that. I'm guessing >> the hwpoison code has never had to run in that kind of situation and will >> just give up. >> >> That would seem to be sad. It really feels like the obvious solution to any >> MCE's - just map a dummy page at the address that causes problems. >> >> That can have bad effects for real memory (because who knows what internal >> kernel data structure might be in there), but would seem to be the >> _optimal_ solution for some random pmem access. And makes it absolutely >> trivial to just return to the execution that got the error exception. > > The other property of pmem that we need to contend with that makes it > a snowflake relative to typical memory is that errors can be repaired > by sending a slow-path command to the DIMM device. We trap block-layer > writes in the pmem driver that target known 'badblocks' and send the > sideband command to clear the error along with the new data. All that to say that having a typical RAM page covering poisoned pmem would complicate the 'clear badblocks' implementation. _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751278AbeEBDWH (ORCPT ); Tue, 1 May 2018 23:22:07 -0400 Received: from mail-oi0-f41.google.com ([209.85.218.41]:45823 "EHLO mail-oi0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751214AbeEBDWG (ORCPT ); Tue, 1 May 2018 23:22:06 -0400 X-Google-Smtp-Source: AB8JxZrxNyEze0jcmCQ2qDlKn/fUK7M7d35Bf/tzfCxBQVqd7YiAfQP/aSf8Uja/7MO/bCxbFE4F7O08wFGk5/VqmkQ= MIME-Version: 1.0 In-Reply-To: References: <152520750404.36522.15462513519590065300.stgit@dwillia2-desk3.amr.corp.intel.com> From: Dan Williams Date: Tue, 1 May 2018 20:22:05 -0700 Message-ID: Subject: Re: [PATCH 0/6] use memcpy_mcsafe() for copy_to_iter() To: Linus Torvalds Cc: "linux-nvdimm@lists.01.org" , Tony Luck , Peter Zijlstra , Borislav Petkov , "the arch/x86 maintainers" , Thomas Gleixner , Andy Lutomirski , Ingo Molnar , Al Viro , Andrew Morton , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 1, 2018 at 8:20 PM, Dan Williams wrote: > On Tue, May 1, 2018 at 8:13 PM, Linus Torvalds > wrote: >> On Tue, May 1, 2018 at 8:03 PM Dan Williams >> wrote: >> >>> Because dax. There's no page cache indirection games we can play here >>> to poison a page and map in another page. The mapped page is 1:1 >>> associated with the filesystem block and physical memory address. >> >> I'm not talking page cache indirection. >> >> I'm talking literally mapping a different page into the kernel virtual >> address space that the failing read was done for. >> >> But you seem to be right that we don't actually support that. I'm guessing >> the hwpoison code has never had to run in that kind of situation and will >> just give up. >> >> That would seem to be sad. It really feels like the obvious solution to any >> MCE's - just map a dummy page at the address that causes problems. >> >> That can have bad effects for real memory (because who knows what internal >> kernel data structure might be in there), but would seem to be the >> _optimal_ solution for some random pmem access. And makes it absolutely >> trivial to just return to the execution that got the error exception. > > The other property of pmem that we need to contend with that makes it > a snowflake relative to typical memory is that errors can be repaired > by sending a slow-path command to the DIMM device. We trap block-layer > writes in the pmem driver that target known 'badblocks' and send the > sideband command to clear the error along with the new data. All that to say that having a typical RAM page covering poisoned pmem would complicate the 'clear badblocks' implementation.