diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2017-11-07 18:25:18 +0000 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2017-11-20 16:15:41 +0200 |
commit | f516511ea84d8bb3395d6ea95a7c7b80dc2a05e9 (patch) | |
tree | eede4ad1c8d5100f1ad9cb19a31fc971fba62e74 /linux-user/host/mips | |
parent | 78bfef72fbf8705f002c5c57cf3f1d3b8e83399e (diff) |
linux-user: Fix calculation of auxv length
In commit 7c4ee5bcc82e643 we changed the order in which we construct
the AUXV, but forgot to adjust the calculation of the length. The
result is that we set info->auxv_len to a bogus and negative value,
and then later on the code in open_self_auxv() gets confused and
ends up presenting the guest with an empty file.
Since we now have to calculate the auxv length up-front as part
of figuring out how much we're going to put on the stack, set
info->auxv_len then; this allows us to assert that we put the
same number of entries into auxv as we pre-calculated, rather
than merely having a comment saying we need to do that.
Fixes: https://bugs.launchpad.net/qemu/+bug/1728116
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user/host/mips')
0 files changed, 0 insertions, 0 deletions