Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp8828346rwl; Tue, 10 Jan 2023 20:23:47 -0800 (PST) X-Google-Smtp-Source: AMrXdXs2fztepPZCMFZhLyp//sVip9ftjdlwKtEeeK9LEsMW50Y4NRLf625/R69CiU5fRzNN45Bt X-Received: by 2002:a05:6402:c0e:b0:483:2c00:a851 with SMTP id co14-20020a0564020c0e00b004832c00a851mr48667975edb.31.1673411026844; Tue, 10 Jan 2023 20:23:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673411026; cv=none; d=google.com; s=arc-20160816; b=i/W+Qm+YNogL93bibTFSLiQz3zw9n0nhE8BmjobILu/7/4x20EKM/p7KN1mrXB3lfx em/soJnIi+9w18LVBd43fdJr7e8ZtFNKu0iJA4E4V8OfqmG8KBofoCyeAp5JiHIikfV5 937+Jxo7PWlR30NEnbsOOaF6ficZkHgdTOuJ96i4zzZVa/wA67yeAJBS9l2JGaa//Pyw Hs175sjm80EQBFTJvCvlV5emMrYJ3t7AoSxnEFZIvSq9Rn0KUamQQkYFg8nKJw8ULgmw lqWlDfV5r5rf9vhMlr+xzg8gTCycSQoagHZzU1Sqj7JK5wfscriRunRHP60PmR+rrzWo zEXw== 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:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=NYAx2Ti08ozRV1uLO0+fQHbDNUUmcEqIYnogJP7rhC8=; b=0XnAOSov65gAvDSNjSN+J5ZMA0Ow55YDrhoYlPTz+pXvXt8FQGqdHvaLrm+UCXchCx 3o0YQ0qxoXxhliPHbkdwlPEkPlTHEA6tCn/sHAUqoRG3NDAj8fNCHcDMunNlC2Tc0UMo RHnc2HnwO0d3ZLZ19odTMT7zxYAsZ/VDsyTKVvfcos51TmT8dnuwbytMCx4aw23S7pwG MMea90/kp3rdMIOfS+8DQsY6MDKyCmoD8FqdR/pKwuuxYMxqePAcs2rj7g+0Muo5yzXN isjjp0FUhziTroGxx+VSRjR8Y2v6jrTJrzaiCLJ2ZqcXYOeW46divqe8BZ1elt8934Qu U5qQ== 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 oq19-20020a170906cc9300b007f1501a8c24si11455143ejb.216.2023.01.10.20.23.27; Tue, 10 Jan 2023 20:23:46 -0800 (PST) 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 S230463AbjAKDqx (ORCPT + 53 others); Tue, 10 Jan 2023 22:46:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230223AbjAKDqt (ORCPT ); Tue, 10 Jan 2023 22:46:49 -0500 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE8F422C for ; Tue, 10 Jan 2023 19:46:47 -0800 (PST) Received: from kwepemi500024.china.huawei.com (unknown [172.30.72.54]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4NsD8h2PSHz16MWg; Wed, 11 Jan 2023 11:45:08 +0800 (CST) Received: from [10.174.179.163] (10.174.179.163) by kwepemi500024.china.huawei.com (7.221.188.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 11 Jan 2023 11:46:41 +0800 Message-ID: Date: Wed, 11 Jan 2023 11:46:40 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Subject: Re: [PATCH -v2] x86/boot/compressed: Register dummy NMI handler in EFI boot loader, to avoid kdump crashes To: Borislav Petkov CC: Ingo Molnar , , , , , , , , , , , , , References: <20230110102745.2514694-1-zengheng4@huawei.com> <684a2472-f388-b2e1-4a7a-7bc9a07650b4@huawei.com> Content-Language: en-US From: Zeng Heng In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.179.163] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemi500024.china.huawei.com (7.221.188.100) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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/1/10 22:53, Borislav Petkov wrote: > On Tue, Jan 10, 2023 at 08:32:07PM +0800, Zeng Heng wrote: >> And here is the context of mce-inject: >> >> #0  relocate_kernel () at arch/x86/kernel/relocate_kernel_64.S:55 >> #1  0xffffffff81a57fc2 in machine_kexec (image=0xffff888101ef8400) >>     at arch/x86/kernel/machine_kexec_64.c:391 > Before we continue with this any further: are you doing this "exercise" in > qemu/kvm and nothing of that is happening on real hardware? Real hardware and QEMU both can reproduce the issue. Here is description about NMI from Intel 64 and IA-32 Architectures Software Developer's Manual in chapter 6.7.1: While an NMI interrupt handler is executing, the processor blocks delivery of subsequent NMIs until the next execution of the IRET instruction. This blocking of NMIs prevents nested execution of the NMI handler. It is recommended that the NMI interrupt handler be accessed through an interrupt gate to disable maskable hardware interrupts (see Section 6.8.1, “Masking Maskable Hardware Interrupts”).