From patchwork Mon Oct 17 13:24:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 9379285 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 9B7AA607D4 for ; Mon, 17 Oct 2016 13:34:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8B20328B03 for ; Mon, 17 Oct 2016 13:34:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7CADE29384; Mon, 17 Oct 2016 13:34:33 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 B201A28B03 for ; Mon, 17 Oct 2016 13:34:32 +0000 (UTC) Received: from localhost ([::1]:33091 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bw83j-0002OE-EK for patchwork-qemu-devel@patchwork.kernel.org; Mon, 17 Oct 2016 09:34:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38423) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bw7uV-0003Bq-TM for qemu-devel@nongnu.org; Mon, 17 Oct 2016 09:25:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bw7uR-0003DS-ST for qemu-devel@nongnu.org; Mon, 17 Oct 2016 09:24:59 -0400 Received: from mail-lf0-x229.google.com ([2a00:1450:4010:c07::229]:35984) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bw7uR-0003Co-Ke for qemu-devel@nongnu.org; Mon, 17 Oct 2016 09:24:55 -0400 Received: by mail-lf0-x229.google.com with SMTP id b75so288593944lfg.3 for ; Mon, 17 Oct 2016 06:24:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=G1J167YEI95YWTUH06fCZbwTABRB4GyOEjofGkdov/Y=; b=d9zXoxQoVDjQvxzva7efjl+DOzJCj6iyc3quzbt367OUmYdr8x/thxcHbnqbhX8rpF UwXwNtLrPG+KVcqhKkFYYq5SzctJLqWf9WMql7Pd6durPr7D5VMKNf4L4h97501/A6vN I0XJek+wuRvTQg5xatceLq1p+8PIM899gW7DY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=G1J167YEI95YWTUH06fCZbwTABRB4GyOEjofGkdov/Y=; b=QycRs5VxNQUSlrzdkOrSg/qiye4MmvfwznzjTvk9B5TE8p5VfINYZYblxtP46wgqoI d/M6jzqfPD1vNdBZsG/MjVN+KUkkeJaiCykNafsfy79S/XYzSfOcXkZeC4PmSWEUooMp +8P2rRksc3fNw8uMJKSCoTLeqzSoYIENTUFD1XcT2LC3VSnkUIKR3EsoZ4076c1/+FYQ 6xtT1GUzBVrlI1x8gYTZU79j9t0f/QfUyx5fTpZQwDvbivTecfQ/gK5EQxxY6FhwDW56 16KHkX2uJGj8VGEAFpQ97L05sdz6ePsjySrwHNsynhkaBeLyeqAPYk9KADeABo1oB89P +WvQ== X-Gm-Message-State: AA6/9Rlyoh8z71/lS4PID/aM+mjP9D022RQK40NTU8ZvTQDalq1PsaqwXY4EDfab+6MQjfcV X-Received: by 10.25.160.21 with SMTP id j21mr14886418lfe.149.1476710694217; Mon, 17 Oct 2016 06:24:54 -0700 (PDT) Received: from beaming.home (91-157-170-157.elisa-laajakaista.fi. [91.157.170.157]) by smtp.gmail.com with ESMTPSA id y81sm7782857lff.29.2016.10.17.06.24.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Oct 2016 06:24:53 -0700 (PDT) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Mon, 17 Oct 2016 16:24:27 +0300 Message-Id: <815206eae932b37e2ebb7bd63b56117dc53d2ba9.1476710353.git.riku.voipio@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::229 Subject: [Qemu-devel] [PULL 09/22] 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: Peter Maydell , Laurent Vivier Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Laurent Vivier Signed-off-by: Laurent Vivier Reviewed-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index a3e7d51..bcd97ba 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -306,6 +306,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, }, @@ -12098,6 +12103,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: