From: Andreas Schwab <schwab@suse.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Laurent Vivier <laurent@vivier.eu>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH] linux-user: Use getcwd syscall directly
Date: Tue, 07 Apr 2020 13:55:21 +0200 [thread overview]
Message-ID: <mvmblo38q8m.fsf@suse.de> (raw)
In-Reply-To: <CAFEAcA_zbeBM7iFd10ut4UTYDifJ=SWjMD1KYOJgKX=4OQSkmw@mail.gmail.com> (Peter Maydell's message of "Tue, 7 Apr 2020 11:57:31 +0100")
On Apr 07 2020, Peter Maydell wrote:
> On Tue, 7 Apr 2020 at 11:37, Laurent Vivier <laurent@vivier.eu> wrote:
>>
>> Le 06/04/2020 à 17:18, Andreas Schwab a écrit :
>> > The glibc getcwd function returns different errors than the getcwd
>> > syscall, which triggers an assertion failure in the glibc getcwd function
>> > when running under the emulation.
>
> What exactly are the differences in errors ?
It's ENAMETOOLONG vs. ERANGE. When the syscall returns ENAMETOOLONG,
the glibc wrapper uses a fallback implementation that potentially
handles an unlimited path length, and returns with ERANGE if the
provided buffer is too small. The qemu emulation cannot distinguish the
two cases, and thus always returns ERANGE. This is unexpected by the
glibc wrapper.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
next prev parent reply other threads:[~2020-04-07 11:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-06 15:18 [PATCH] linux-user: Use getcwd syscall directly Andreas Schwab
2020-04-07 10:36 ` Laurent Vivier
2020-04-07 10:57 ` Peter Maydell
2020-04-07 11:55 ` Andreas Schwab [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-07-23 10:27 Andreas Schwab
2020-07-24 13:52 ` Laurent Vivier
2020-07-27 20:07 ` Laurent Vivier
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=mvmblo38q8m.fsf@suse.de \
--to=schwab@suse.de \
--cc=laurent@vivier.eu \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.