qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: James Hogan <james.hogan@imgtec.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Riku Voipio <riku.voipio@iki.fi>
Subject: Re: [Qemu-devel] [PATCH] linux-user: Correct DLINFO_ITEMS
Date: Tue, 25 Mar 2014 23:40:05 +0000	[thread overview]
Message-ID: <10826566.sqRAQYdTET@radagast> (raw)
In-Reply-To: <CAFEAcA-0oZxG9AW_6CrkjJTtzKYXhnxZ=6PSf6QfyybRQqmOCg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1306 bytes --]

On Tuesday 25 March 2014 22:20:04 Peter Maydell wrote:
> On 25 March 2014 21:47, James Hogan <james.hogan@imgtec.com> 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 <peter.maydell@linaro.org>
> for the immediate fix, though.

Thanks for reviewing,

Cheers
James


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2014-03-25 23:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-25 21:47 [Qemu-devel] [PATCH] linux-user: Correct DLINFO_ITEMS James Hogan
2014-03-25 22:20 ` Peter Maydell
2014-03-25 23:40   ` James Hogan [this message]
2014-03-25 23:51     ` Peter Maydell
2014-03-26  0:27       ` James Hogan
2014-03-26 12:08   ` Riku Voipio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10826566.sqRAQYdTET@radagast \
    --to=james.hogan@imgtec.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).