lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1224909595.16090.5.camel@localhost>
Date:	Sat, 25 Oct 2008 15:39:55 +1100
From:	Michael Ellerman <michael@...erman.id.au>
To:	Carl Love <cel@...ibm.com>
Cc:	oprofile-list@...ts.sourceforge.net, linuxppc-dev@...abs.org,
	cel@...ux.vnet.ibm.com, cbe-oss-dev@...abs.org,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [Cbe-oss-dev] [PATCH] Cell OProfile: Incorrect local array
	size in	activate spu profiling function

On Fri, 2008-10-24 at 11:47 -0700, Carl Love wrote:
> The size of the pm_signal_local array should be equal to the
> number of SPUs being configured in the call.  Currently, the
> array is of size 4 (NR_PHYS_CTRS) but being indexed by a for 
> loop from 0 to 7 (NUM_SPUS_PER_NODE).  

While you're at it you should change to using ARRAY_SIZE() in the for
loop, and use sizeof in the rtas call - that way you'll only have the
size in one place.

I notice pm_rtas_activate_signals() also allocates a pm_signal_local on
the stack and iterates over it. I take it something guarantees that
count in that routine will not exceed NR_PHYS_CTRS ?

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

Download attachment "signature.asc" of type "application/pgp-signature" (190 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ