From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkBj5-0000I9-Mt for qemu-devel@nongnu.org; Wed, 05 Jun 2013 07:18:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UkBj0-0006ug-SX for qemu-devel@nongnu.org; Wed, 05 Jun 2013 07:17:59 -0400 Received: from lhrrgout.huawei.com ([194.213.3.17]:22349) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkBj0-0006uV-Jo for qemu-devel@nongnu.org; Wed, 05 Jun 2013 07:17:54 -0400 Message-ID: <51AF1E55.3000108@huawei.com> Date: Wed, 5 Jun 2013 13:17:41 +0200 From: Claudio Fontana MIME-Version: 1.0 References: <1370126121-22975-1-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1370126121-22975-1-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/2] linux-user: Drop direct use of openat etc syscalls List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Riku Voipio , qemu-devel@nongnu.org, patches@linaro.org On 02.06.2013 00:35, Peter Maydell wrote: > 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(-) > Tested on aarch64 with Foundation v8. Tested-by: Claudio Fontana