From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA8E2C7619A for ; Wed, 12 Apr 2023 00:26:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229632AbjDLA0V (ORCPT ); Tue, 11 Apr 2023 20:26:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229503AbjDLA0U (ORCPT ); Tue, 11 Apr 2023 20:26:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DFC8D3 for ; Tue, 11 Apr 2023 17:26:19 -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 25D3960F05 for ; Wed, 12 Apr 2023 00:26:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40B07C433EF; Wed, 12 Apr 2023 00:26:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1681259178; bh=mpIpA+1gb4NUMq4biGISkWZOSJ4nEB3zKh/uw92n970=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=I6btUPV5HS9K5fv290/6tGSVD4ZMsyWvRAb4GRYu2FSoTL82LXKNKwswdW0MlRqUN zdo+lE/zEw27/cwykcb1w7FZdRWt6P3ItVbVIoyLJkaCV33lVXpDEE878M3KiIukiB lu4r9a1zFPCcZSHEh31QKFi1xfC+JiWNq47UBeAA= Date: Tue, 11 Apr 2023 17:26:17 -0700 From: Andrew Morton To: Liu Shixin Cc: Naoya Horiguchi , Tony Luck , Miaohe Lin , Mike Kravetz , Muchun Song , , Subject: Re: [PATCH -next] mm: hwpoison: support recovery from HugePage copy-on-write faults Message-Id: <20230411172617.13bc444955f51653b170f744@linux-foundation.org> In-Reply-To: <20230411092741.780679-1-liushixin2@huawei.com> References: <20230411092741.780679-1-liushixin2@huawei.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 11 Apr 2023 17:27:41 +0800 Liu Shixin wrote: > Patch a873dfe1032a ("mm, hwpoison: try to recover from copy-on write faults") > introduced a new copy_user_highpage_mc() function, and fix the kernel crash > when the kernel is copying a normal page as the result of a copy-on-write > fault and runs into an uncorrectable error. But it doesn't work for HugeTLB. What does "doesn't work" mean? Please fully describe the user-visible effects of the issue which this patch is addressing. > This is to support HugeTLB by using copy_mc_user_highpage() in copy_subpage() > and copy_user_gigantic_page() too. > > Moreover, this is also used by userfaultfd, it will return -EHWPOISON if > running into an uncorrectable error.