lkml.org 
[lkml]   [2009]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 03/31] x86: MCE: Fix EIPV behaviour with !PCC
Andi Kleen wrote:
> From: Huang Ying <ying.huang@intel.com>
>
> Impact: Spec compliance
>
> When tolerant == 0, system should go panic instead of send SIGBUS even
> for a MCE with EPIV && !PCC on user space.
>
> Signed-off-by: Huang Ying <ying.huang@intel.com>
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
> arch/x86/kernel/cpu/mcheck/mce.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
> index 3f158d7..e1271ac 100644
> --- a/arch/x86/kernel/cpu/mcheck/mce.c
> +++ b/arch/x86/kernel/cpu/mcheck/mce.c
> @@ -485,7 +485,7 @@ void do_machine_check(struct pt_regs *regs, long error_code)
> * force_sig() takes an awful lot of locks and has a slight
> * risk of deadlocking.
> */
> - if (user_space) {
> + if (user_space && tolerant > 0) {
> force_sig(SIGBUS, current);
> } else if (panic_on_oops || tolerant < 2) {
> mce_panic("Uncorrected machine check",

Again, this patch is useless.

if (m.status & MCI_STATUS_EN) {
/* if PCC was set, there's no way out */
no_way_out |= !!(m.status & MCI_STATUS_PCC);
/*
* If this error was uncorrectable and there was
* an overflow, we're in trouble. If no overflow,
* we might get away with just killing a task.
*/
if (m.status & MCI_STATUS_UC) {
if (tolerant < 1 || m.status & MCI_STATUS_OVER)
no_way_out = 1;
kill_it = 1;
}
} else {
if (no_way_out && tolerant < 3)
mce_panic("Machine check", &panicm, mcestart);
if (kill_it && tolerant < 3) {
if (user_space) {
force_sig(SIGBUS, current);
} else if (panic_on_oops || tolerant < 2) {
mce_panic("Uncorrected machine check",
&panicm, mcestart);
}
}
We never reach there with tolerant == 0.

And you will remove this code in your 25/31.


Thanks,
H.Seto



\
 
 \ /
  Last update: 2009-05-27 06:33    [from the cache]
©2003-2011 Jasper Spaans