From patchwork Tue May 9 05:47:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jane Chu X-Patchwork-Id: 9065 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2644102vqo; Mon, 8 May 2023 22:48:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ69fDV3gCWcjXExRFGN/cuh09H17IfhiHB3vaXiTKAkbbe4ceqxN0j5ukKxlkyqo0NsvdZH X-Received: by 2002:a05:6a00:22cc:b0:646:5f98:6bb4 with SMTP id f12-20020a056a0022cc00b006465f986bb4mr5950308pfj.33.1683611336439; Mon, 08 May 2023 22:48:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683611336; cv=none; d=google.com; s=arc-20160816; b=HCGoYOKDfg8RkACmmrhG7HgHQXD4thXejHm2Kb++nhTQawG0h+1jPOiPuCE+3Blk2I YFKZWTaVogHJ4SigoJD07OtPQEEoMbEkbbY/36jJQ5UsbLKEpTVCxh9fiYhPycjveis3 GRyhROaPWFMEe7F3vehilVHrBVqKfEP1pL4NNRhM/2MQVeib18nf4MM6xMW245LfO126 GwyYek4gnD/KTTjA2GgUNIHNaRuVR2qWa4EzZmPeyX0RxWDUvzQ8bJWIz/Bwnb6CYGTA 3dutC2SsTFghgvXhih9/pg2tUviybJz7k5cG1T3k+tTRIQyTI1uFx2F2lyGo2Fnv+90V kQpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:to:from:dkim-signature; bh=50u2xjNWdhe8Y8dEnyMSIRqp+jBEMtcSls+BAFjd/Vk=; b=aZcK9W0T7XfDAIOlsRzZUuRgFbJeMReQkI5PLV1i9pR8ZY715N1GuRDjbXBfHYrMXh g+MzjWJrcOa9gUrFwS36wc27fmgmSDesmC33OIigQo9JjV+u5bLlXpnI01fY68pq2+N5 Ajay+9r3NllNxkCmeppUAflL5PJ59QcT1w4YwhSk04UYdYd5F62R+iqdUtNCLiAGj3IU reBLNt3zQpU+OlJsO1vc7Uese+DGTdBu5Fll1XBXOFVqsqiEnd6QFVeWVNfrOOKYXThu r2Tn/WjfGZks5p1t6WT0Y6+zIJRgDas0/mS2z6wegVKk3N+7K0XB3fIGsqhef37lDL58 tQug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=DD9G7sGF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a12-20020aa7970c000000b0063f16039f14si1692610pfg.128.2023.05.08.22.48.41; Mon, 08 May 2023 22:48:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=DD9G7sGF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232230AbjEIFrs (ORCPT + 99 others); Tue, 9 May 2023 01:47:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234542AbjEIFrp (ORCPT ); Tue, 9 May 2023 01:47:45 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 702099028; Mon, 8 May 2023 22:47:44 -0700 (PDT) Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 348NxdMe024126; Tue, 9 May 2023 05:47:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id; s=corp-2023-03-30; bh=50u2xjNWdhe8Y8dEnyMSIRqp+jBEMtcSls+BAFjd/Vk=; b=DD9G7sGFFb5aqhSUmCAmi7UB79Qh0bmg8nVZ7OfuO9VDJC/QxuOFjoLAdfTd6ZaexgsU UkG9Anckr1HQ2BRuJuEIKQ2dDuUj28Yc3TgU5ZuREjO91lVjJq/75aqp/1lkhh3ZTaDJ OshpJaqQoduqZsKindLXXbrpwsKQJekBRgEIzVHL9w56WieizzH+HumGiJ/CO/lrtqdP q40hthDLjxLSCNHoWX6uTQtrnL80LLmkDvInLPjW8geV5k6BZy59PmvL6FrOaWXXSlmv Xjm8tUFId5RBUo5dxmo1Fz/DZ6Z1GBvhkXPc23JAkOIeRWkF8lOuYER+J1kp0vAl1WsV Rw== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3qf77c0we1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 09 May 2023 05:47:25 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3495JB4T001645; Tue, 9 May 2023 05:47:24 GMT Received: from brm-x62-16.us.oracle.com (brm-x62-16.us.oracle.com [10.80.150.37]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3qf82v5m4u-1; Tue, 09 May 2023 05:47:24 +0000 From: Jane Chu To: dan.j.williams@intel.com, vishal.l.verma@intel.com, dave.jiang@intel.com, ira.weiny@intel.com, willy@infradead.org, viro@zeniv.linux.org.uk, brauner@kernel.org, nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH v4 0/1] dax: enable dax fault handler to report VM_FAULT_HWPOISON Date: Mon, 8 May 2023 23:47:13 -0600 Message-Id: <20230509054714.1746956-1-jane.chu@oracle.com> X-Mailer: git-send-email 2.18.4 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-09_02,2023-05-05_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=751 malwarescore=0 adultscore=0 mlxscore=0 bulkscore=0 suspectscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305090043 X-Proofpoint-GUID: HsApzT22YVGaDpzF_HEaS5RLcoOczj-A X-Proofpoint-ORIG-GUID: HsApzT22YVGaDpzF_HEaS5RLcoOczj-A X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765016547323631332?= X-GMAIL-MSGID: =?utf-8?q?1765394440768165694?= Change from v3: Prevent leaking EHWPOISON to user level block IO calls such as zero_range_range, and truncate. Suggested by Dan. Change from v2: Convert EHWPOISON to EIO to prevent EHWPOISON errno from leaking out to block read(2). Suggested by Matthew. Jane Chu (1): dax: enable dax fault handler to report VM_FAULT_HWPOISON drivers/dax/super.c | 5 ++++- drivers/nvdimm/pmem.c | 2 +- drivers/s390/block/dcssblk.c | 3 ++- fs/dax.c | 11 ++++++----- fs/fuse/virtio_fs.c | 3 ++- include/linux/dax.h | 5 +++++ include/linux/mm.h | 2 ++ 7 files changed, 22 insertions(+), 9 deletions(-)