Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp106440rdb; Thu, 1 Feb 2024 03:39:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IGAAwPSoWmbOqJ7dGRdn0m4dHQouBXmCsKD6eHFUkcHJ5//jLKPocbvYNBoksscJj7pIQeX X-Received: by 2002:a17:902:eb84:b0:1d9:473e:f4e9 with SMTP id q4-20020a170902eb8400b001d9473ef4e9mr2541512plg.3.1706787545457; Thu, 01 Feb 2024 03:39:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706787545; cv=pass; d=google.com; s=arc-20160816; b=aa3xTOmiv42S3ovnwSr9GyAfEtaBKAdOsPDJz2O+T/NaSmKoeXB1l1TqMlcuuslkib RbViRUjBMZEoxZRh2+jrNYYjAqXE/RU8j+AHib3ChV2JVO6VTGVFMokPLbOY94jDDh7E fMYAt+fEak1sVPZ0Q+krQDkG4IZhWzcMGHGZo10bAJIAZZRK/lf4j/9tjr4gwTxn2Qsc 1RTliSPu05tIGQ7SnlXE7cSq+HP0Tyz37eR31rqeNw8kX1IwZ8EZqRjmPPgMKufjXdgP DT2Iu5xT6j0zET7gXFLMg4BYGHqcGK3C/PyFsbZtRA6XvyK3s2ZnMti4UtoRyoZAp4L4 gjHg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id; bh=h7FXN7DGXikW8rLqb7EfUD0EehIFmsCtGJ5B23DOjnk=; fh=CzweqGphqAzugdIeGzq/FqIQdC69zWYTKmYq6j7Khbg=; b=Ks/8aQHkBo+OhOFS3EMbLKLXDqokRH/3RaRQWV7GINFnwehP3RBDM+dVrPCvVwTki+ gkzEJrtCwyRkP/S4Mc3BKBb9nBUR6hKU8oVWijvTDkH+FiH+Ra0CBNKZLn91SbjdiVcN 7HBpZsymMQzwabvuu0bNL4PlCVJ9oQPi9XpO4Bp+k0Ypr6ZDeMQ7fDjTUKKUxtD48c3Z 13mh0ob3upWqYrpCPazo5S7hZMJkR4vV7EjnMZcMVc0C60rzXIro5e2SXkf9P4I+Eurn J1TH8Raz7cGWOdqkkGyetZAeMLQ4kIy2o9jw6rRBZ+KSVlNzhV72ozbNp5UPuulZ8Yo4 DOTw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-48020-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48020-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com X-Forwarded-Encrypted: i=1; AJvYcCUlwjjsx/0iGqPZox39QK9WB0iC/LrtR4Ciueu2A4TxtAT7yHPgVyFPWv0u2nsvfM2o5t9a7nOwUWra32Yl4V4YXC+m4tZgs3H4+iVIfg== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d17-20020a170903231100b001d8cbbc328bsi9225844plh.299.2024.02.01.03.39.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 03:39:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48020-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-48020-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48020-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id ECDE9288AF3 for ; Thu, 1 Feb 2024 11:37:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C20D15D5B5; Thu, 1 Feb 2024 11:37:32 +0000 (UTC) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 95D2015D5A7; Thu, 1 Feb 2024 11:37:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.190 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706787451; cv=none; b=qRKrzDXDQpTqqfcv8hs5eOVSiUy8fFBo9Hju4i3b6MMRpaoErAyqMwc09Ix8vXVM1etS7YR+FriOQneCSdg1alwfQ9uS014mNzSOPg1uyRApCJUTc9uD4nM7M4N9NBDU+ufqlIj6l9wzBMrSwadXBaeYEEuUKBPlzXUbHqsCTn0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706787451; c=relaxed/simple; bh=WK2M+igzvkFNxwmmkFufPf/3i1QW4p0L5XQuTx6V0R0=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=Ub7Yi5HHY9MAEGth9jiL9c+t1Kt3ULEgPNf2sqcihpeaU8EuEupbJtB650KR3/KgMCSj5XJ0xNyJyAZbYsU715qej+c7qkdhLm0o114GbY4GQ94AbZecGsOIunKAb2FrVEuVTNXt1F2c3zVN08hT8kLrgEWEAX9NNn4lfJT4ufY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.190 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.163.44]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4TQcKM5THLz29kYk; Thu, 1 Feb 2024 19:35:35 +0800 (CST) Received: from kwepemm600017.china.huawei.com (unknown [7.193.23.234]) by mail.maildlp.com (Postfix) with ESMTPS id 1E78A14040D; Thu, 1 Feb 2024 19:37:27 +0800 (CST) Received: from [10.174.179.234] (10.174.179.234) by kwepemm600017.china.huawei.com (7.193.23.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 1 Feb 2024 19:37:25 +0800 Message-ID: <3009aadd-69d6-c797-20b4-95cf926b6dd9@huawei.com> Date: Thu, 1 Feb 2024 19:37:25 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH -next v4 2/3] x86/mce: rename MCE_IN_KERNEL_COPYIN to MCE_IN_KERNEL_COPY_MC To: Borislav Petkov CC: Thomas Gleixner , Ingo Molnar , , Dave Hansen , , "H. Peter Anvin" , Tony Luck , Andy Lutomirski , Peter Zijlstra , Andrew Morton , Naoya Horiguchi , , , , Guohanjun References: <20240111135548.3207437-1-tongtiangen@huawei.com> <20240111135548.3207437-3-tongtiangen@huawei.com> <20240131070258.GGZbnwov0g918F-FGz@fat_crate.local> From: Tong Tiangen In-Reply-To: <20240131070258.GGZbnwov0g918F-FGz@fat_crate.local> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm600017.china.huawei.com (7.193.23.234) 在 2024/1/31 15:02, Borislav Petkov 写道: > On Thu, Jan 11, 2024 at 09:55:47PM +0800, Tong Tiangen wrote: >> Currently, there are some kernel memory copy scenarios is also mc safe >> which use copy_mc_to_kernel() or copy_mc_user_highpage(). > > Both of those end up in copy_mc_enhanced_fast_string() which does > EX_TYPE_DEFAULT_MCE_SAFE. OK, how about this commit msg change? :) Currently, there are some kernel memory copy scenarios is also mc safe which use copy_mc_to_kernel() or copy_mc_user_highpage(), **both of those end up in copy_mc_enhanced_fast_string() or copy_mc_fragile() which does EX_TYPE_DEFAULT_MCE_SAFE.** In these scenarios, posion pages need to be isolated too. Therefore, a macro similar to MCE_IN_KERNEL_COPYIN is required. For this reason, we can rename MCE_IN_KERNEL_COPYIN to MCE_IN_KERNEL_COPY_MC, the new macro can be applied to both user-to-kernel mc safe copy and kernel-to-kernel mc safe copy. Thanks. Tong. >