From: Pingfan Liu <kernelfans@gmail.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>,
Baoquan He <bhe@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
kexec@lists.infradead.org,
Jacob Pan <jacob.jun.pan@linux.intel.com>,
x86@kernel.org, Michal Hocko <mhocko@suse.com>,
linux-kernel@vger.kernel.org, Daniel Drake <drake@endlessm.com>,
Ingo Molnar <mingo@redhat.com>, Qian Cai <cai@lca.pw>,
Masami Hiramatsu <mhiramat@kernel.org>,
Andy Lutomirski <luto@kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>, Gleixner <tglx@linutronix.de>,
Dave Young <dyoung@redhat.com>, Vlastimil Babka <vbabka@suse.cz>,
Eric Biederman <ebiederm@xmission.com>
Subject: Re: [PATCHv2 0/4] x86/mce: protect nr_cpus from rebooting by broadcast mce
Date: Mon, 2 Sep 2019 12:26:42 +0800 [thread overview]
Message-ID: <20190902042642.GA22792@mypc> (raw)
In-Reply-To: <20190830141156.GB30413@zn.tnic>
On Fri, Aug 30, 2019 at 04:11:56PM +0200, Borislav Petkov wrote:
> On Tue, Aug 27, 2019 at 11:02:19AM +0800, Pingfan Liu wrote:
> > v1 -> v2: fix compile warning and error on x86_32
> >
> >
> > This series include two related groups:
> > [1-3/4]: protect nr_cpus from rebooting by broadcast mce
> > [4/4]: improve "kexec -l" robustness against broadcast mce
> >
> > When I tried to fix [1], Thomas raised concern about the nr_cpus' vulnerability
> > to unexpected rebooting by broadcast mce. After analysis, I think only the
> > following first case suffers from the rebooting by broadcast mce. [1-3/4] aims
> > to fix that issue.
> >
> > *** Back ground ***
> >
> > On x86 it's required to have all logical CPUs set CR4.MCE=1. Otherwise, a
> > broadcast MCE observing CR4.MCE=0b on any core will shutdown the machine.
> >
> > The option 'nosmt' has already complied with the above rule by Thomas's patch.
> > For detail, refer to 506a66f3748 (Revert "x86/apic: Ignore secondary threads if
> > nosmt=force")
> >
> > But for nr_cpus option, the exposure to broadcast MCE is a little complicated,
> > and can be categorized into three cases.
>
> One thing is not clear to me: are you "fixing" a hypothetical case here
> or have you *actually* experienced an MCE happening while kdumping with
> nr_cpus < num_online_cpus()?
No, I do not hit this issue by myself.
But from the following two commits:
commit 5bc329503e8191c91c4c40836f062ef771d8ba83
Author: Xunlei Pang <xlpang@redhat.com>
Date: Mon Mar 13 10:50:19 2017 +0100
x86/mce: Handle broadcasted MCE gracefully with kexec
And
commit 506a66f374891ff08e064a058c446b336c5ac760
Author: Thomas Gleixner <tglx@linutronix.de>
Date: Fri Jun 29 16:05:47 2018 +0200
Revert "x86/apic: Ignore secondary threads if nosmt=force"
This issue is in practice.
BTW, clarify one thing kdumping (kexec -p) will not suffer from mce
issue as described in case 2. Only "kexec -l" will.
>
> Btw, pls do not use lkml.org to refer to previous mails but
>
> http://lkml.kernel.org/r/<Message-ID>
OK, I will.
Thanks,
Pingfan
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
WARNING: multiple messages have this Message-ID (diff)
From: Pingfan Liu <kernelfans@gmail.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Gleixner <tglx@linutronix.de>, Andy Lutomirski <luto@kernel.org>,
x86@kernel.org, Ingo Molnar <mingo@redhat.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Masami Hiramatsu <mhiramat@kernel.org>, Qian Cai <cai@lca.pw>,
Vlastimil Babka <vbabka@suse.cz>,
Daniel Drake <drake@endlessm.com>,
Jacob Pan <jacob.jun.pan@linux.intel.com>,
Michal Hocko <mhocko@suse.com>,
Eric Biederman <ebiederm@xmission.com>,
linux-kernel@vger.kernel.org, Dave Young <dyoung@redhat.com>,
Baoquan He <bhe@redhat.com>,
kexec@lists.infradead.org
Subject: Re: [PATCHv2 0/4] x86/mce: protect nr_cpus from rebooting by broadcast mce
Date: Mon, 2 Sep 2019 12:26:42 +0800 [thread overview]
Message-ID: <20190902042642.GA22792@mypc> (raw)
In-Reply-To: <20190830141156.GB30413@zn.tnic>
On Fri, Aug 30, 2019 at 04:11:56PM +0200, Borislav Petkov wrote:
> On Tue, Aug 27, 2019 at 11:02:19AM +0800, Pingfan Liu wrote:
> > v1 -> v2: fix compile warning and error on x86_32
> >
> >
> > This series include two related groups:
> > [1-3/4]: protect nr_cpus from rebooting by broadcast mce
> > [4/4]: improve "kexec -l" robustness against broadcast mce
> >
> > When I tried to fix [1], Thomas raised concern about the nr_cpus' vulnerability
> > to unexpected rebooting by broadcast mce. After analysis, I think only the
> > following first case suffers from the rebooting by broadcast mce. [1-3/4] aims
> > to fix that issue.
> >
> > *** Back ground ***
> >
> > On x86 it's required to have all logical CPUs set CR4.MCE=1. Otherwise, a
> > broadcast MCE observing CR4.MCE=0b on any core will shutdown the machine.
> >
> > The option 'nosmt' has already complied with the above rule by Thomas's patch.
> > For detail, refer to 506a66f3748 (Revert "x86/apic: Ignore secondary threads if
> > nosmt=force")
> >
> > But for nr_cpus option, the exposure to broadcast MCE is a little complicated,
> > and can be categorized into three cases.
>
> One thing is not clear to me: are you "fixing" a hypothetical case here
> or have you *actually* experienced an MCE happening while kdumping with
> nr_cpus < num_online_cpus()?
No, I do not hit this issue by myself.
But from the following two commits:
commit 5bc329503e8191c91c4c40836f062ef771d8ba83
Author: Xunlei Pang <xlpang@redhat.com>
Date: Mon Mar 13 10:50:19 2017 +0100
x86/mce: Handle broadcasted MCE gracefully with kexec
And
commit 506a66f374891ff08e064a058c446b336c5ac760
Author: Thomas Gleixner <tglx@linutronix.de>
Date: Fri Jun 29 16:05:47 2018 +0200
Revert "x86/apic: Ignore secondary threads if nosmt=force"
This issue is in practice.
BTW, clarify one thing kdumping (kexec -p) will not suffer from mce
issue as described in case 2. Only "kexec -l" will.
>
> Btw, pls do not use lkml.org to refer to previous mails but
>
> http://lkml.kernel.org/r/<Message-ID>
OK, I will.
Thanks,
Pingfan
next prev parent reply other threads:[~2019-09-02 4:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-27 3:02 [PATCHv2 0/4] x86/mce: protect nr_cpus from rebooting by broadcast mce Pingfan Liu
2019-08-27 3:02 ` Pingfan Liu
2019-08-27 3:02 ` [PATCHv2 1/4] x86/apic: correct the ENO in generic_processor_info() Pingfan Liu
2019-08-27 3:02 ` Pingfan Liu
2019-08-27 3:02 ` [PATCHv2 2/4] x86/apic: record capped cpu " Pingfan Liu
2019-08-27 3:02 ` Pingfan Liu
2019-08-27 3:02 ` [PATCHv2 3/4] x86/smp: send capped cpus to a stable state when smp_init() Pingfan Liu
2019-08-27 3:02 ` Pingfan Liu
2019-08-27 3:02 ` [PATCHv2 4/4] x86/smp: disallow MCE handler on rebooting AP Pingfan Liu
2019-08-27 3:02 ` Pingfan Liu
2019-08-30 14:11 ` [PATCHv2 0/4] x86/mce: protect nr_cpus from rebooting by broadcast mce Borislav Petkov
2019-08-30 14:11 ` Borislav Petkov
2019-09-02 4:26 ` Pingfan Liu [this message]
2019-09-02 4:26 ` Pingfan Liu
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=20190902042642.GA22792@mypc \
--to=kernelfans@gmail.com \
--cc=bhe@redhat.com \
--cc=bp@alien8.de \
--cc=cai@lca.pw \
--cc=dave.hansen@linux.intel.com \
--cc=drake@endlessm.com \
--cc=dyoung@redhat.com \
--cc=ebiederm@xmission.com \
--cc=hpa@zytor.com \
--cc=jacob.jun.pan@linux.intel.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mhiramat@kernel.org \
--cc=mhocko@suse.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=vbabka@suse.cz \
--cc=x86@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.