From: Zeng Heng <zengheng4@huawei.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>,
Peter Zijlstra <peterz@infradead.org>
Cc: <alexander.shishkin@linux.intel.com>, <tglx@linutronix.de>,
<tiwai@suse.de>, <jolsa@kernel.org>, <vbabka@suse.cz>,
<keescook@chromium.org>, <mingo@redhat.com>, <acme@kernel.org>,
<namhyung@kernel.org>, <bp@alien8.de>, <bhe@redhat.com>,
<eric.devolder@oracle.com>, <hpa@zytor.com>, <jroedel@suse.de>,
<dave.hansen@linux.intel.com>, <linux-perf-users@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <liwei391@huawei.com>,
<x86@kernel.org>, <xiexiuqi@huawei.com>, <liaochang1@huawei.com>
Subject: Re: [RFC PATCH v4] x86/kdump: terminate watchdog NMI interrupt to avoid kdump crashes
Date: Thu, 23 Feb 2023 10:29:33 +0800 [thread overview]
Message-ID: <81f5d521-bc8a-4d1a-fe7e-55487f3d25b3@huawei.com> (raw)
In-Reply-To: <87r0uh5yud.fsf@email.froward.int.ebiederm.org>
在 2023/2/23 2:39, Eric W. Biederman 写道:
> Peter Zijlstra <peterz@infradead.org> writes:
>
>> On Fri, Feb 17, 2023 at 08:06:04PM +0800, Zeng Heng wrote:
>>> If the cpu panics within the NMI interrupt context, there could be
>>> unhandled NMI interrupts in the background which are blocked by processor
>>> until next IRET instruction executes. Since that, it prevents nested
>>> NMI handler execution.
>>>
>>> In case of IRET execution during kdump reboot and no proper NMIs handler
>>> registered at that point (such as during EFI loader)
> EFI loader? kexec on panic is supposed to be kernel to kernel.
> If someone is getting EFI involved that is a bug.
In kdump path, kexec would start purgatory to verify the secondary kernel by
sha256. If verify passed, it would turn the control to EFI loader, and
call the second
kernel to capture the environment as vmcore file.
As the mail said, if panic appears within NMI context, we never exit
from that until
EFI loader handles page fault exception and executes IRET instruction
when exit
from PF. At this moment, processor would allow the blocked NMI interrupt
raise.
>> This kills all of perf, including but not limited to the hardware
>> watchdog. However, it does nothing to external NMI sources like the NMI
>> button found on some HP machines.
>>
>> Still I suppose it is sufficient for the normal case.
> I can't think of one why we don't just leave
> NMIs deliberately disabled
How to just leave NMIs disabled, could you explain it with more details ?
Zeng Heng
> until the crash recover kernel figured out how to enable them safely.
>
next prev parent reply other threads:[~2023-02-23 2:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 12:06 [RFC PATCH v4] x86/kdump: terminate watchdog NMI interrupt to avoid kdump crashes Zeng Heng
2023-02-22 17:08 ` Peter Zijlstra
2023-02-22 18:39 ` Eric W. Biederman
2023-02-23 2:29 ` Zeng Heng [this message]
2023-02-23 3:14 ` Zeng Heng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=81f5d521-bc8a-4d1a-fe7e-55487f3d25b3@huawei.com \
--to=zengheng4@huawei.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=bhe@redhat.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=ebiederm@xmission.com \
--cc=eric.devolder@oracle.com \
--cc=hpa@zytor.com \
--cc=jolsa@kernel.org \
--cc=jroedel@suse.de \
--cc=keescook@chromium.org \
--cc=liaochang1@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=liwei391@huawei.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=tiwai@suse.de \
--cc=vbabka@suse.cz \
--cc=x86@kernel.org \
--cc=xiexiuqi@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox