Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2269910rwb; Mon, 7 Nov 2022 11:11:10 -0800 (PST) X-Google-Smtp-Source: AMsMyM40U2J28/gcILVtO1CsJVvaDDnjBlI+zIen2JYY6p671PfNcqDS50EctCODunhP7/bkM91D X-Received: by 2002:a63:c14:0:b0:456:d887:c83 with SMTP id b20-20020a630c14000000b00456d8870c83mr45408853pgl.53.1667848270568; Mon, 07 Nov 2022 11:11:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667848270; cv=none; d=google.com; s=arc-20160816; b=Sci9yYGm1AfruwJsgO22FKtwEDrTzqw1agAM69KiOhNpHJvNaWgw/Tt2JNKLfzttR7 1qrHZb50jHWW6WeRLlJJXFH/gA2XHN82JjibIZ6s1fcntyfB9m6+fvRFmj5Mar+Wjsao +XSZ2skdKlGyP2jUL59ooacubeZ4/Mr2D2aT7Wxjciuoi2N7MM85+kW7jxIu8G6XbxPq ym4CoRuFvNWBZJZQ+sxZzn3Qhgn7XJ0qEqgdVheSpmLNApQQIa52DcYrGWLSsu8PiSnR yoGscLxu6D2gYk3NiQIPAB75xqkmPd8Kbcj4ujxMhnU/f/Aj+NVS5wPMJt2y165nH5bw kSgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=6F6Iijyy/39XMB5DWSlZ4cyFVlxZqZqXMo2iBv4u9CM=; b=i3scFL6cVWL/6wr7fi+hGwQdqOs8dhJqMagxt/aI0GxleeKC9g+Ca5a0/pOhqll5qv VdTa60AjO06ZxNCpxeSt2rpHLzpWXUUs0HuUAf+JewazdOdqNkvTH37BzUmxLUmh28m7 vSHBHS64iTPZClWrlKNolCs58myb1H2YEyak0ntdCmJ4KH+lMrMeU2BpOG1DuCqMwlsH RbWH5fXoOxSxTDjNcUr6iLguL2H1OyBk/sUmIU06RHHflaWSg4QCuWGfXgAeq8CmNr0b ySmguRvBB0WZmz7TdU8bLf+rNv4LBsqCCiKxoiE/XNcdcpOh4KQ4xKKsl3OqonXQw7pg XWjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=KnjutuB4; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m12-20020a170902bb8c00b00174ea015ee8si10009607pls.592.2022.11.07.11.10.58; Mon, 07 Nov 2022 11:11:10 -0800 (PST) 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=@gmail.com header.s=20210112 header.b=KnjutuB4; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232862AbiKGSuv (ORCPT + 92 others); Mon, 7 Nov 2022 13:50:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232800AbiKGSus (ORCPT ); Mon, 7 Nov 2022 13:50:48 -0500 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA86C20BE1 for ; Mon, 7 Nov 2022 10:50:47 -0800 (PST) Received: by mail-pl1-x62e.google.com with SMTP id v17so11909638plo.1 for ; Mon, 07 Nov 2022 10:50:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=6F6Iijyy/39XMB5DWSlZ4cyFVlxZqZqXMo2iBv4u9CM=; b=KnjutuB4R3SwMHEc5hufYGnDlgQTQIzehE4y/tIoueLHrhYyJj7FX813dKiht99s5Z /j2LirqdNiHU4DG4JULK3cYIDOOllICNuZLgo8tsJxipEsCSjD1zuuPx8KEhsEtTAcv+ hvw4N8LDFlFcPTwSC6gl/jMo1wDUocbJXM18MCV1L5b6d6260j0gQPH7mXHjaMs4xmS4 hj0iWKkvhtK2mwvWu5zwhh61pKPr2u0iXh5DvOmKAV5stpUS60mJO1aoi0B+33b2ygOE uz74UcaXUCJLX731mvZA1egMCcZLB22Ahe+JkjTVvXIcxtRZMJm4gjulMlBwfSTGBm0u YK0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6F6Iijyy/39XMB5DWSlZ4cyFVlxZqZqXMo2iBv4u9CM=; b=ewBzCLcW/UqPLY634L7SUJwUwz6+aTZN43GEYWXhsd7TsL9viP0BgVvNyRVD+x2xeu EnGq4whK7uYjnMYeNhHePzeXG1XNPti1m5AIsZQzHjpLiPN3sD10UlfLfd9j3+FdGdYg UwjojeWkkd5sLKx85SMADLiVlBUy1EyIBxqhIrvnX35hlxtssmDc7gmeIszoH7CaUhuI IC/iM4KlAg00pCW/w86t3sVgYusRbeqhE8UXR1eL8WK8UVMo9ZF6batxml0gt05ikI/l MyS3lx+2YPJ3PE6ZVdLHN0RP0FXCSwQav/+Q1guCPExNeFJbqlENlIxX+NVu/OqeSlpy j3VA== X-Gm-Message-State: ACrzQf1NzMwxUevVrauwkhMlGeQTFfiUcjH25FFhZEaleacaRnSA9Ck4 FUdjm0rDORU32YrZAVTj/opdeURx2FmzcmR/shE= X-Received: by 2002:a17:90a:558c:b0:213:8cf1:2ac2 with SMTP id c12-20020a17090a558c00b002138cf12ac2mr56909211pji.67.1667847047525; Mon, 07 Nov 2022 10:50:47 -0800 (PST) MIME-Version: 1.0 References: <20221018200125.848471-1-jthoughton@google.com> <20221104021035.GA297167@hori.linux.bs1.fc.nec.co.jp> <20221107042544.GA436198@hori.linux.bs1.fc.nec.co.jp> In-Reply-To: <20221107042544.GA436198@hori.linux.bs1.fc.nec.co.jp> From: Yang Shi Date: Mon, 7 Nov 2022 10:50:35 -0800 Message-ID: Subject: Re: [PATCH] hugetlbfs: don't delete error page from pagecache To: =?UTF-8?B?SE9SSUdVQ0hJIE5BT1lBKOWggOWPoyDnm7TkuZ8p?= Cc: Mike Kravetz , James Houghton , Muchun Song , Miaohe Lin , Andrew Morton , Axel Rasmussen , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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 Sun, Nov 6, 2022 at 8:25 PM HORIGUCHI NAOYA(=E5=A0=80=E5=8F=A3=E3=80=80= =E7=9B=B4=E4=B9=9F) wrote: > > On Fri, Nov 04, 2022 at 06:27:44AM -0700, Mike Kravetz wrote: > > On 11/04/22 02:10, HORIGUCHI NAOYA(=E5=A0=80=E5=8F=A3 =E7=9B=B4=E4=B9= =9F) wrote: > > > On Tue, Oct 18, 2022 at 08:01:25PM +0000, James Houghton wrote: > > > > This change is very similar to the change that was made for shmem [= 1], > > > > and it solves the same problem but for HugeTLBFS instead. > > > > > > > > Currently, when poison is found in a HugeTLB page, the page is remo= ved > > > > from the page cache. That means that attempting to map or read that > > > > hugepage in the future will result in a new hugepage being allocate= d > > > > instead of notifying the user that the page was poisoned. As [1] st= ates, > > > > this is effectively memory corruption. > > > > > > > > The fix is to leave the page in the page cache. If the user attempt= s to > > > > use a poisoned HugeTLB page with a syscall, the syscall will fail w= ith > > > > EIO, the same error code that shmem uses. For attempts to map the p= age, > > > > the thread will get a BUS_MCEERR_AR SIGBUS. > > > > > > > > [1]: commit a76054266661 ("mm: shmem: don't truncate page if memory= failure happens") > > > > > > > > Signed-off-by: James Houghton > > > > > > I did some testing and found no issue. So I agree with this patch. > > > Thank you very much. > > > > > > Tested-by: Naoya Horiguchi > > > Reviewed-by: Naoya Horiguchi > > > > > > As for whether to go with HGM patchset or not, I have no strong opini= on. > > > As you stated in another email this patch is correct without HGM patc= h, > > > so it's OK to me to make this merged first. > > > > Thanks Naoya. > > > > This is a late thought, but ... > > Should this patch and Yang Shi's shmem patch be backported to stable re= leases? > > Both address potential data corruption/loss, so it certainly seems like > > stable material. > > Yes, I agree that backporting these could be helpful. +1 > > So I think that I'll try to backport commit a7605426666 and its dependenc= ies > to 5.15 (and older LTS if possible). For this patch, just adding "Cc: st= able" > should be enough for now. Thanks, Naoya. > > Thanks, > Naoya Horiguchi