Port-powerpc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kernel panic on ibm4xx-based powerpc box with DDB



> On Dec 27, 2016, at 1:26 AM, Rin Okuyama <rokuyama%rk.phys.keio.ac.jp@localhost> wrote:
> 
> I would like to fix port-powerpc/51367,
> 
> http://gnats.netbsd.org/51367
> 
> where ibm4xx-based machine is unstable with DDB option is specified.
> 
> DDB hooks the program interrupt (EXC_PGM). In the privileged mode,
> this is OK. However, in the user mode, it must dispatch directly
> to the usual trap handler, in the same manner as OEA:
> 
> http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/powerpc/powerpc/trap_subr.S#rev1.51
> 
> Otherwise, for example, a FPU instruction in the user mode triggers
> the program interrupt (ibm4xx does not have FPU), which results in
> inappropriate execution of DDB handler and kernel panic.
> 
> With attached patch, DDB and IPKDB handlers check whether they run
> in the privileged or user modes as in a similar manner to
> powerpc/trap_subr.S rev >= 1.51, raised above. I've confirmed that
> kernel panics are avoided on my OPENBLOCKS266. Can I commit this?
> 
> Thanks,
> Rin

Why don't use you

	ACCESS_PROLOG(CI_DDBSAVE)
	bla	ddbtrap

and just rid of ddbstk?  since ddbstk/ipkdbstk don't support nested traps.

Ditto for ipkdbtrap.



Home | Main Index | Thread Index | Old Index