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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E365C4332F for ; Mon, 7 Nov 2022 18:50:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3D6376B0075; Mon, 7 Nov 2022 13:50:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 386538E0002; Mon, 7 Nov 2022 13:50:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 24E0F8E0001; Mon, 7 Nov 2022 13:50:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 1770A6B0075 for ; Mon, 7 Nov 2022 13:50:50 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id D87001A0F7F for ; Mon, 7 Nov 2022 18:50:49 +0000 (UTC) X-FDA: 80107537818.13.E7A2CD2 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by imf09.hostedemail.com (Postfix) with ESMTP id 74DCB140008 for ; Mon, 7 Nov 2022 18:50:48 +0000 (UTC) Received: by mail-pl1-f180.google.com with SMTP id p12so6391662plq.4 for ; Mon, 07 Nov 2022 10:50:48 -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=mZuj2jVqEMfaP838o2l5wKh8tHvKSs+/DNU1j562XSZtu2m7Yw2cFovNliLnRSXE7P 5COxowBJTEijGgbhsqWDJsN86I9ffuA57lJqLPK0FaCJynwj8q3+ahx2knTNA64qLCgQ Kw2ISun6I8IL0uky2RscrB+m3BTdZxYBMDZ76Ss5Cqje4BFRmMEj8m7eJrQUgHaT9qiA 3kHuPcZKRg8uTfjPJG19vtyvqQawmfQzk75h5g7zIQp9TJUhrmfMpap4NxfYRGXoRDyy 0D7U5t/R5NbeCiUk2C8hwW95ImP7GPAcEVkP0yBtEoKC+lEvY/hQ0nxyb+CdXS9uxczy yrsQ== X-Gm-Message-State: ACrzQf3EH8FDdZ5wCxw1Qw1WaJRi5ZOPZ3/GYJb6mOYNUthFuEOScppY saGqglqb2NKMFIBb9s833KvR3b4bgec/LarBdUc= X-Google-Smtp-Source: AMsMyM4JRASTk7uGXBgx86EaCOJTBDqvYoGoEq9e+xUimN/ehKNSvXyXwK7O6oAuPd7F5PpdfxBPs4aFiiXR6DAx3jM= 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 ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=KnjutuB4; spf=pass (imf09.hostedemail.com: domain of shy828301@gmail.com designates 209.85.214.180 as permitted sender) smtp.mailfrom=shy828301@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1667847048; a=rsa-sha256; cv=none; b=KbHPd0vqcjGuZCydGpXoHvTvOA8hOEp+2vLlGVWKL8hvuYBfTiOKNhiNaFYRuDWiEDokY2 pSiwkkhilgKlFqAALto9nel3+o/gYEw787bLHrrYeFCyn1ByrsxV3an7pjzmXvWwsZ/kbr mhGqjzMXjLJDZUupbeI2sOsA6LLJOXA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1667847048; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=6F6Iijyy/39XMB5DWSlZ4cyFVlxZqZqXMo2iBv4u9CM=; b=2YkxUQYoaB55uXtZsvZ6+iuYvjy7naKmkz7R0AMjO0mmYtCD0PpAEYc3ozsZXHvV94wbJz heJyRffgtadBSZ+KmZ98fd5eJLPdysaXpzVrqH+z374QlXdufYZQi+XIROKvGBV3fl2ZaU GOJgPxSZ6N2hgvB4kVi1dx1h4Tddi8U= X-Stat-Signature: 6ocgme1m79jhneqg34kcpnwgtocmwdwg X-Rspamd-Queue-Id: 74DCB140008 Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=KnjutuB4; spf=pass (imf09.hostedemail.com: domain of shy828301@gmail.com designates 209.85.214.180 as permitted sender) smtp.mailfrom=shy828301@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspam-User: X-Rspamd-Server: rspam06 X-HE-Tag: 1667847048-178017 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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