From patchwork Mon Jun 23 13:26:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 32367 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f198.google.com (mail-we0-f198.google.com [74.125.82.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 15D74203AC for ; Mon, 23 Jun 2014 14:32:50 +0000 (UTC) Received: by mail-we0-f198.google.com with SMTP id x48sf4454220wes.5 for ; Mon, 23 Jun 2014 07:32:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=5dEoEE65qDVfPHBTmKDabd2Mey4xrJnguN8x9FElFnc=; b=Gffl4x7zT4nvFtckYJgyWyS7xKWK9wLmIW/97LC9uiUjjrkhJZ8wzatAdCc6/LCMx5 N7pzYoSiW6+HFpOJiTdhdjC/odnCUa+/u1T+HwNWlCQ5eCOChdRwOmrNczHh1R/QEGIB 4DKyBiAJLVUDgMqu+H+BOMAlBM5e0MEi+My0oo6CqGww+qRc060p08GoADGzMs7X0Gop bW+LGpsfb6KrB2dr/TTttM7gQNASnxPFDo9e3CRFNJawGeTdkl2AR/gL+wRXXaMLs2NT ahMhyfl72D7nE8D5XdSl6pSAs1OVWaeJQrTd/5UTVL8QzDUch+NXScrmrNN1rTRuMwfy DJwg== X-Gm-Message-State: ALoCoQmpAdwc5o1gIfm1NX/CLO9zOHS/el0NVhvIIJcW9Py4hB12/OCD+GgllUdxGHlC1CUsv07T X-Received: by 10.194.94.129 with SMTP id dc1mr680858wjb.3.1403533970119; Mon, 23 Jun 2014 07:32:50 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.92.68 with SMTP id a62ls1858893qge.79.gmail; Mon, 23 Jun 2014 07:32:50 -0700 (PDT) X-Received: by 10.58.197.193 with SMTP id iw1mr861501vec.57.1403533970005; Mon, 23 Jun 2014 07:32:50 -0700 (PDT) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by mx.google.com with ESMTPS id gu3si1948358veb.59.2014.06.23.07.32.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 23 Jun 2014 07:32:49 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.182 as permitted sender) client-ip=209.85.128.182; Received: by mail-ve0-f182.google.com with SMTP id oy12so6226156veb.13 for ; Mon, 23 Jun 2014 07:32:49 -0700 (PDT) X-Received: by 10.220.53.72 with SMTP id l8mr19795001vcg.16.1403533969936; Mon, 23 Jun 2014 07:32:49 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp135076vcb; Mon, 23 Jun 2014 07:32:49 -0700 (PDT) X-Received: by 10.224.47.2 with SMTP id l2mr33271040qaf.85.1403533968559; Mon, 23 Jun 2014 07:32:48 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id u9si22693741qcj.0.2014.06.23.07.32.48 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 23 Jun 2014 07:32:48 -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; Received: from localhost ([::1]:53551 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wz4N3-00040P-QW for patch@linaro.org; Mon, 23 Jun 2014 09:33:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55665) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wz4Gm-0003iM-Pl for qemu-devel@nongnu.org; Mon, 23 Jun 2014 09:26:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wz4Gd-0001C1-Uk for qemu-devel@nongnu.org; Mon, 23 Jun 2014 09:26:48 -0400 Received: from [2001:4b98:dc0:45:216:3eff:fe3d:166f] (port=37365 helo=afflict.kos.to) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wz4Gd-0001AX-No for qemu-devel@nongnu.org; Mon, 23 Jun 2014 09:26:39 -0400 Received: from afflict.kos.to (afflict [92.243.29.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by afflict.kos.to (Postfix) with ESMTPSA id AEA18265F1; Mon, 23 Jun 2014 15:26:36 +0200 (CEST) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Mon, 23 Jun 2014 16:26:31 +0300 Message-Id: X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 2001:4b98:dc0:45:216:3eff:fe3d:166f Cc: Paul Burton Subject: [Qemu-devel] [PULL 16/19] linux-user: support the setns syscall X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: riku.voipio@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Paul Burton Add support for the setns syscall, trivially passed through to the host. Signed-off-by: Paul Burton Signed-off-by: Riku Voipio --- linux-user/strace.list | 3 +++ linux-user/syscall.c | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/linux-user/strace.list b/linux-user/strace.list index 147f579..d5b8033 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -1191,6 +1191,9 @@ #ifdef TARGET_NR_set_mempolicy { TARGET_NR_set_mempolicy, "set_mempolicy" , NULL, NULL, NULL }, #endif +#ifdef TARGET_NR_setns +{ TARGET_NR_setns, "setns" , NULL, NULL, NULL }, +#endif #ifdef TARGET_NR_setpgid { TARGET_NR_setpgid, "setpgid" , NULL, NULL, NULL }, #endif diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 3fd0974..ecd5be9 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -9611,6 +9611,12 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, break; #endif +#ifdef TARGET_NR_setns + case TARGET_NR_setns: + ret = get_errno(setns(arg1, arg2)); + break; +#endif + default: unimplemented: gemu_log("qemu: Unsupported syscall: %d\n", num);