qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/1] linux-user: add openat2 support in linux-user
@ 2024-08-29 14:44 Michael Vogt
  2024-08-29 14:44 ` [PATCH v2 1/1] " Michael Vogt
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Vogt @ 2024-08-29 14:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Richard Henderson, Laurent Vivier, Michael Vogt

Hi,

This is v2 of the openat2 support in linux-user. Thanks for the
excellent feedback from Richard Henderson. I reworked/updated the
patch and (hopefully) addressed all comments/suggestions. Extracting
the helper made it much clearer indeed.

The patch still requires openat2.h from the host, But I added a
qemu_log_mask(LOG_UNIMP) when the passed "size" is bigger than our
defined target_open_how size. This should allow us to catch structure
changes (as we then also need to update our code that build the
open_how from target_open_how). But maybe I'm missing something (if so
my apologies!), I'm also happy always define "struct open_how" locally
if you prefer that.

Any feedback welcome!

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

Thanks for Richard Henderson and Florian Schueller for their
feedback.

Michael Vogt (1):
  linux-user: add openat2 support in linux-user

 linux-user/syscall.c      | 98 +++++++++++++++++++++++++++++++++++++--
 linux-user/syscall_defs.h |  7 +++
 meson.build               |  1 +
 3 files changed, 102 insertions(+), 4 deletions(-)

-- 
2.45.2



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-08-30  1:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-29 14:44 [PATCH v2 0/1] linux-user: add openat2 support in linux-user Michael Vogt
2024-08-29 14:44 ` [PATCH v2 1/1] " Michael Vogt
2024-08-30  1:50   ` Richard Henderson

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).