Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1614519rwl; Wed, 12 Apr 2023 16:07:23 -0700 (PDT) X-Google-Smtp-Source: AKy350bMRE3j4yabkDjJXBg8chKJDxoRDyYmgNhUeekbg/XjJEtFFvecqdoRfjz7eTZNcYsL/HWN X-Received: by 2002:aa7:dcd0:0:b0:4fa:b05e:ced5 with SMTP id w16-20020aa7dcd0000000b004fab05eced5mr271015edu.36.1681340843178; Wed, 12 Apr 2023 16:07:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681340843; cv=none; d=google.com; s=arc-20160816; b=T2aJwagixGSGpw0lwfZY4stOrDrO/YJu5PMWXtPapUDoHprCyykX4vACapTPWEeTet S1xFaxUGtWjy7O3dbGZs/KV8kKYhuPIEmvY5NUgIzPz1vuB0uJe06ZonYwK8FQqFC5G0 T8YxbvJUqu5KAOoa+SuRUD0SrXfP4nKG5E82L2tFl6SdnK41S1S8JuXzu3WfUbjsLbTT 97wjpm3GptvNITv0b5C9yS2B1xHY7GwGDpSmHYgREWzLfeH/glMB3GnJsCrNJsmder+X 5iPq1MbEhUvY3pBwOQBcHUXSoQmwW61BLnNSdMWDqH+IgxHWGTfd7Oits3vIcqUoFXY5 9WXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=i4VS+DBn2sjM+eIZCl4NYTVUECxh6Jb6TD0Y9nsazBA=; b=iAhBMpiMIU/PcbyqEFJequd9WkoGsMCbJ/AIkN3NATgqCSBVBRMFrD3/J8LJQTCyc4 tB8WWNfr9T2Z28ntrEtLZIe2Yh4sW2AcOeaAsxM4XVwSo+34oqNUYP7kSPvQOprEqUAP 0pToE4UNpbU1DQQWvoyc80n43N1M6BEN8oSRS5rEi0Xb+JTNM7J+TBilxz3sXJmxGRUI UK8QC83Z7RjmGUBqQT+/vWjQe8/lLPN0OlO1v20hRKt2Tx2sdzc5NCOcSdtICssiybdf cuMsk5T6qX5USlTLQZju3ZFq/i1mlV2uINDi2OnJ5MZgk80dbbxCoiJQucZ/ROt5Iugq vMVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=vABntK2I; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k21-20020a05640212d500b00504b9937dc1si120755edx.171.2023.04.12.16.06.59; Wed, 12 Apr 2023 16:07:23 -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=@linux-foundation.org header.s=korg header.b=vABntK2I; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229720AbjDLW4W (ORCPT + 99 others); Wed, 12 Apr 2023 18:56:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbjDLW4V (ORCPT ); Wed, 12 Apr 2023 18:56:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54027109 for ; Wed, 12 Apr 2023 15:56:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DE84F612D2 for ; Wed, 12 Apr 2023 22:56:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19444C433EF; Wed, 12 Apr 2023 22:56:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1681340179; bh=1O/8VJdwC6exTtvaS31U9tPVXqQob2pb5H8yDpg2h4Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=vABntK2I8QKsI+0yaF7DesF+cF4ljqLZYifsghCGmVHxBmiQ95zGZS3qYrH39NxwM sGO15KX24Zh35lv60lXUqlttfQxZ2leJN8butFLzzH3CaOSxXkolNPeDqAyiC8WFv+ aT2CKd7AoFCPsw4o8yZEfDTm0EZZy7e1rWRcdq+w= Date: Wed, 12 Apr 2023 15:56:18 -0700 From: Andrew Morton To: Mike Kravetz Cc: Liu Shixin , Naoya Horiguchi , Tony Luck , Miaohe Lin , Muchun Song , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next] mm: hwpoison: support recovery from HugePage copy-on-write faults Message-Id: <20230412155618.720e6b3aa5be6444f7889ea6@linux-foundation.org> In-Reply-To: <20230412222138.GB4759@monkey> References: <20230411092741.780679-1-liushixin2@huawei.com> <20230412181350.GA22818@monkey> <20230412145718.0bcb7dd98112a3010711ad0b@linux-foundation.org> <20230412222138.GB4759@monkey> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 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?