From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4D280B6F31 for ; Tue, 4 Aug 2009 06:15:17 +1000 (EST) Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 87AA6DDDA0 for ; Tue, 4 Aug 2009 06:15:16 +1000 (EST) In-Reply-To: <19062.57005.981901.24666@cargo.ozlabs.ibm.com> References: <4A76DB06.7090405@gmail.com> <19062.57005.981901.24666@cargo.ozlabs.ibm.com> Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <3136FD0E-6C97-4F03-80B9-0F509FA3CEAF@kernel.crashing.org> From: Segher Boessenkool Subject: Re: [PATCH] powerpc: Read buffer overflow Date: Mon, 3 Aug 2009 22:15:30 +0200 To: Paul Mackerras Cc: linuxppc-dev@ozlabs.org, Andrew Morton , Roel Kluin List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , > The change seems unnecessary since we only compute the address of the > element before the bounds check, we don't actually access the > element. I believe that is legal in C. If you have an array a[N], taking &a[0] .. &a[N] are legal C, everything else is not. Segher