Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6923403rwp; Tue, 18 Jul 2023 07:40:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlFQNpRkdUsYthx0ONEKC4pWDE996XZ7YqNFFOe8ShHZofjJrrpXEzMnWu+cDZszH4S9Hmmx X-Received: by 2002:a2e:9890:0:b0:2b5:7fba:18ac with SMTP id b16-20020a2e9890000000b002b57fba18acmr14427313ljj.48.1689691248263; Tue, 18 Jul 2023 07:40:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689691248; cv=pass; d=google.com; s=arc-20160816; b=g6BgdtY4PBKk5osWFOfyCGyWkkTd14QFZTDvpkWxm7g7V/E8QV0U0v8bOX0Rs6H89F UzDHAZQXZ2DEaZs08agkgdv3lA5ilbrSveNAHLlsQISSzfaVajLrsWZoj3zf410EtHyq X1CFmIFJapcPxd8F7hc+VKfhbRmGVqZSBycYkA9EPrG/HbZCm0l0YgATLl7CcIqiYFut b4VJT8gfsJ58xgSnZ5EKV0GSz3vMZWD5iEM+0cwXWu3PY76srci1vdyY/zMJBWyCvsEW desnHONiD8CA8uf4A368Z2VZjWM0z7FDqkEkhBqdsgHfYoyTcpIqm6YXJNZ4YqC6Rm72 QBPQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature:dkim-signature; bh=pLgJS/7XCewpCSZ5K3YHA+yeLj3wS8pdyKYKExN0qHY=; fh=u75Kpv6/mg1oJk6EtfwObTAS2KuXeh1iFVpoE/E8CV4=; b=PvRy7yFCGz8sNeatYQYzICqSTMYI1HEgYpcTwKHJhm8FPhDwLfMbN+XVhoN032dSRu nP+M1USb//i0Mboq1WxRXyO0FVoGP653BO5yzsJ6tgX7O3Uw/Y+6QbaG5UR5SvdebSAU K4EEbP7YNJzzPc8XFMNhlBVOKnj59KzjRM5vL+jLOp7x9Jxo4bn4ckH4VrAwo1YHM5ns Fw8TRd/yQr5dTs1pCrmOJxHifw9fTOAusbVpGZH5SXBi/m2CbBeg7N3HdTNXDLiDDIXw 31mKMYLV330ytiQX5M6ThVKN4AADJ4ceMHyhvLJnjsOfiqxNwGUJ7Imize+zxls7UUjH 5LTw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=xwFSVsGh; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=GlRDtRNp; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t7-20020a1709063e4700b00992d26308c0si1314332eji.538.2023.07.18.07.40.23; Tue, 18 Jul 2023 07:40:48 -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=xwFSVsGh; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=GlRDtRNp; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); 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 S232692AbjGROdN (ORCPT + 99 others); Tue, 18 Jul 2023 10:33:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233289AbjGROcv (ORCPT ); Tue, 18 Jul 2023 10:32:51 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4E001BFB; Tue, 18 Jul 2023 07:32:11 -0700 (PDT) Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36ID7mMK027462; Tue, 18 Jul 2023 14:30:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-03-30; bh=pLgJS/7XCewpCSZ5K3YHA+yeLj3wS8pdyKYKExN0qHY=; b=xwFSVsGhK2Wt0eD9cnoIp/zb+r39J5xzVJW/HzQPCJJSi3LyineTL0a5jXnh2/mAMrjQ SHPzCWxUnJ3gmzHkjGmYhQzwAYVqQ964ErMZmn8lEuIvhKRGk1BZA2qbHeq5nCin4E6p mWxVCkkl/PMzwfhe40D5UAi+VRWI/2Mz9kgR7LUWu34YF+MSO4NlAclc/oma2d6gJHue PAZIY36uEuj8wpDId6gyylGLANkIfZxeXfud8U2xMHCH3hGy5K8FjmIjqpH6G6/4rf8J FWLYoihhnR9F6WGBcuIC89dw/qXweY7kz0R+NU2TvWHv+wyMmk3kHejFoJTD0ZA1amHa /A== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3run7855xq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 18 Jul 2023 14:30:30 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 36IEB4ss000858; Tue, 18 Jul 2023 14:30:29 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2175.outbound.protection.outlook.com [104.47.57.175]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ruhw56dud-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 18 Jul 2023 14:30:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gZO08mT2trdDBcrF3coTxUiGYEsxp7VtbEZdZjQpNJ+zj4BJBmaolyRNbpEmkjfiSulRuod6AQsfvFWca1c/URs8VY8V0LMI6VMgamGGNyHjQLLLHZLaXKjgnNsNvtNdrHDnsEmm6mDZvnQDotgMoqJ5Srvl3ug7dQ6KIPaOc9UYns4d/B14vgXdaiqiJjWOOJuE/B7dmnkQ2PsNslvy6qIIY772v04na5E0f34RADl0PL0du+iP2cUVic5KiZK2Td1sqWVkhWfelwb/6KRtqN1fQ4Hlm/OCQUVAoKZ21lf0uDYkfRrMDYTnnNBxkukqImVEEm/SkYbWMXol9JA7/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pLgJS/7XCewpCSZ5K3YHA+yeLj3wS8pdyKYKExN0qHY=; b=c+hRu3uvDtknBSmHG97WGOjk1SUxJ8jV0WEbn+iJJ9Ap4+CdXvDzm5wmNqj1me5XlCxCDjRYo6hy3h6d7iM6JLi7IYFp+q+lQfX5RrrA/At4WI0JAWSlkFsI8IgLJyF4OGLpydL3jt+7SfiMrPs77hcEqvapE7LbpwGyCPmoVdCim7VdgG+VGm8XDzXh7m/gO//c8ngechmOZ2gHwjANkO28HMuXAXOQdFHUgrbViI3J+KT29EIg6fIUkWRTXL6KFLS8EdCMgJLJX9wGODzPaLFAOIAIMnC8sYq8cNGlIjDcGY/TV66HyzC+Gk6+o4yRXDJwkC4YUOoPtdmFK/dEPg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pLgJS/7XCewpCSZ5K3YHA+yeLj3wS8pdyKYKExN0qHY=; b=GlRDtRNpV4UnAhQ8ujfAoPQ1zCewgBIBv5tkRCy29GSyHfvmw0gi/MbQeXOhj6ET4BF+Yyfo/UwtVP9wwMflSFmZ9LgImTOoPLoaKAsY6Wyu9aROt8JfxTW/+XqqTBuuK9pCBNoUvkikCd/HFWGLgZIntJdK1W+Rh2xCfYaobpU= Received: from CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) by DM4PR10MB6253.namprd10.prod.outlook.com (2603:10b6:8:b7::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.31; Tue, 18 Jul 2023 14:30:27 +0000 Received: from CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::6bff:7715:4210:1e52]) by CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::6bff:7715:4210:1e52%7]) with mapi id 15.20.6588.031; Tue, 18 Jul 2023 14:30:27 +0000 Message-ID: <6736667f-6456-34b5-1d1f-47219e499001@oracle.com> Date: Tue, 18 Jul 2023 07:30:23 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] mm/memory-failure: fix hardware poison check in unpoison_memory() Content-Language: en-US To: Naoya Horiguchi Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, willy@infradead.org, linmiaohe@huawei.com, naoya.horiguchi@nec.com, stable@vger.kernel.org References: <20230717181812.167757-1-sidhartha.kumar@oracle.com> <20230718001409.GA751192@ik1-406-35019.vs.sakura.ne.jp> <20230718003956.GA762147@ik1-406-35019.vs.sakura.ne.jp> From: Sidhartha Kumar In-Reply-To: <20230718003956.GA762147@ik1-406-35019.vs.sakura.ne.jp> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SJ0PR03CA0061.namprd03.prod.outlook.com (2603:10b6:a03:331::6) To CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH0PR10MB5113:EE_|DM4PR10MB6253:EE_ X-MS-Office365-Filtering-Correlation-Id: 1e446aef-b85a-4972-d7a5-08db879b87b5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /EGmqPjm0MzElYipoCA2zI3H1U/m60BKvxrNEiMD6PkGzxlcSs+9Bll1aMNDOfmpTdHVrlhiMPsAKwZkH8EP0wpPi4YGEMXfv19/7odWH+r9hCzPnxOpIqwbuo8hfXex7L2LV2q+iXK/dChfg4TW9A03m7wG4Afa8xalVOwXkfOM5fiajXzp1WELukAyM1imA1G5Q3SBP5+IHH+YGPTOyNNUH1eKij7bZdV+wUEbUdgtUlMfFQDPUim3BPhRdJqdL0cA9KLhfInNf9qPrCrnLRa92AqwsEv4cak4jStn4EpuQTXAVXxCDDHuMK/XO/EZjol73fYrk+gmU7NzP/owpRyu9mUDXW94HToJnPCP4rn0VGyrItXMzRjJi8tGXSg64kLWPNgFMLC6sw4B5mKYBe/k5CNiHVwLnAGfI/N0F2SVyGXLz84gGwwnSCSd33CSn1C+vzA1S4TLp0vMT7V9GXIo8lzjFNKNqi1wtBYj7KoDeI+Zd3aqT/RD0bsMdJz2dkFgNixacuJvylIGAf8IxCJXdBmGJUACWWl70xRVJ5LVUAqnyNZ69zI9KSvZ7GpMs1dOqx5l12ZdK2xwvU4kDJFI8zj79K6MJunpwiNpx7EYpAeQZqYc10MByjEBdr7PwUWxY4cZ80w10ZaE2My/gw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH0PR10MB5113.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(136003)(376002)(39860400002)(396003)(366004)(346002)(451199021)(6486002)(53546011)(6506007)(966005)(38100700002)(36756003)(86362001)(2616005)(83380400001)(31696002)(186003)(6512007)(8676002)(8936002)(2906002)(41300700001)(478600001)(44832011)(4326008)(316002)(6916009)(66476007)(5660300002)(66946007)(66556008)(31686004)(6666004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SXl3cE9yeGVVRjJzemRyeUlzK0MyRDd1MG1lNEdsMHdHWWkwYnVVY2EzZnFR?= =?utf-8?B?ZzNmOGtlcDhrd1hKTWR2ZUlCWElHeEY4dFFqOVFwVENZNTRJdWZyQ3ZZbU1k?= =?utf-8?B?Z25iQ1dSN05jL1BLY21QOFVXTU1UaDhOd1YxdTFjZzV5S3czQit2MW1WQTZt?= =?utf-8?B?bkJGQ3Q0NnJXbEdVay9sVi9VcE5uaWMxdVEyN0RIOWtnODcxaC9LVk1NYUE4?= =?utf-8?B?dTdQUzNpRVVQay9wMktRdmg5NkFvSVBS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cWlZOHlLTXVYb2dPZHhNbU1GWU1LdzVFSjhxWTdlK25aT3pGUHJWNHBMVkxn?= =?utf-8?B?QlVvM2xXZXNCR2V5d3dISTZvSDNyWEFRYUlsRzBQUmV3a0pXMVgxc2sveVhI?= =?utf-8?B?VlR6L2tsWUhsZjBVU0dZdHNsSDRTNGYxN3pYRGNOSnUzV2ZacVppczFlM0p5?= =?utf-8?B?Z2VSenBESjNlRWphdU51N1Rsd0NzVjFJMUxBM1orcTRKa0VtMEo4bmdGQjdj?= =?utf-8?B?a1o0cWRCSXBrR2ZQMXI5aUY5eis4UXc2NlM0c3ZtVnlmWlNxVDJLY3RQMEZQ?= =?utf-8?B?WkJKSi9YTW82T3NSK09BUUJLTWR1a0VJb0VyYkFVdGRSVW12M1VDVDJCajNK?= =?utf-8?B?bE1KUFFWbVpMQ3dCK0pxdW9OM2xCbmFueXVkSStuRnArUk5qbnRDb1daNDk2?= =?utf-8?B?cjErS0lGZlFTT3puVmhQMFZycVZJV0wwVEUrUm5kejhKMjRWU1NIOUJ4ODNG?= =?utf-8?B?SGxNM29OL2RrOW90RjRTbGFmVDhHNUk3L2xvN1l5dEVaaGp5R1A4R3JIbS9y?= =?utf-8?B?cWsyWG9qT0prMDAvMmE3c3dpa0MyWllnOHNxS3hFSVkxaWM2NDNZTkp2Tzdw?= =?utf-8?B?M3o4OFZVbk5WSVRKTmVFOFZteXp0OFhrWXpTTjVBRkJFRUNQQT09?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1e446aef-b85a-4972-d7a5-08db879b87b5 X-MS-Exchange-CrossTenant-AuthSource: CH0PR10MB5113.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jul 2023 14:30:27.0657 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: q9t+8OscEhml/Otd5Zv1fvimePL+PdxyV7H934dOWPJbCDHPJ+ORRNrmrnbAaDB3BeVRmo5JKeHOU8NWvcoOWb+rvvKgQEIWx8QGmeh/5/0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR10MB6253 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-18_11,2023-07-18_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxlogscore=999 suspectscore=0 phishscore=0 bulkscore=0 mlxscore=0 malwarescore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307180133 X-Proofpoint-ORIG-GUID: QpJ2YtJleThNApTd8bszMPDyLrwatkK4 X-Proofpoint-GUID: QpJ2YtJleThNApTd8bszMPDyLrwatkK4 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, 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 On 7/17/23 5:39 PM, Naoya Horiguchi wrote: > On Tue, Jul 18, 2023 at 09:14:09AM +0900, Naoya Horiguchi wrote: >> On Mon, Jul 17, 2023 at 11:18:12AM -0700, Sidhartha Kumar wrote: >>> It was pointed out[1] that using folio_test_hwpoison() is wrong >>> as we need to check the indiviual page that has poison. >>> folio_test_hwpoison() only checks the head page so go back to using >>> PageHWPoison(). >>> >>> Reported-by: Matthew Wilcox (Oracle) >>> Fixes: a6fddef49eef ("mm/memory-failure: convert unpoison_memory() to folios") >>> Cc: stable@vger.kernel.org #v6.4 >>> Signed-off-by: Sidhartha Kumar >>> >>> [1]: https://lore.kernel.org/lkml/ZLIbZygG7LqSI9xe@casper.infradead.org/ >>> --- >>> mm/memory-failure.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/mm/memory-failure.c b/mm/memory-failure.c >>> index 02b1d8f104d51..a114c8c3039cd 100644 >>> --- a/mm/memory-failure.c >>> +++ b/mm/memory-failure.c >>> @@ -2523,7 +2523,7 @@ int unpoison_memory(unsigned long pfn) >>> goto unlock_mutex; >>> } >>> >>> - if (!folio_test_hwpoison(folio)) { >>> + if (!PageHWPoison(p)) { >> >> >> I don't think this works for hwpoisoned hugetlb pages that have PageHWPoison >> set on the head page, rather than on the raw subpage. In the case of >> hwpoisoned thps, PageHWPoison is set on the raw subpage, not on the head >> pages. (I believe this is not detected because no one considers the >> scenario of unpoisoning hwpoisoned thps, which is a rare case). Perhaps the >> function is_page_hwpoison() would be useful for this purpose? > > Sorry, I was wrong. Checking PageHWPoison() is fine because the users of > unpoison should know where the PageHWPoison is set via /proc/kpageflags. > So this patch is OK to me after comments from other reviewers are resolved. > Hi Naoya, While taking a closer at the patch, later in unpoison_memory() there is also: - ret = TestClearPageHWPoison(page) ? 0 : -EBUSY; + ret = folio_test_clear_hwpoison(folio) ? 0 : -EBUSY; I thought this folio conversion would be safe because page is the result of a compound_head() call but I'm wondering if the same issue exists here and we should be calling TestClearPageHWPoison() on the specific subpage by doing TestClearPageHWPoison(p). Thanks, Sidhartha Kumar > Acked-by: Naoya Horiguchi > > Thanks, > Naoya Horiguchi >