From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58047) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSaxB-00060l-OR for qemu-devel@nongnu.org; Tue, 25 Mar 2014 19:40:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WSax6-0001bU-AR for qemu-devel@nongnu.org; Tue, 25 Mar 2014 19:40:21 -0400 Received: from mail-wg0-f51.google.com ([74.125.82.51]:46688) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSax6-0001b3-4e for qemu-devel@nongnu.org; Tue, 25 Mar 2014 19:40:16 -0400 Received: by mail-wg0-f51.google.com with SMTP id k14so714806wgh.34 for ; Tue, 25 Mar 2014 16:40:15 -0700 (PDT) Sender: James Hogan From: James Hogan Date: Tue, 25 Mar 2014 23:40:05 +0000 Message-ID: <10826566.sqRAQYdTET@radagast> In-Reply-To: References: <1395784048-28123-1-git-send-email-james.hogan@imgtec.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart21154828.VTA3WW2q3j"; micalg="pgp-sha1"; protocol="application/pgp-signature" Subject: Re: [Qemu-devel] [PATCH] linux-user: Correct DLINFO_ITEMS List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Riku Voipio --nextPart21154828.VTA3WW2q3j Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" On Tuesday 25 March 2014 22:20:04 Peter Maydell wrote: > On 25 March 2014 21:47, James Hogan wrote: > > Commit a07c67dfccb1 (Implement AT_CLKTCK.) back in March 2008 added a > > new auxvec entry but didn't increment DLINFO_ITEMS, so it's been out of > > sync ever since. > > > > Bump it up to 14 so that it matches the number of NEW_AUX_ENT's that > > need to be counted in create_elf_tables(). > > This code could clearly use at least an assert that we've not written more > entries than we should, or ideally restructuring somehow so that we don't > have to set DLINFO_ITEMS by hand in the first place... Good idea. I've just submitted a patch to add an assert that the allocated stack for auxvec/envp/argv matches the amount used. I've already re-factored a bunch of this code to handle stacks which grow upwards (as used for HPPA and Meta arches), which would make it even more awkward to avoid DLINFO_ITEMS since it still builds the auxvec, envp and argv downwards within a new stack frame (grown upwards), so it also needs to know how much stack frame to allocate in advance to be sure it doesn't clobber other stuff lower on the stack. > Reviewed-by: Peter Maydell > for the immediate fix, though. Thanks for reviewing, Cheers James --nextPart21154828.VTA3WW2q3j Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJTMhPbAAoJEKHZs+irPybfv1AP/RFDlyAwC+Zc5ObJoYNArEfg Jwh67RPMGoSKi3M+ZH+eIulst+qZZEW00fvfUnoxMLUFOgzop/BQfNXiy5RlzyQx ao0uFn5zrnHsFxjUkaTl2538FKq44XT1CrvuZd+COcOwC6L3lWpP4xrN6ud8oG2g ZZxVEO/3vIZNOwkAkCzeYxPtD+TcHOg1JW6DC8D3AXq0jDtvlVDTVccav5GP4ah5 Rvu4r31iGMKCKWHT1z0bdmc5ZAAkH03ARmCFzuMSCkJ1SqZx0xB4MlK7RjW7kU/R JQhrKMDYhzBKUkEbT/9MwBNjlvxnnPSN2Lg/ofwiWXhFH6gMPVDPSsvxgVefHmM8 7fbrOH68/vSjeB/HQ8kCq1H6g6FXT5pW+/tQDgTeRac1m3cU8Xn96DDAzRWdvuAM cM6SyQDK4f6ueerJqzE/50237QA7PTE64Abl8jNZ2dkErwEHQuBUr4qy8n6hFMPR k965niufAB0JHHfSMH64enlZqmuO7Gmf7K1Kn7RicSPG7+jqo38gh+nG+ulbUhF1 74VgLbezyxOLBBTVs67UCyLfbV8wBpHz54zsKlJIb8M5kAFrRTdjkwj+wio30Idq s5squzbRMTAfx3ywPfpHerPspxIQG72BB9PqGnm2Bjehj1RViZUhkLVC/PIGzH8Z 6XI2+KTtEQ3gVdtNxgWI =bHle -----END PGP SIGNATURE----- --nextPart21154828.VTA3WW2q3j--