Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5438669rwd; Mon, 5 Jun 2023 03:48:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6//g+WPt335BZ6ZL5nie+i8lW7DjrJEoOVq5Q/vAclHk9dEhUTtRGjSw+lLxcuAg8EssFR X-Received: by 2002:a05:620a:2098:b0:75e:c23f:5097 with SMTP id e24-20020a05620a209800b0075ec23f5097mr550771qka.4.1685962136729; Mon, 05 Jun 2023 03:48:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685962136; cv=none; d=google.com; s=arc-20160816; b=q8L0uvYFMoYIGHl1HQflGcZEH7nAy4EikHgdQLP967uccLnhXGX9kKZGvkkdp1pf3V F44o4j/OWa/ThyUsbc3G1ffAKHT8IXGJVYZdl3+j5K3qIQ+Q7iRzw+903emXtCohSzT7 C41kbBMvi7RIstdX52lVMDoqobMARR7A5lgsyn0uAh3cFBZEKMaG/hbsfsvI2fWeMVHP QHSpKxdMSSULIJ99kVoEpeo15UqYMaGNB14IJct4rEmGDTSGnd/+rGq/oZWX6ljCTy5a tahc35yPmm0MRxXaGRZ3pO3M6BG71vN06BZFLKSp6P/F+aWNPEb4OgxvUdDeL3rhwsTI cZEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-language:references:cc:to:subject:from:user-agent :mime-version:date:message-id; bh=XyLi4OQZZr0g9A8xDxgkYh7ScipDsTn+juRcDb8gcxY=; b=oNu2lxT2IgPRR+6rfmXdodAXB0OPI3rfuOg7M0I5csiNrA95vsNIez4Pdj1QYfIteM wpgj6+8x5yPA0H0/jcBobbh53dn81dOg6XE7j9cOJRor6rVkthyWpArkoC1bSsW10C17 nL45VWf/QGAhB0nMKHepKiLNmgNhejIr8ATg2dxfFfEjM/hUBqG99Y5D2ElgWCx0BC3G 9OPytPhfFQiiU9WUyrHz3pGN9VNcITSC0brAjClMLHIfR1gq5rrOVST0kgShUTh1vmdW 1g6mN7VRozn2AqojCBTsdhJqnL2XidkMbaDriPFuM6UVUSNGz7QLxsngZLWodnBlFh8M 8rMA== 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hk1-20020a17090b224100b002563db5c4b0si7436579pjb.184.2023.06.05.03.48.43; Mon, 05 Jun 2023 03:48:56 -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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231585AbjFEKfO (ORCPT + 99 others); Mon, 5 Jun 2023 06:35:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232160AbjFEKex (ORCPT ); Mon, 5 Jun 2023 06:34:53 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77B55F2; Mon, 5 Jun 2023 03:34:35 -0700 (PDT) Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4QZVLC1G74zLmVv; Mon, 5 Jun 2023 18:32:51 +0800 (CST) Received: from [10.174.177.243] (10.174.177.243) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 5 Jun 2023 18:34:31 +0800 Message-ID: <772e9939-47e4-3c09-d7a0-7952639ad853@huawei.com> Date: Mon, 5 Jun 2023 18:34:30 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 From: Kefeng Wang Subject: Re: [PATCH v2] x86/mce: set MCE_IN_KERNEL_COPYIN for all MC-Safe Copy To: Borislav Petkov , "Luck, Tony" CC: "Song, Youquan" , "naoya.horiguchi@nec.com" , "tglx@linutronix.de" , "mingo@redhat.com" , "dave.hansen@linux.intel.com" , "x86@kernel.org" , "akpm@linux-foundation.org" , "linux-edac@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "chu, jane" References: <20230526063242.133656-1-wangkefeng.wang@huawei.com> <20230526070952.GAZHBbQNAWZJP6tOXv@nazgul.local> <20230602160138.GDZHoSYsWoPAinMszk@fat_crate.local> Content-Language: en-US In-Reply-To: <20230602160138.GDZHoSYsWoPAinMszk@fat_crate.local> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.177.243] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,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 On 2023/6/3 0:01, Borislav Petkov wrote: > On Fri, Jun 02, 2023 at 03:12:30PM +0000, Luck, Tony wrote: >>> As mentioned above, I am focus on copy_mc_XXX calling, it will >>> abort if the exception fires when accessing the source, and we >>> want to isolate the corrupted src page, maybe we could a new flag >>> to indicate this scenario, the *Final Goals* is to let core >>> do_machine_check to deal with the corrupted src page. >> >> A new flag seems like a good direction. > > Before anything happens here, the fate of the now unused EX_TYPE_COPY > needs to be decided first. Then new stuff. EX_TYPE_COPY is actually not related EX_TYPE_DEFAULT_MCE_SAFE, but we could recheck it again, it seems that mce recover from copy from user is broken now. Maybe change _ASM_EXTABLE_UA to _ASM_EXTABLE_CPY in copy_user_64.S again as commit[1] did before. Thank you for the advice. [1] 278b917f8cb9 x86/mce: Add _ASM_EXTABLE_CPY for copy user access > > Thx. >