qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] linux-user: Correct DLINFO_ITEMS


From: James Hogan
Subject: Re: [Qemu-devel] [PATCH] linux-user: Correct DLINFO_ITEMS
Date: Tue, 25 Mar 2014 23:40:05 +0000
User-agent: KMail/4.11.5 (Linux/3.13.5+; KDE/4.11.5; x86_64; ; )

On Tuesday 25 March 2014 22:20:04 Peter Maydell wrote:
> On 25 March 2014 21:47, James Hogan <address@hidden> 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 <address@hidden>
> for the immediate fix, though.

Thanks for reviewing,

Cheers
James

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]