qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Vogt <michael.vogt@gmail.com>
To: qemu-devel@nongnu.org
Cc: Richard Henderson <richard.henderson@linaro.org>,
	Laurent Vivier <laurent@vivier.eu>,
	Michael Vogt <mvogt@redhat.com>
Subject: [PATCH v2 0/1] linux-user: add openat2 support in linux-user
Date: Thu, 29 Aug 2024 16:44:13 +0200	[thread overview]
Message-ID: <20240829144413.6942-2-mvogt@redhat.com> (raw)

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



             reply	other threads:[~2024-08-29 14:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-29 14:44 Michael Vogt [this message]
2024-08-29 14:44 ` [PATCH v2 1/1] linux-user: add openat2 support in linux-user Michael Vogt
2024-08-30  1:50   ` Richard Henderson

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=20240829144413.6942-2-mvogt@redhat.com \
    --to=michael.vogt@gmail.com \
    --cc=laurent@vivier.eu \
    --cc=mvogt@redhat.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).