From patchwork Sat Mar 15 05:50:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 26326 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 A7521202DD for ; Sat, 15 Mar 2014 05:50:35 +0000 (UTC) Received: by mail-oa0-f72.google.com with SMTP id g12sf13427746oah.7 for ; Fri, 14 Mar 2014 22:50:35 -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=J5u/2SK93eHwTZVdyPUyV2XV7XnJ+vIIbmUeb9q9hjU=; b=MY6jJ1ZvGT/S+M4EVnBeaNX5UoChOcUcMx1cLJUO83NjtOQWJsqydSI10sQK9Rz99D tCckglQuO82Ylc+3ksp4gmCwVlzwcVRXjU+EOePY6PoENhL3eyGBY14kH5eZhagWLzYs ldQ4lEyVGcC6JBxnFRY6X8Qlxd7+hCV1wbDHcmLRgSuFdO9aJ1TqOVpT79wU3pTBbJrr silmpKXmbeJVv416MkMqjIDLCF9u9arkVxLtZd3qPTUgUbCJIzfxOmQd9brn8w2W/oyw S1WkQqG8U9is/Bx60QpHl4ImGPW5E+PYRTq/Cdbciud4nD9wD2pv7NTOfJswAsa8vDZX 8edA== X-Gm-Message-State: ALoCoQmYqxQJvQNVs8NH6uO1muMOLIBnZ77bfx1kZfNsXFSOxh0tb29/BemvMOFZ/2fWup11Ij9r X-Received: by 10.182.17.69 with SMTP id m5mr4721288obd.6.1394862635109; Fri, 14 Mar 2014 22:50:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.95.20 with SMTP id h20ls945374qge.54.gmail; Fri, 14 Mar 2014 22:50:35 -0700 (PDT) X-Received: by 10.220.11.141 with SMTP id t13mr42592vct.30.1394862635044; Fri, 14 Mar 2014 22:50:35 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id gs7si74803vdc.200.2014.03.14.22.50.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Mar 2014 22:50:35 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.173; Received: by mail-vc0-f173.google.com with SMTP id il7so3713877vcb.18 for ; Fri, 14 Mar 2014 22:50:35 -0700 (PDT) X-Received: by 10.58.38.166 with SMTP id h6mr654053vek.22.1394862634973; Fri, 14 Mar 2014 22:50:34 -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 i9csp73269vck; Fri, 14 Mar 2014 22:50:34 -0700 (PDT) X-Received: by 10.66.139.169 with SMTP id qz9mr13484679pab.16.1394862633853; Fri, 14 Mar 2014 22:50:33 -0700 (PDT) Received: from mail-pb0-f42.google.com (mail-pb0-f42.google.com [209.85.160.42]) by mx.google.com with ESMTPS id zh8si5281365pac.318.2014.03.14.22.50.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Mar 2014 22:50:33 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.42 is neither permitted nor denied by best guess record for domain of takahiro.akashi@linaro.org) client-ip=209.85.160.42; Received: by mail-pb0-f42.google.com with SMTP id rr13so3513986pbb.15 for ; Fri, 14 Mar 2014 22:50:33 -0700 (PDT) X-Received: by 10.69.25.69 with SMTP id io5mr13495023pbd.22.1394862633467; Fri, 14 Mar 2014 22:50:33 -0700 (PDT) Received: from localhost.localdomain (pdddd29.tkyoac00.ap.so-net.ne.jp. [218.221.221.41]) by mx.google.com with ESMTPSA id ha11sm22375393pbd.17.2014.03.14.22.50.29 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Mar 2014 22:50:32 -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_v4 1/2] asm-generic: Add generic seccomp.h for secure computing mode 1 Date: Sat, 15 Mar 2014 14:50:03 +0900 Message-Id: <1394862604-29105-2-git-send-email-takahiro.akashi@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1394862604-29105-1-git-send-email-takahiro.akashi@linaro.org> References: <1394705823-12465-1-git-send-email-takahiro.akashi@linaro.org> <1394862604-29105-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.220.173 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. Acked-by: Arnd Bergmann 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 */