From: Michael Vogt <mvogt@redhat.com>
To: qemu-devel@nongnu.org
Cc: Michael Vogt <michael.vogt@gmail.com>,
Richard Henderson <richard.henderson@linaro.org>,
Laurent Vivier <laurent@vivier.eu>,
Michael Vogt <mvogt@redhat.com>
Subject: [PATCH v8 0/2] linux-user: add openat2 support in linux-user
Date: Mon, 30 Sep 2024 19:07:17 +0200 [thread overview]
Message-ID: <cover.1727715697.git.mvogt@redhat.com> (raw)
This is v8 of the openat2 support in linux-user. Thanks for the
feedback from Laurent on v7, really appreciated.
This version addresses the feedback for v7. It's mostly details, see
the changelog below.
Looking forward to your feedback/ideas!
Thanks,
Michael
v7 -> v8
- use "tswap64(how.flags)" in do_openat2()
- drop printing "size=" from strace.c
v6 -> v7
- use abi_ulong in guest_size
- use TARGET_ABI_FMT_lu to format guest size in qemu_log_mask()
- drop #ifdef for TARGET_NR_openat2
- fix LTP test by checking for RESOLVE_NO_{MAGIC,SYM}LINKS in
maybe_do_fake_open()
- add support for openat2 in strace.c
- add copy_struct_from_user definition to qemu.h
- add open_how_v0 to syscall_defs.h
v5 -> v6
- do not use get_errno(fd) in do_guest_openat()
- do not put declarations in the middle of the code
- do not return early in do_openat2() when we get a faked file
v4 -> v5
- drop "*use_returned_fd" from maybe_do_fake_open() and use return value
-2 to signal to the caller to continue
- keep "pathname" in parameter to do_guest_openat() for a cleaner diff
- fix two missing get_errno(fd)
v3 -> v4:
- fix typos in the commit message
v2 -> v3:
- fix coding style (braches)
- improve argument args/naming in do_openat2()
- merge do_openat2/do_guest_openat2
- do size checks first in do_openat2
- add "copy_struct_from_user" and use in "do_openat2()"
- drop using openat2.h and create "struct open_how_v0"
- log if open_how guest struct is bigger than our supported struct
v1 -> v2:
- do not include <sys/syscall.h>
- drop do_guest_openat2 from qemu.h and make static
- drop "safe" from do_guest_openat2
- ensure maybe_do_fake_open() is correct about when the result should
be used or not
- Extract do_openat2() helper from do_syscall1()
- Call user_unlock* if a lock call fails
- Fix silly incorrect use of "target_open_how" when "open_how" is required
- Fix coding style comments
- Fix validation of arg4 in openat2
- Fix missing zero initialization of open_how
- Define target_open_how with abi_* types
- Warn about unimplemented size if "size" of openat2 is bigger than
target_open_how
Michael Vogt (2):
linux-user: add openat2 support in linux-user
linux-user: add strace support for openat2
linux-user/qemu.h | 9 ++++
linux-user/strace.c | 40 ++++++++++++++++
linux-user/strace.list | 3 ++
linux-user/syscall.c | 99 ++++++++++++++++++++++++++++++++++++++-
linux-user/syscall_defs.h | 18 +++++++
meson.build | 1 +
6 files changed, 168 insertions(+), 2 deletions(-)
--
2.45.2
next reply other threads:[~2024-09-30 17:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-30 17:07 Michael Vogt [this message]
2024-09-30 17:07 ` [PATCH v8 1/2] linux-user: add openat2 support in linux-user Michael Vogt
2024-10-01 9:24 ` Laurent Vivier
2024-09-30 17:07 ` [PATCH v8 2/2] linux-user: add strace support for openat2 Michael Vogt
2024-10-01 9:29 ` 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=cover.1727715697.git.mvogt@redhat.com \
--to=mvogt@redhat.com \
--cc=laurent@vivier.eu \
--cc=michael.vogt@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).