Sometimes zero is a valid value for getauxval (e.g. AT_EXECFD). Make
sure that we can distinguish between a valid zero value and a not found
entry by setting errno.
Assumes that getauxval from sys/auxv.h sets errno correctly.
Signed-off-by: Vivian Wang
---
util/getauxval.c | 6 +-
1 file
qemu-devel/20240721090817.120888-1-...@dram.page/
Vivian Wang (2):
util/getauxval: Ensure setting errno if not found
linux-user/main: Check errno when getting AT_EXECFD
linux-user/main.c | 3 ++-
util/getauxval.c | 6 +-
2 files changed, 7 insertions(+), 2 deletions(-)
--
2.45.1
It's possible for AT_EXECFD to end up with a valid value of 0. Check
errno when using qemu_getauxval instead of return value to handle this
case.
Not handling this case leads to a confusing condition where the
executable ends up as fd 0, i.e. stdin.
Signed-off-by: Vivian Wang
Review
On 7/22/24 08:18, Xingtao Yao (Fujitsu) wrote:
>
>> -Original Message-
>> From: qemu-devel-bounces+yaoxt.fnst=fujitsu@nongnu.org
>> On Behalf Of Vivian
>> Wang
>> Sent: Sunday, July 21, 2024 5:08 PM
>> To: qemu-devel@nongnu.org
>> Cc:
It's possible for AT_EXECFD to end up with a valid value of 0. Check
errno when using qemu_getauxval instead of return value to handle this
case.
Not handling this case leads to a confusing condition where the
executable ends up as fd 0, i.e. stdin.
Signed-off-by: Vivian Wang
Sometimes zero is a valid value for getauxval (e.g. AT_EXECFD). Make
sure that we can distinguish between a valid zero value and a not found
entry by setting errno.
Ignore getauxval from sys/auxv.h on glibc < 2.19 because it does not set
errno.
Signed-off-by: Vivian Wang
---
util/getauxva
Found when trying to build coreutils under linux-user as binfmt_misc
interpreter with "open-binary" flag.
I'm unsure whether the version detection in patch 1 makes sense. Please
advise on how to handle situations like this.
Resolves: https://gitlab.com/qemu-project/qemu/-/issu
ch that .align+.org
> wasn't actually honored. This new form doesn't require the
> test bytes to be aligned in the binary.
>
>
> r~
I've confirmed that this fixes #1155
Tested-by: Vivian Wang
> Ilya Leoshkevich (4):
> linux-user: Clear translations a
On 8/17/22 23:05, Ilya Leoshkevich wrote:
> Hi,
>
> I noticed that when we get a SEGV due to jumping to non-readable
> memory, sometimes si_addr and program counter in siginfo_t are slightly
> off. I tracked this down to the assumption that translators stop before
> the end of a page, while in real