Skip to content

linux-user: add openat2 support in linux-user

Michael Vogt qemu-devel 6 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest posting 2/20 of 1 patch 0 repliesNew
  2. v5 posting 1/21 patch 2 repliesSuperseded
  3. v41 patch 2 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v31 patch0 repliesSuperseded
v21 patch1 replySuperseded
v11 patch1 replySuperseded

Changes in v5 from the cover letter

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

Patches in v5 posting 2/2 No applies recorded yet

The patch the cover letter announces is not in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCH v5 0/1] linux-user: add openat2 support in linux-user

Hi,

This is v5 of the openat2 support in linux-user. Thanks for the excellent feedback from Laurent Vivier on v4.

This version is very close to v4 and only tweaks/simplifies based on the code review comments from Laurent, see the below changes for details.

Thanks again,
Michael

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 (1):
linux-user: add openat2 support in linux-user

 linux-user/syscall.c      | 107 +++++++++++++++++++++++++++++++++++++-
 linux-user/syscall_defs.h |   7 +++
 2 files changed, 112 insertions(+), 2 deletions(-)
Signature · 1 line
2.45.2