diff options
| author | Rainer Müller <raimue@codingfarm.de> | 2022-07-29 17:49:51 +0200 |
|---|---|---|
| committer | Laurent Vivier <laurent@vivier.eu> | 2022-08-02 15:44:27 +0200 |
| commit | 5b63de6b54add51822db3c89325c6fc05534a54c (patch) | |
| tree | d67fc7784783a263d271656d386d9ae7c19d049b /include/qemu/host-utils.h | |
| parent | f71fa4e3bb22f534ee668e7f4bdf64e59c193afd (diff) | |
| download | focaccia-qemu-5b63de6b54add51822db3c89325c6fc05534a54c.tar.gz focaccia-qemu-5b63de6b54add51822db3c89325c6fc05534a54c.zip | |
linux-user: Use memfd for open syscall emulation
For certain paths in /proc, the open syscall is intercepted and the returned file descriptor points to a temporary file with emulated contents. If TMPDIR is not accessible or writable for the current user (for example in a read-only mounted chroot or container) tools such as ps from procps may fail unexpectedly. Trying to read one of these paths such as /proc/self/stat would return an error such as ENOENT or EROFS. To relax the requirement on a writable TMPDIR, use memfd_create() instead to create an anonymous file and return its file descriptor. Signed-off-by: Rainer Müller <raimue@codingfarm.de> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220729154951.76268-1-raimue@codingfarm.de> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'include/qemu/host-utils.h')
0 files changed, 0 insertions, 0 deletions