Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1095287pxb; Tue, 29 Mar 2022 17:07:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2JOaETdp/n4UgGII67G7Dp33a+EJY7OVLrzb+/4pGLpADMOvMmUa17S7WFL5f+n0Nweda X-Received: by 2002:a17:907:94ca:b0:6da:b785:f067 with SMTP id dn10-20020a17090794ca00b006dab785f067mr38133135ejc.654.1648598864148; Tue, 29 Mar 2022 17:07:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648598864; cv=none; d=google.com; s=arc-20160816; b=LJ4aPHZGZps9h2IQnBLvLIPFlySts9jCe3QwvgDdS0sZnCxIz0V4rqFKTkI5crPS+k TIhIjaSn+LQMnmuCz0HMqmSw+W60JgM6dsaLwsCBVM7XL0/4ILRBMtg+iDadgrdsjYV9 iCRfrYEL/OBD+znF+u33Oqke1Bk/s32xLwdMc+09JkCKXxh3IktisIOvVMyHKMmZINAb 9CjJsRANHbm1yYpnpNK4FV67idpf7+Zw/SMavyrs1UTtQc6ki/S5tp4noXax+/s8hwrn p8dadLwkLp+iDb/0mP8LO186jRz05+MmZXER8fT1df+1zUtkyzpV3DS1e9+udrj3hzAX eeNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id; bh=uDE3LJi6BbMGgIgrMFzUP4zSqnLg605D2nTJVrny0so=; b=JCzE+z+m+uL2jMr8d9B/1n6yzx+gHv0EhLy6jtpNeT2Yq9oN7HV0FChw5l3HpMF7Iw Xc8AI1cpAy7Z+Cb0h88JgF0Tz43j6a/21XNkVHDJCNq10tNrhH3y4yQOYp/vdIuyCv7n hMDqvjSlM4wMK+QSOo1vsPkjDFBiXPbqYb10cpi6xZojzEj1EGfP3xkolw5t7CbhTrvI d5svfIjln6kG6hg432eJnpEMhSxcxGdQbqATJr/PeBbeWSREu8MkeVB17MxYJSJXABQZ rkTT47WzKS1vVnkNF3MToG6N478f4zb/YF2nS0PBq2HodnsK0LFZFWsRIryqHt6D8jai 5AUw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k6-20020aa7c386000000b00418c2b5bd72si17918768edq.84.2022.03.29.17.07.17; Tue, 29 Mar 2022 17:07:42 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239011AbiC2Pvu (ORCPT + 99 others); Tue, 29 Mar 2022 11:51:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239006AbiC2Pvt (ORCPT ); Tue, 29 Mar 2022 11:51:49 -0400 Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F13385BD5; Tue, 29 Mar 2022 08:50:07 -0700 (PDT) Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nZE6V-0004sG-4e; Tue, 29 Mar 2022 11:49:55 -0400 Message-ID: <47936edb3b0f9c9f04f0d0d2e7f38383a22b6a3d.camel@surriel.com> Subject: Re: [PATCH] mm,hwpoison: unmap poisoned page before invalidation From: Rik van Riel To: Oscar Salvador Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, kernel-team@fb.com, Miaohe Lin , Naoya Horiguchi , Mel Gorman , Johannes Weiner , Andrew Morton , stable@vger.kernel.org Date: Tue, 29 Mar 2022 11:49:53 -0400 In-Reply-To: References: <20220325161428.5068d97e@imladris.surriel.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-1nbVtLEU+9mQSE0QbNkg" User-Agent: Evolution 3.42.4 (3.42.4-1.fc35) MIME-Version: 1.0 Sender: riel@shelob.surriel.com X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 --=-1nbVtLEU+9mQSE0QbNkg Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2022-03-28 at 11:00 +0200, Oscar Salvador wrote: > On Fri, Mar 25, 2022 at 04:14:28PM -0400, Rik van Riel wrote: > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (in= validate_inode_page(page)) > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0poisonret =3D VM_FAULT_NOPAGE; >=20 > What is the effect of returning VM_FAULT_NOPAGE? > I take that we are cool because the pte has been installed and points > to > a new page? (I could not find where that is being done). >=20 It results in us returning to userspace as if the page fault had been handled, resulting in a second fault on the same address. However, now the page is no longer in the page cache, and we can read it in from disk, to a page that is not hardware poisoned, and we can then use that second page without issues. --=20 All Rights Reversed. --=-1nbVtLEU+9mQSE0QbNkg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAmJDKqEACgkQznnekoTE 3oPaQwgAjpAAjbiuOWl9S6LuGLV7gTR6piiEa7NFUs+d/D8ndjxb0ImtJrHrTF4b 3YO9bln7laVN1+jACN/9FfGQh7YobgviPQ3HJc0bkdxHC1eMrwIEA3n02e1RaZ6Z x5Z14n2+DretUQs8O9CFDR5ioV36yWFpe0VKFlcMik20SDdaE3pbATgHvCnXb8nl NOJcnP95djsEgLMSmSFlBE2EpEF9e1MyYfHF1RVqnNm4KljTEjCouPbiuBU/y/kR 5Wsc8fVZaDSVNKFVM4GCdzBqziwCdYsAaPemPMTO5D9jWrA6f1wudmIKNiO6B1+X KE2keqO/4AXE0JZc/m+f4157Owu0dA== =9sBD -----END PGP SIGNATURE----- --=-1nbVtLEU+9mQSE0QbNkg--