Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7078641ybi; Thu, 1 Aug 2019 02:53:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqy6vP/c3pyachp5lVwpBJ6I/YhZ3EjopkUydDu6SJNGckkVxsm4H6q80VTrZdJk9HF7pA4P X-Received: by 2002:a65:4844:: with SMTP id i4mr7489506pgs.113.1564653239028; Thu, 01 Aug 2019 02:53:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564653239; cv=none; d=google.com; s=arc-20160816; b=pTtyOGe6eZ3WRN2jsJLvmA3ZesuiRWMrLXop6L+Lr7PE0WzS2GskxYh19fOJKWXdHP Dn6zo0aJB1BTLeT1PapDfvDIr6S06/U4pveLzVMm9Nv4o60yYPOJdgVD4OpORFfQt4A1 lzDcNhycBNfKm+RxMZXTRYu0I2d9Fci/E4n46Pya23+3axzBn+KpxOGZBDFbY8rNMNLB 5aDLf0UuEUfcCPUnWu+zcCFzM1FKivnrC4RxfJ4JG8YWqP9W3TVJ+W0icuetTrp57heC 48qZfJKGm9QtyeZB3ijYzRVrgDhxww1EidRvumF9npJZMSdQvqvqB9e80IIH6CELG1v0 7F8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from; bh=abTOQoOTi3krU+izFv8kBT2onT1ktiKaZSdqoYmzXag=; b=hhyIVIvU20rnhWHfimqEBNPQaJvPqcU6J315UBQ5ThHCSuRtRWK2aNuGriajgpudZ7 Wb/KKNWkwr2lDcM4FBpTCmP360bFhGm+5onBG+6Bpycy0jVppYYkRvV06iwdACimFhZN nmP7VfGtn5W2Z/kEa36PBsjnv7Czj446V+FZWJ5zden/r1/mXmbRSrj1qqZoh1aLcIQK M8/xx3ZRxdDzvPSU21JE/PFgVYpJ+0S9DjatQyb8vpbWX8d2X99JXds2jaQ5UFeQ91Cb VV6Ws2FEPLw5QI0XjK53ez8o1cOMovbmQIOYwyb77AtRP9jaSCv3I8baI1Hiq5bMgXhV yhYQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b61si32128906plb.401.2019.08.01.02.53.44; Thu, 01 Aug 2019 02:53:59 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730930AbfHAJEJ convert rfc822-to-8bit (ORCPT + 99 others); Thu, 1 Aug 2019 05:04:09 -0400 Received: from tyo162.gate.nec.co.jp ([114.179.232.162]:43563 "EHLO tyo162.gate.nec.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730567AbfHAJEJ (ORCPT ); Thu, 1 Aug 2019 05:04:09 -0400 Received: from mailgate01.nec.co.jp ([114.179.233.122]) by tyo162.gate.nec.co.jp (8.15.1/8.15.1) with ESMTPS id x71940SC015459 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 1 Aug 2019 18:04:00 +0900 Received: from mailsv02.nec.co.jp (mailgate-v.nec.co.jp [10.204.236.94]) by mailgate01.nec.co.jp (8.15.1/8.15.1) with ESMTP id x71940LC010973; Thu, 1 Aug 2019 18:04:00 +0900 Received: from mail03.kamome.nec.co.jp (mail03.kamome.nec.co.jp [10.25.43.7]) by mailsv02.nec.co.jp (8.15.1/8.15.1) with ESMTP id x7193E3B027604; Thu, 1 Aug 2019 18:04:00 +0900 Received: from bpxc99gp.gisp.nec.co.jp ([10.38.151.151] [10.38.151.151]) by mail03.kamome.nec.co.jp with ESMTP id BT-MMP-2655495; Thu, 1 Aug 2019 17:18:27 +0900 Received: from BPXM23GP.gisp.nec.co.jp ([10.38.151.215]) by BPXC23GP.gisp.nec.co.jp ([10.38.151.151]) with mapi id 14.03.0439.000; Thu, 1 Aug 2019 17:18:27 +0900 From: Naoya Horiguchi To: Jane Chu CC: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "linux-nvdimm@lists.01.org" Subject: Re: [PATCH v3 2/2] mm/memory-failure: Poison read receives SIGKILL instead of SIGBUS if mmaped more than once Thread-Topic: [PATCH v3 2/2] mm/memory-failure: Poison read receives SIGKILL instead of SIGBUS if mmaped more than once Thread-Index: AQHVQzSPZWUqS0z8rU+q1hsF+rBObKblZhkA Date: Thu, 1 Aug 2019 08:18:26 +0000 Message-ID: <20190801081826.GB31767@hori.linux.bs1.fc.nec.co.jp> References: <1564092101-3865-1-git-send-email-jane.chu@oracle.com> <1564092101-3865-3-git-send-email-jane.chu@oracle.com> In-Reply-To: <1564092101-3865-3-git-send-email-jane.chu@oracle.com> Accept-Language: en-US, ja-JP Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.34.125.150] Content-Type: text/plain; charset="iso-2022-jp" Content-ID: <3643947E1DEB764F9AEBCC8A0B8504B2@gisp.nec.co.jp> Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-TM-AS-MML: disable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 25, 2019 at 04:01:41PM -0600, Jane Chu wrote: > Mmap /dev/dax more than once, then read the poison location using address > from one of the mappings. The other mappings due to not having the page > mapped in will cause SIGKILLs delivered to the process. SIGKILL succeeds > over SIGBUS, so user process looses the opportunity to handle the UE. > > Although one may add MAP_POPULATE to mmap(2) to work around the issue, > MAP_POPULATE makes mapping 128GB of pmem several magnitudes slower, so > isn't always an option. > > Details - > > ndctl inject-error --block=10 --count=1 namespace6.0 > > ./read_poison -x dax6.0 -o 5120 -m 2 > mmaped address 0x7f5bb6600000 > mmaped address 0x7f3cf3600000 > doing local read at address 0x7f3cf3601400 > Killed > > Console messages in instrumented kernel - > > mce: Uncorrected hardware memory error in user-access at edbe201400 > Memory failure: tk->addr = 7f5bb6601000 > Memory failure: address edbe201: call dev_pagemap_mapping_shift > dev_pagemap_mapping_shift: page edbe201: no PUD > Memory failure: tk->size_shift == 0 > Memory failure: Unable to find user space address edbe201 in read_poison > Memory failure: tk->addr = 7f3cf3601000 > Memory failure: address edbe201: call dev_pagemap_mapping_shift > Memory failure: tk->size_shift = 21 > Memory failure: 0xedbe201: forcibly killing read_poison:22434 because of failure to unmap corrupted page > => to deliver SIGKILL > Memory failure: 0xedbe201: Killing read_poison:22434 due to hardware memory corruption > => to deliver SIGBUS > > Signed-off-by: Jane Chu > Suggested-by: Naoya Horiguchi Thanks for the fix. Acked-by: Naoya Horiguchi