Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1773100rwl; Wed, 12 Apr 2023 18:59:01 -0700 (PDT) X-Google-Smtp-Source: AKy350YjMBv+q/zeLdoiubl7BSUNXjWXbaDCfQBlBH2/vNVuCxyVfAo8fHKGg8vodQ8XuRhf0oeM X-Received: by 2002:a17:907:72d4:b0:94e:50df:4659 with SMTP id du20-20020a17090772d400b0094e50df4659mr1163938ejc.17.1681351141315; Wed, 12 Apr 2023 18:59:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681351141; cv=none; d=google.com; s=arc-20160816; b=0E2QkUuLmDffjrIn1y67ENXmzKdMCpU6Mif/tIUzDqSJCbpe2RNhtxS8VPjV0hriTD Y8Jc2HKKV15KlMlOGdaVaKz1bi+GGusFbQRemihYrvOOz/hw8+/p+mlrfImd4l1RiKdc UL211JLjVN7CH61yAcC5CoFSMI24IL9ba70AfvZbTpmn89B/e+mVU6sLvlKAhmNdr1uR YZRjv3s0XoGuXNnfbGoaHTq6Tcm+XUAcrE3YBLVr0rRFp5MbU3+mlAwCuM3ydHq/Mp2v 9N7D76wi+bdDqMEXeHmxFl1MAi/IA451n5MsYtpX5pa+h6EPsjyXi8h4EEu8jUERv3Ft qUeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=rxwff+szEQSkCG3SGmzem2rBE2uIjaY1ggEPejQ+vGA=; b=xfsP7V6Ql2eM+qGO67HR1nfigRUI/Sx0RzuNjdGjygn8gXQJlHoLSW4hTa/MlCbel1 NGuKXQIBixV2k8pMvkjcc68X1h9HZiNsK6wJK7EaNUi/YRGEXKxW7hdO6/CBdQGjjXGP YdTnClPo1TDJGKx9a1160mTZAxgkN0guo5TuKtuxO/hU/MHI9Q7EeT3y2jd63MNjMqY1 jzekNXno+XgeU9G26mVq3Xq16mAhK0jlY1UTCf+nAmdQE1ynzjFWigr330cqqPDrMAT/ em7bGJwXcTbcVwJOnAkfRjivjtMLIXKJuX5sGHeSgTDrd0Azwz8tXXoFG+eFsHbl/aEx Rhiw== ARC-Authentication-Results: i=1; mx.google.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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eu6-20020a170907298600b0094e83d31b2asi412685ejc.502.2023.04.12.18.58.37; Wed, 12 Apr 2023 18:59:01 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229696AbjDMBzh (ORCPT + 99 others); Wed, 12 Apr 2023 21:55:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229506AbjDMBzg (ORCPT ); Wed, 12 Apr 2023 21:55:36 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 305DE59ED for ; Wed, 12 Apr 2023 18:55:35 -0700 (PDT) Received: from dggpemm100009.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4PxjLw5zTszDsg7; Thu, 13 Apr 2023 09:54:48 +0800 (CST) Received: from [10.174.179.24] (10.174.179.24) by dggpemm100009.china.huawei.com (7.185.36.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 13 Apr 2023 09:55:33 +0800 Subject: Re: [PATCH -next] mm: hwpoison: support recovery from HugePage copy-on-write faults To: Andrew Morton , Mike Kravetz References: <20230411092741.780679-1-liushixin2@huawei.com> <20230412181350.GA22818@monkey> <20230412145718.0bcb7dd98112a3010711ad0b@linux-foundation.org> <20230412222138.GB4759@monkey> <20230412155618.720e6b3aa5be6444f7889ea6@linux-foundation.org> CC: Naoya Horiguchi , Tony Luck , Miaohe Lin , Muchun Song , , From: Liu Shixin Message-ID: <5202b6fe-7008-6e1b-eaae-03edbe7c055c@huawei.com> Date: Thu, 13 Apr 2023 09:55:32 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20230412155618.720e6b3aa5be6444f7889ea6@linux-foundation.org> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.179.24] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm100009.china.huawei.com (7.185.36.113) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 2023/4/13 6:56, Andrew Morton wrote: > On Wed, 12 Apr 2023 15:21:38 -0700 Mike Kravetz wrote: > >>>> Commit a873dfe1032a ("mm, hwpoison: try to recover from copy-on write >>>> faults") introduced the routine copy_user_highpage_mc() to gracefully >>>> handle copying of user pages with uncorrectable errors. Previously, >>>> such copies would result in a kernel crash. hugetlb has separate code >>>> paths for copy-on-write and does not benefit from the changes made in >>>> commit a873dfe1032a. >> I was just going to suggest adding the line, >> >> Hence, copy-on-write of hugetlb user pages with uncorrectable errors >> will result in a kernel crash as was the case with 'normal' pages before >> commit a873dfe1032a. >> >> However, I'm guessing it might be more clear if we start with the >> runtime effects. Something like: >> >> copy-on-write of hugetlb user pages with uncorrectable errors will result >> in a kernel crash. This is because the copy is performed in kernel mode >> and in general we can not handle accessing memory with such errors while >> in kernel mode. Commit a873dfe1032a ("mm, hwpoison: try to recover from >> copy-on write faults") introduced the routine copy_user_highpage_mc() to >> gracefully handle copying of user pages with uncorrectable errors. However, >> the separate hugetlb copy-on-write code paths were not modified as part >> of commit a873dfe1032a. > Sounds good. So I assume cc:stable is desirable. > > I can't actually get the patch to apply to anything. Can we please > have a redo against current -linus? OK, I will apply this patch to mainline again. > > . >