From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 08:57:54 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64A541065672; Fri, 24 Apr 2009 08:57:54 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5353D8FC14; Fri, 24 Apr 2009 08:57:54 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3O8vsbg013389; Fri, 24 Apr 2009 08:57:54 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3O8vsm8013388; Fri, 24 Apr 2009 08:57:54 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200904240857.n3O8vsm8013388@svn.freebsd.org> From: Rafal Jaworowski Date: Fri, 24 Apr 2009 08:57:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191455 - head/sys/powerpc/aim X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2009 08:57:54 -0000 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. */