From patchwork Thu Mar 13 10:17:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 26193 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f72.google.com (mail-oa0-f72.google.com [209.85.219.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B76E8206A0 for ; Thu, 13 Mar 2014 10:17:29 +0000 (UTC) Received: by mail-oa0-f72.google.com with SMTP id g12sf3115292oah.11 for ; Thu, 13 Mar 2014 03:17:29 -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:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=7OTU4bi4tQILgt92d4/n2KYatyn0RtNTyTH59kxwUdY=; b=lidfizDC6J2glLARc3ccaUZ+B5pxeX4J8i0IufbcEg5xZY7qrMLBXX8BvmVn1lGW4I JQPgB441UqXr1ubNbivBKdPR0wc+cT705+UalHkvDIvYkDFnFp7c24/x2BFWfdCn79HQ FhK/9p6o7NroOT5ZYYoAPWKIjjdpX5a9dwfFd3RgRC+SB9Gh4KmAV+kf9aJo17aFgaBO 2pWgJ4Hm+fOJD/bjFIs5vneNeoYrK/cL5prYQ6hAsecx14APT6N7dFpNfnpwOEN1GyFx En/aE9S9zwJ59b7iQ3hA+k6gAV3JubKM2e+Cx3l9HTb72Nj0f84CMsL5iGJR1PlrqG/+ wC4Q== X-Gm-Message-State: ALoCoQnkMH3Y5VD//3BcruIBn/GLC5EKmHHadmM/N/QS5YeoKOIG2G3aKBpwkuGZ65/QDjzlc1sS X-Received: by 10.182.109.200 with SMTP id hu8mr486711obb.20.1394705849365; Thu, 13 Mar 2014 03:17:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.43.119 with SMTP id d110ls240478qga.32.gmail; Thu, 13 Mar 2014 03:17:29 -0700 (PDT) X-Received: by 10.221.37.1 with SMTP id tc1mr134449vcb.32.1394705849278; Thu, 13 Mar 2014 03:17:29 -0700 (PDT) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id i9si589721vep.68.2014.03.13.03.17.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Mar 2014 03:17:29 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.170; Received: by mail-ve0-f170.google.com with SMTP id pa12so830045veb.15 for ; Thu, 13 Mar 2014 03:17:29 -0700 (PDT) X-Received: by 10.220.161.8 with SMTP id p8mr744551vcx.4.1394705849214; Thu, 13 Mar 2014 03:17:29 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.78.9 with SMTP id i9csp356036vck; Thu, 13 Mar 2014 03:17:28 -0700 (PDT) X-Received: by 10.68.129.5 with SMTP id ns5mr1161534pbb.147.1394705847476; Thu, 13 Mar 2014 03:17:27 -0700 (PDT) Received: from mail-pa0-f51.google.com (mail-pa0-f51.google.com [209.85.220.51]) by mx.google.com with ESMTPS id yp10si1057453pab.462.2014.03.13.03.17.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Mar 2014 03:17:27 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.51 is neither permitted nor denied by best guess record for domain of takahiro.akashi@linaro.org) client-ip=209.85.220.51; Received: by mail-pa0-f51.google.com with SMTP id kq14so905683pab.24 for ; Thu, 13 Mar 2014 03:17:26 -0700 (PDT) X-Received: by 10.68.135.137 with SMTP id ps9mr1291654pbb.160.1394705846650; Thu, 13 Mar 2014 03:17:26 -0700 (PDT) Received: from localhost.localdomain (KD182249091179.au-net.ne.jp. [182.249.91.179]) by mx.google.com with ESMTPSA id qh2sm7604887pab.13.2014.03.13.03.17.21 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Mar 2014 03:17:24 -0700 (PDT) From: AKASHI Takahiro To: wad@chromium.org, catalin.marinas@arm.com, will.deacon@arm.com, arndb@arndb.de Cc: dsaxena@linaro.org, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, patches@linaro.org, AKASHI Takahiro Subject: [PATCH v3 1/3] asm-generic: Add generic seccomp.h for secure computing mode 1 Date: Thu, 13 Mar 2014 19:17:01 +0900 Message-Id: <1394705823-12465-2-git-send-email-takahiro.akashi@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1394705823-12465-1-git-send-email-takahiro.akashi@linaro.org> References: <1393320025-2855-1-git-send-email-takahiro.akashi@linaro.org> <1394705823-12465-1-git-send-email-takahiro.akashi@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: takahiro.akashi@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Those values (__NR_seccomp_*) are used solely in secure_computing() to identify mode 1 system calls. If compat system calls have different syscall numbers, asm/seccomp.h may override them. Signed-off-by: AKASHI Takahiro --- include/asm-generic/seccomp.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 include/asm-generic/seccomp.h diff --git a/include/asm-generic/seccomp.h b/include/asm-generic/seccomp.h new file mode 100644 index 0000000..5e97022 --- /dev/null +++ b/include/asm-generic/seccomp.h @@ -0,0 +1,28 @@ +/* + * include/asm-generic/seccomp.h + * + * Copyright (C) 2014 Linaro Limited + * Author: AKASHI Takahiro + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#ifndef _ASM_GENERIC_SECCOMP_H +#define _ASM_GENERIC_SECCOMP_H + +#include + +#if defined(CONFIG_COMPAT) && !defined(__NR_seccomp_read_32) +#define __NR_seccomp_read_32 __NR_read +#define __NR_seccomp_write_32 __NR_write +#define __NR_seccomp_exit_32 __NR_exit +#define __NR_seccomp_sigreturn_32 __NR_rt_sigreturn +#endif /* CONFIG_COMPAT && ! already defined */ + +#define __NR_seccomp_read __NR_read +#define __NR_seccomp_write __NR_write +#define __NR_seccomp_exit __NR_exit +#define __NR_seccomp_sigreturn __NR_rt_sigreturn + +#endif /* _ASM_GENERIC_SECCOMP_H */