lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 10 Nov 2010 14:54:38 -0800
From:	"Bounine, Alexandre" <Alexandre.Bounine@....com>
To:	"Shaohui Xie" <b21989@...escale.com>, <akpm@...ux-foundation.org>
Cc:	<linux-kernel@...r.kernel.org>, <linuxppc-dev@...ts.ozlabs.org>,
	"Li Yang" <leoli@...escale.com>,
	"Kumar Gala" <kumar.gala@...escale.com>,
	"Roy Zang" <tie-fei.zang@...escale.com>
Subject: RE: [PATCH 3/4][v2] fsl_rio: move machine_check handler into machine_check_e500 & machine_check_e500mc

Shaohui Xie <b21989@...escale.com> wrote:
> 
> diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
> index a45a63c..2a5fb9d 100644
> --- a/arch/powerpc/kernel/traps.c
> +++ b/arch/powerpc/kernel/traps.c
> @@ -55,6 +55,7 @@
>  #endif
>  #include <asm/kexec.h>
>  #include <asm/ppc-opcode.h>
> +#include <linux/rio.h>
> 
>  #if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC)
>  int (*__debugger)(struct pt_regs *regs) __read_mostly;
> @@ -500,6 +501,13 @@ int machine_check_e500mc(struct pt_regs *regs)
>  		       reason & MCSR_MEA ? "Effective" : "Physical",
addr);
>  	}
> 
> +	if (reason & MCSR_BUS_RBERR) {
> +		printk("Bus - Read Data Bus Error\n");
> +#ifdef CONFIG_RAPIDIO
> +		recoverable = fsl_rio_mcheck_exception(regs);
> +#endif
> +	}
> +
>  	mtspr(SPRN_MCSR, mcsr);
>  	return mfspr(SPRN_MCSR) == 0 && recoverable;
>  }
> @@ -527,8 +535,12 @@ int machine_check_e500(struct pt_regs *regs)
>  		printk("Bus - Write Address Error\n");
>  	if (reason & MCSR_BUS_IBERR)
>  		printk("Bus - Instruction Data Error\n");
> -	if (reason & MCSR_BUS_RBERR)
> +	if (reason & MCSR_BUS_RBERR) {
>  		printk("Bus - Read Data Bus Error\n");
> +#ifdef CONFIG_RAPIDIO
> +		fsl_rio_mcheck_exception(regs);
> +#endif
> +	}
>  	if (reason & MCSR_BUS_WBERR)
>  		printk("Bus - Read Data Bus Error\n");
>  	if (reason & MCSR_BUS_IPERR)

This implementation breaks an intended use of
fsl_rio_mcheck_exception(): 
1. for e500 it does not check the return value of the rio handler and
crashes the system even after RIO Mchk was serviced. Looks like e500mc
version handles it better but I have no HW to test it.
2. the RIO Mchk is expected to be handled quietly but here it has many
printk's. May be it is better to call the fsl_rio_mcheck_exception()
handler in very beginning and simply exit if it returns 1.

Alex.
 
  
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ