From patchwork Tue Oct 18 13:21:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 78048 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp890046qge; Tue, 18 Oct 2016 06:38:25 -0700 (PDT) X-Received: by 10.55.23.105 with SMTP id i102mr495683qkh.301.1476797905525; Tue, 18 Oct 2016 06:38:25 -0700 (PDT) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id a128si19988256qkf.231.2016.10.18.06.38.25 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 18 Oct 2016 06:38:25 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41575 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwUb3-0003Hw-0c for patch@linaro.org; Tue, 18 Oct 2016 09:38:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53816) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwULJ-0006J6-1W for qemu-devel@nongnu.org; Tue, 18 Oct 2016 09:22:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwULF-0000fU-Qn for qemu-devel@nongnu.org; Tue, 18 Oct 2016 09:22:09 -0400 Received: from mail-lf0-x230.google.com ([2a00:1450:4010:c07::230]:35947) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bwULF-0000ew-IF for qemu-devel@nongnu.org; Tue, 18 Oct 2016 09:22:05 -0400 Received: by mail-lf0-x230.google.com with SMTP id b75so346722162lfg.3 for ; Tue, 18 Oct 2016 06:22:05 -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=86dLvfUbmRIkOHRgemBVGv6UX8RcafodLAg9UkVYBA0=; b=atM1cr+YuCxqy5oTE2mYpdZ6LiObEwV6vyoL7+8IpEu62Taup2Ysasz15JadhFjBv+ X8lX6kEYs/ecoIGVCBexhdfXvoDRuC3vcqPGn+vIY6wbE8pMmIPtcmK6n1LEkPyGG6Kn 4m2If6eAQfJ6RDFQ0Ba42Pi9s0THMwZV8Aa7A= 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=86dLvfUbmRIkOHRgemBVGv6UX8RcafodLAg9UkVYBA0=; b=iqxV5pmgiFziaPwd9coX0RBETQB/xohSFAPrCyKXKBdHIz7lVhNMfhWfsEdU6xbLGf PhBq4/UsSIKCY950+89LGjc+Av9Aiwo5/TMn++YdniKyqqxdMuy7cTZr3++XZX5FmCku BQzh/1iGTI+nDgmGHe4Neq8pOMsULbD70vBsQuIqviNGicMeRteKiXw4LfeyHbnABbmt arQN5Cdw8Oy2lClp9FJg5cvE63FiJzZSOepe/Oi1CqJeUsq02oLF8m2MOsGnU2EXnFtC QOLMCZB6rp1UAi+rpM74uFLlJU3TOH0aLqXku77WbL5ksAwu2XC6M/KmqEvcuFw3wpFn zEAw== X-Gm-Message-State: AA6/9RnTJDVzQAAfAr5YijIdjJqyYmb4uPMNl11d+Efw4j9GIOcjM7wFLe4s/tTNpO1ceTzP X-Received: by 10.25.74.9 with SMTP id x9mr566598lfa.176.1476796923006; Tue, 18 Oct 2016 06:22:03 -0700 (PDT) Received: from beaming.home (91-157-170-157.elisa-laajakaista.fi. [91.157.170.157]) by smtp.gmail.com with ESMTPSA id 201sm9535359ljf.48.2016.10.18.06.22.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 18 Oct 2016 06:22:02 -0700 (PDT) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Tue, 18 Oct 2016 16:21:37 +0300 Message-Id: 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::230 Subject: [Qemu-devel] [PULL v2 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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(+) -- 2.1.4 diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 3396d4b..e005401 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, }, @@ -12099,6 +12104,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: