Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1583029
| From | Xunlei Pang <xpang@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] x86/mce: Keep quiet in case of broadcasted mce after system panic |
| Date | 2017-02-17 03:00 +0100 |
| Message-ID | <tbG01-66D-7@gated-at.bofh.it> (permalink) |
| References | (6 earlier) <t3M2B-415-9@gated-at.bofh.it> <tbmXo-1HS-9@gated-at.bofh.it> <tbrkm-4KJ-19@gated-at.bofh.it> <tbsT7-5Hw-5@gated-at.bofh.it> <tbtm9-66o-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 02/16/2017 at 08:22 PM, Borislav Petkov wrote:
> On Thu, Feb 16, 2017 at 07:52:09PM +0800, Xunlei Pang wrote:
>> then mce will be broadcast to the other cpus which are still running
>> in the first kernel(i.e. looping in crash_nmi_callback).
> Simple: the crash code should really mark CPUs as not being online:
>
> void do_machine_check(struct pt_regs *regs, long error_code)
>
> ...
>
> /* If this CPU is offline, just bail out. */
> if (cpu_is_offline(smp_processor_id())) {
> u64 mcgstatus;
>
> mcgstatus = mce_rdmsrl(MSR_IA32_MCG_STATUS);
> if (mcgstatus & MCG_STATUS_RIPV) {
> mce_wrmsrl(MSR_IA32_MCG_STATUS, 0);
> return;
> }
> }
>
> because looping in crash_nmi_callback() does not really denote them as
> CPUs being online.
>
> And just so that you don't disturb the machine too much during crashing,
> you could simply clear them from the online masks, i.e., perhaps call
> remove_cpu_from_maps() with the proper locking around it instead of
> doing a full cpu_down().
It changes the value of cpu_online_mask/etc which will cause confusion to vmcore analysis.
Moreover, for the code(see comment inlined)
if (cpu_is_offline(smp_processor_id())) {
u64 mcgstatus;
mcgstatus = mce_rdmsrl(MSR_IA32_MCG_STATUS);
if (mcgstatus & MCG_STATUS_RIPV) { // This condition may be not true, the mce triggered on kdump cpu
// doesn't need to have this bit set for the other cpus remain in 1st kernel.
mce_wrmsrl(MSR_IA32_MCG_STATUS, 0);
return;
}
}
Regards,
Xunlei
>
> The machine will be killed anyway after kdump is done writing out
> memory.
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] x86/mce: Keep quiet in case of broadcasted mce after system panic Xunlei Pang <xpang@redhat.com> - 2017-02-16 06:40 +0100
Re: [PATCH] x86/mce: Keep quiet in case of broadcasted mce after system panic Borislav Petkov <bp@alien8.de> - 2017-02-16 11:20 +0100
Re: [PATCH] x86/mce: Keep quiet in case of broadcasted mce after system panic Xunlei Pang <xpang@redhat.com> - 2017-02-16 13:00 +0100
Re: [PATCH] x86/mce: Keep quiet in case of broadcasted mce after system panic Borislav Petkov <bp@alien8.de> - 2017-02-16 13:30 +0100
Re: [PATCH] x86/mce: Keep quiet in case of broadcasted mce after system panic Xunlei Pang <xpang@redhat.com> - 2017-02-17 03:00 +0100
Re: [PATCH] x86/mce: Keep quiet in case of broadcasted mce after system panic Borislav Petkov <bp@alien8.de> - 2017-02-17 10:10 +0100
Re: [PATCH] x86/mce: Keep quiet in case of broadcasted mce after system panic Xunlei Pang <xpang@redhat.com> - 2017-02-17 17:20 +0100
RE: [PATCH] x86/mce: Keep quiet in case of broadcasted mce after system panic "Luck, Tony" <tony.luck@intel.com> - 2017-02-21 19:50 +0100
Re: [PATCH] x86/mce: Keep quiet in case of broadcasted mce after system panic Xunlei Pang <xpang@redhat.com> - 2017-02-22 06:50 +0100
csiph-web