From patchwork Sun Sep 25 20:20:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 9349911 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E58D1607F0 for ; Sun, 25 Sep 2016 20:22:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CEEF328C77 for ; Sun, 25 Sep 2016 20:22:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C151228C7A; Sun, 25 Sep 2016 20:22:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 50E7528C77 for ; Sun, 25 Sep 2016 20:22:46 +0000 (UTC) Received: from localhost ([::1]:40286 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boFwj-00079b-KO for patchwork-qemu-devel@patchwork.kernel.org; Sun, 25 Sep 2016 16:22:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35219) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boFud-0005Qk-Ds for qemu-devel@nongnu.org; Sun, 25 Sep 2016 16:20:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1boFua-00082k-0q for qemu-devel@nongnu.org; Sun, 25 Sep 2016 16:20:35 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:53851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boFuZ-00082b-MA for qemu-devel@nongnu.org; Sun, 25 Sep 2016 16:20:31 -0400 Received: from Quad.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue001) with ESMTPSA (Nemesis) id 0La7Bu-1b5pHt3rjC-00m3Dw; Sun, 25 Sep 2016 22:20:24 +0200 From: Laurent Vivier To: Riku Voipio Date: Sun, 25 Sep 2016 22:20:20 +0200 Message-Id: <1474834820-24198-1-git-send-email-laurent@vivier.eu> X-Mailer: git-send-email 2.7.4 X-Provags-ID: V03:K0:VLRWQegmC1HB182sgnMbkNkqtzOkRtEWc9wnWU7MtydC/MEQbpP yl4ZngbNK2ZV0a0H9AvYGKLJmxmnaKXY0Lnp0bnCKmx/OeM8hpZWreiq91HAN2rvhZZP5qg wA/cfoyOFy7XzDGH+Lqmx5XMTgA/oQV6KJ0CaO3mFKM0sZ1xXunqDJy+2Vn3dNY1WQKt/gL K5s7lXvNiz8XQHBWWFpKA== X-UI-Out-Filterresults: notjunk:1; V01:K0:MShNb9ox+g0=:4nHvKeWJCXU2LXffndqeuA jTfphyQdGwZx91I5wrJCTv4HTIrxOCjMW4p0YxUFxpVJRtb5iz9bjvoe2fCqXsvfYHbcMd9tw aX93Bz0xXRFeQDCApFmcENCNzDZL4zZDWrDr6whvLjUJiU9Yb7jUXmEmZ4C1jDsiob/PjrtOK 6Uj1J5oXTFfabvS2bxkOlg/6L/INf0SrrPigsD6L2nqhMRLwyoAuyu4XKtmCPLNVf3HMU323P cUPNdlwBxKbOFUARXeA6SRqvG4wg5G09A4cCqmMwyqlxvSk3KJZs9k3d5eu1zgw0FDjHG6Bjy QYmsUkNP/qEoT/S6TLbdWlP4Bh1d5SCE7MYVNsp+toZOTJKZTDRNq5drhPDcS0ZjWXvgS1F3G dUVka6NSdcgCAGo9T+55wh/FUZ1h0VrWIpkhPklE1U5I6QTcNhYg4GT4yrzr2SKFMFn6cPTo/ ZZ5l71PFOspTvKubvc1yPLtsLD++RGUogJo6Toxaqb+bcGSriv7kLZx+3uSh6lm3LeTxCfFLT nB1F9gdrJEeBtFmfSZ+mH8C73iVNYeL5T3vPCKaJsC4iG66L0K689IlHRACm39rJY41RV0tZN ZdejuFQA1BWi52ixoxnNWyP9X0FThD7x8PGJK9sJkuqC1V4kAlmogMzASmSQkud6Hnz+3zVao 6TO2DzE1+HknoAr1BC2Py1SuAj5HtHce/uhF27Lc8ht/kY9XBnHd6ydoGuNZtXmvOLbQ= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.134 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Laurent Vivier --- 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: