From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from kirsty.vergenet.net (kirsty.vergenet.net [202.4.237.240]) by ozlabs.org (Postfix) with ESMTP id E17A6B7D27 for ; Mon, 10 May 2010 19:19:43 +1000 (EST) Date: Mon, 10 May 2010 18:19:40 +0900 From: Simon Horman To: Michael Neuling Subject: Re: [PATCH] kexec-tools, ppc64: Fix segfault on parsing of large device trees. Message-ID: <20100510091940.GA16856@verge.net.au> References: <4BE78E06.6080601@ozlabs.org> <31392.1273467303@neuling.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <31392.1273467303@neuling.org> Cc: linuxppc-dev@ozlabs.org, kexec@lists.infradead.org, Matt Evans List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, May 10, 2010 at 02:55:03PM +1000, Michael Neuling wrote: > > > In message <4BE78E06.6080601@ozlabs.org> you wrote: > > > > ppc64's fs2dt used to use a fixed-size array into which the device tree > > was parsed. There was no bounds checking, so with a large device tree other > > heap data ended up getting stomped -- SIGSEGV time. > > > > This patch adds a function, 'dt_reserve', to check whether there's enough spa > ce > > left prior to writing data to the array. If not, the array is realloced. > > > > Signed-off-by: Matt Evans > > FWIW... > > Ack-by: Michael Neuling > > (also added linuxppc-dev@ozlabs.org to CC list) Thanks, applied.