|Subject:||Re: [Qemu-trivial] [Qemu-devel] [PATCH v2] linux-user: fix is_proc_myself to check the paths via realpath|
|Date:||Thu, 02 Nov 2017 18:26:35 +0000|
On 10/27/2017 09:07 PM, Zach Riggle wrote:
> Another case that may be more relevant for general QEMU use, is that the
> current code fails if the software under test has poor path-handling code.
> For example, any of
> - //proc/self/maps
> - /proc//self/maps
> - /proc/self//maps
> Will all return the non-emulated results. Those examples are just path
> canonicalization issues and could be resolved with e.g.
> canonicalize_file_name, but I'm not sure if QEMU allows GNU extensions --
> and realpath() is portable.
By definition, in linux-user, we ARE using glibc; therefore, you are
free to use all GNU extensions.
And you'd be surprised at how many non-glibc implementations of
realpath() are not POSIX-compliant, even though that is not relevant here.
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
|[Prev in Thread]||Current Thread||[Next in Thread]|