Date: Fri, 24 Apr 2009 08:57:54 +0000 (UTC) From: Rafal Jaworowski <raj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r191455 - head/sys/powerpc/aim Message-ID: <200904240857.n3O8vsm8013388@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: raj Date: Fri Apr 24 08:57:54 2009 New Revision: 191455 URL: http://svn.freebsd.org/changeset/base/191455 Log: Zero PCB during early AIM PowerPC init. When memory is not zero'ed by firmware, uninitialized PCB can have bogus contents, which appear as a saved onfault condition, Altivec context to restore etc. and lead to corruption/crashes. This commit fixes such issues. Submitted by: Michal Mazur arg ! semihalf dot com Tested by: Andreas Tobler andreast-list ! fgznet dot ch Modified: head/sys/powerpc/aim/machdep.c Modified: head/sys/powerpc/aim/machdep.c ============================================================================== --- head/sys/powerpc/aim/machdep.c Fri Apr 24 06:44:58 2009 (r191454) +++ head/sys/powerpc/aim/machdep.c Fri Apr 24 08:57:54 2009 (r191455) @@ -505,6 +505,7 @@ powerpc_init(u_int startkernel, u_int en thread0.td_pcb = (struct pcb *) ((thread0.td_kstack + thread0.td_kstack_pages * PAGE_SIZE - sizeof(struct pcb)) & ~15); + bzero((void *)thread0.td_pcb, sizeof(struct pcb)); pc->pc_curpcb = thread0.td_pcb; /* Initialise the message buffer. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904240857.n3O8vsm8013388>