Received: by 2002:a05:622a:1442:b0:3a5:28ea:c4b9 with SMTP id v2csp769051qtx; Mon, 31 Oct 2022 13:26:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6DCZEnkoswPS11yfleFjKLWnlvBM9hV9dGva2pIEmvQz/tNnkWhTbEr55AZl6ixLxeAPRq X-Received: by 2002:a05:6402:11c7:b0:462:549d:fbbe with SMTP id j7-20020a05640211c700b00462549dfbbemr15435961edw.199.1667248003424; Mon, 31 Oct 2022 13:26:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667248003; cv=none; d=google.com; s=arc-20160816; b=XLIX5nNRo9jsINDQLFzkRsco5xMt+GuGoMQD6D5Y+NrjyM+24Wov2Y794fuxmXNHEy lvZwbqfL6SgFQTHsRrx8pcHbg8AdIQZguXBSKMc/3CtAkmsx5P2Ti4PC7SjmAGLWjOyi I/hikPmDieTThNxFb3eJdURWaTK2cwvtb4irClHw1u9DQT6I+lOCbwUShxTKbG+T4Ddz sAKlGd3zrfknw/z0HL4NzjVF7rWYMJqZWeCnwmlsVXw5eqcSGsORSkS93Mk8h7YcyXdb iDc/T7TxhnHgbhpNJddo+UbIGNyLeytcHytIW+j5cTTb8lM1fiC6ghzLQGWr3YlpqPWm uJUQ== 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:date:subject:cc:to:from :dkim-signature; bh=ReIpbtcUK2QbPLDBEE7m/YO4mt19+X2nYR9g/69aJ7I=; b=xJQbKlt+jMtBnyS5S5Ej1IdW8Ok7y9dO/BsEmOdgoFps3n1mkj+Ajqe6XoikRSv/Xz Qe2nypkYj0IR924/DCsqk+h2AGqCMEekVnJoIjqpLxoRPpH31rppE0Spcf6JEmc9ioJE KnvLghaeJxPblNRONPnXqN1E8ibr73ncc8lc2q346FXp7zLLiq8NbKp0gVt9dkdZEK0d t3apAvCMpXozTNUR0h98ymh5j5JtKBOzvK30Io4mAubdHCCUn3OXALomUxKikdAr2Yd+ qVI4PkdFQ3u1w68tYy6jFRcrETkOAe7seXIYBQ9aAHtNN614uT9hooucY/hznmFh+akf y6Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SWgcSZWE; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n25-20020a056402515900b00460c36e09b6si7763551edd.431.2022.10.31.13.26.19; Mon, 31 Oct 2022 13:26:43 -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=@intel.com header.s=Intel header.b=SWgcSZWE; 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=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229909AbiJaUKu (ORCPT + 98 others); Mon, 31 Oct 2022 16:10:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229544AbiJaUKs (ORCPT ); Mon, 31 Oct 2022 16:10:48 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1C40C6C for ; Mon, 31 Oct 2022 13:10:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667247047; x=1698783047; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gVin2FQfBiKKdgB/2PC5DT5M96qnAGhQxw1TWFWq2qw=; b=SWgcSZWEobek8XaeFnKCNF0MGbFE4mcGJIWCnuqKvwcWcmPxrSiwdF6Z L9MUaF8DOb1EICDw8DjGC7FM3zy3Tx5mo4QluvaNUGFR39YZGP/vW/yXz ad7EAZLI+sbPPfkKAw8KNY8wMLd473ALqpE5nsUmp86uiGmoIaSuN3NiO btzqEJxOD68WsZlhpLBplRY29jeOUmfpevBCrT6BAdEkmhuPR9jjDgxPs 2ZV/evkbbluEyvgKfzGWRHHC1ycI8ddYndDXeJZbfRmncvJo2pgflN3Tg GVdrrOeTpdHJ+sEePwZuMn3rG99YSHBQI1J8T5V1pQK9w/kxZtwLCPZUQ w==; X-IronPort-AV: E=McAfee;i="6500,9779,10517"; a="335651889" X-IronPort-AV: E=Sophos;i="5.95,228,1661842800"; d="scan'208";a="335651889" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2022 13:10:47 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10517"; a="722931438" X-IronPort-AV: E=Sophos;i="5.95,228,1661842800"; d="scan'208";a="722931438" Received: from agluck-desk3.sc.intel.com ([172.25.222.78]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2022 13:10:47 -0700 From: Tony Luck To: Andrew Morton Cc: Alexander Potapenko , Naoya Horiguchi , Miaohe Lin , Matthew Wilcox , Shuai Xue , Dan Williams , Michael Ellerman , Nicholas Piggin , Christophe Leroy , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Tony Luck Subject: [PATCH v4 0/2] Copy-on-write poison recovery Date: Mon, 31 Oct 2022 13:10:27 -0700 Message-Id: <20221031201029.102123-1-tony.luck@intel.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221021200120.175753-1-tony.luck@intel.com> References: <20221021200120.175753-1-tony.luck@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE 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 Recover from poison consumption while copying pages in the kernel for a copy-on-write fault. Changes since v3: 1) Miaohe Lin pointed out that a recent change by Alexander Potapenko to copy_user_highpage() added a call to kmsan_unpoison_memory(). Same is needed in my cloned copy_mc_user_highpage() ... at least in the successful case where the page was copied with no machine checks. 2) Picked up some additional Reviewed-by and Tested-by tags. Tony Luck (2): mm, hwpoison: Try to recover from copy-on write faults mm, hwpoison: When copy-on-write hits poison, take page offline include/linux/highmem.h | 26 ++++++++++++++++++++++++++ include/linux/mm.h | 5 ++++- mm/memory.c | 32 ++++++++++++++++++++++---------- 3 files changed, 52 insertions(+), 11 deletions(-) base-commit: 30a0b95b1335e12efef89dd78518ed3e4a71a763 -- 2.37.3