From patchwork Thu Oct 6 12:56:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 678909 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sqY7F1jThz9s1h for ; Fri, 7 Oct 2016 00:15:53 +1100 (AEDT) Received: from localhost ([::1]:56018 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bs8Wb-0008PC-Og for incoming@patchwork.ozlabs.org; Thu, 06 Oct 2016 09:15:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bs8Dn-0007iU-O9 for qemu-devel@nongnu.org; Thu, 06 Oct 2016 08:56:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bs8Dk-0007Mv-If for qemu-devel@nongnu.org; Thu, 06 Oct 2016 08:56:23 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:63168) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bs8Dk-0007Md-9L for qemu-devel@nongnu.org; Thu, 06 Oct 2016 08:56:20 -0400 Received: from Quad.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue003) with ESMTPSA (Nemesis) id 0MSVhA-1bQbRH1uZI-00RVoa; Thu, 06 Oct 2016 14:56:11 +0200 From: Laurent Vivier To: Riku Voipio Date: Thu, 6 Oct 2016 14:56:04 +0200 Message-Id: <1475758564-4449-1-git-send-email-laurent@vivier.eu> X-Mailer: git-send-email 2.7.4 X-Provags-ID: V03:K0:9GSZ7sHs6fKV6UH8jAahmve5f6t0Cib0dsovO14r5612KDQxrYE k8vPjRr8KBBWUrRAnMh5ZMDHWqDjxGIz6A1JoHfXM4X0dLvTuSjaX9Xd5MPMKn3szecOp5O 1a0T8YGBZ9wlwDZci6Mh2r/NxlV5YRpW+l26J+p+rJPkj7Gvb2z6TOOg5yBil4k532pzb0a CC7JjYJs1oPLYS1pTRslg== X-UI-Out-Filterresults: notjunk:1; V01:K0:CRxedhMZCEk=:mKiqTqN68017TX6P5ATxsP RAPKkt3VU9AalS/aZar2ul1636/uCeGd1cARultXraThJ01LEFkUOllearYLTFzaJeTg7L3WI S5EmNEPYjsVKRyeEvIT4UwQuPV18D/UD4EFHXsCBUwdG3r1rfRGaBzHYDvfAHFm1aohIa5kaY anHeb9M8B6Wxmxzk2BN6cCT8oxmgmh/dqER8d0gwYaQyL9cGIUS59zG7NgSH9vrQIk3tiMKL5 xd7bxGOUbMbcfUYs4ynroA0OyuESDjl96SIpjAOqjXGmPBX8X9BdS7YrzPXNWX6aFiwM2SaxG M3XrmkAspWOtLF5f5laG3C0APBDocHughmsR64Ati5rJ9JtYfABXPg5cR8GFqJhjmanquM6Wl EEX8EbcK91Vh3Kij26FJDUVnODMGSMtbrvsEYhrJt7Q0vO4VSsDSCVwubtiJHViS7rM+a0uZ4 knzm8s2wv//Olvsc9IG7R2curfehME7jjGat327W6lbtafCoaevH7BBctlg38b28O+zaNnZ79 tSBED3R120FGfL8LEAyo68WrO3ZihTEEz34p6stu5TAyspK2xpuemMy3Q83Za2JcRma21Cll4 CFo16a2CDqcL5ztz/YCQav8eko0WtUSDs7v1mp4MATBaGiYq2yaXh6ito04FO0HDtuq82Oqhm 3sDZ19DTHWGJgX81aAc+kTBzN2S9xBn+FRrZFJ6NypABnEye0/j83F8bYk9UfxiSdj6U= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.133 Subject: [Qemu-devel] [PATCH] linux-user: add kcmp() syscall X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org, Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Laurent Vivier Reviewed-by: Peter Maydell --- linux-user/syscall.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index d21d901..a32386e 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -304,6 +304,11 @@ _syscall3(int, ioprio_set, int, which, int, who, int, ioprio) _syscall3(int, getrandom, void *, buf, size_t, buflen, unsigned int, flags) #endif +#if defined(TARGET_NR_kcmp) && defined(__NR_kcmp) +_syscall5(int, kcmp, pid_t, pid1, pid_t, pid2, int, type, + unsigned long, idx1, unsigned long, idx2) +#endif + static bitmask_transtbl fcntl_flags_tbl[] = { { TARGET_O_ACCMODE, TARGET_O_WRONLY, O_ACCMODE, O_WRONLY, }, { TARGET_O_ACCMODE, TARGET_O_RDWR, O_ACCMODE, O_RDWR, }, @@ -11943,6 +11948,11 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, ret = get_errno(unshare(arg1)); break; #endif +#if defined(TARGET_NR_kcmp) && defined(__NR_kcmp) + case TARGET_NR_kcmp: + ret = get_errno(kcmp(arg1, arg2, arg3, arg4, arg5)); + break; +#endif default: unimplemented: