qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] linux-user: Drop direct use of openat etc syscalls
@ 2013-06-01 22:35 Peter Maydell
  2013-06-01 22:35 ` [Qemu-devel] [PATCH 1/2] " Peter Maydell
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Peter Maydell @ 2013-06-01 22:35 UTC (permalink / raw)
  To: qemu-devel; +Cc: Riku Voipio, Claudio Fontana, patches

The linux-user syscall emulation layer currently supports the openat
family of syscalls via two mechanisms: simply calling the corresponding
libc functions, and making direct syscalls. Since glibc has supported
these functions since at least glibc 2.5, there's no real need to
retain the (essentially untested) direct syscall fallback code, so
this patchset simply deletes it.

This allows us to remove some ifdeffery that was attempting to disable
provision of some of the syscalls if the host didn't seem to support
them, which in some cases was actually wrong. For example where there
are several flavours of the syscall, we only need one of them, not
necessarily the exact one the guest has, as with the fstatat* calls.
And if the guest needs the futimesat() syscall we can provide it
via glibc, even if that syscall is deprecated or not provided in the
host (because the host implements utimensat instead). AArch64 in
particular hits the last of these, which resulted in a compile
failure due to an unused function, because the syscall implementation's
ifdef was inconsistent with the ifdef used to define the sys_futimesat()
function.

Basically, removing the ugly direct syscall access seemed nicer
than trying to fix up and render consistent the broken ifdefs :-)

[RHEL5 has glibc2.5 and provides these functions. RHEL4 did not
but we don't build on RHEL4 anyhow because its glib is too old.
uClibc provides these functions.]

Peter Maydell (2):
  linux-user: Drop direct use of openat etc syscalls
  configure: Drop CONFIG_ATFILE test

 configure            |   26 ------
 linux-user/syscall.c |  218 ++++++--------------------------------------------
 2 files changed, 24 insertions(+), 220 deletions(-)

-- 
1.7.9.5

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

end of thread, other threads:[~2013-06-05 11:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-01 22:35 [Qemu-devel] [PATCH 0/2] linux-user: Drop direct use of openat etc syscalls Peter Maydell
2013-06-01 22:35 ` [Qemu-devel] [PATCH 1/2] " Peter Maydell
2013-06-01 22:35 ` [Qemu-devel] [PATCH 2/2] configure: Drop CONFIG_ATFILE test Peter Maydell
2013-06-03 15:04 ` [Qemu-devel] [PATCH 0/2] linux-user: Drop direct use of openat etc syscalls Richard Henderson
2013-06-05 11:17 ` Claudio Fontana

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