From patchwork Thu Oct 2 09:46:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 38280 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2E54320549 for ; Thu, 2 Oct 2014 09:47:37 +0000 (UTC) Received: by mail-wg0-f69.google.com with SMTP id b13sf938499wgh.4 for ; Thu, 02 Oct 2014 02:47:36 -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:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=tI9UjmG0ceaF7wtzgDWWSnh7VEzVW0zhsViIbC9rYno=; b=j0N6+qqaxtOTqC8T8rLO+wteW7lt0JGlFNyWPoTgpq2BIokmWQrEy8M21ir0/RIslY k5yTDWU8f1EOp6nln8NDUdiL+zNoLJsN/d1szctvN+0jW4y8zuFacaUb993wAa6X1V4o osSmB+2qz5KHXRehhHHOdjW5ehuf7a081/apj6rtbgtF2Reox9si2OAsM/Bpq3sElo5L a/gx63uE28CFlDR3tLJilwYqEmR83jfsC1g5s5AMSz8ys5kggx3FwHwM5tHc6+OL3I+0 hoxDHSntz5oK2NkOHgfm1lry6wmDc9ebLUzVuJY+LYTNT0uCtBRvad5smGvj2/vDEgtS NUNw== X-Gm-Message-State: ALoCoQnCUJBbI7migHY8Ibfa7RJ9BRn8ARqIRGEwBPyJ7gxctkf3Nkt3lLwCH1K6gYZUaKw9oqgC X-Received: by 10.112.190.40 with SMTP id gn8mr4008564lbc.10.1412243256370; Thu, 02 Oct 2014 02:47:36 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.10.1 with SMTP id e1ls264940lab.51.gmail; Thu, 02 Oct 2014 02:47:36 -0700 (PDT) X-Received: by 10.152.205.38 with SMTP id ld6mr2054835lac.97.1412243256100; Thu, 02 Oct 2014 02:47:36 -0700 (PDT) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com [209.85.217.169]) by mx.google.com with ESMTPS id mi5si5732508lbc.61.2014.10.02.02.47.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 02 Oct 2014 02:47:36 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by mail-lb0-f169.google.com with SMTP id 10so1951386lbg.28 for ; Thu, 02 Oct 2014 02:47:36 -0700 (PDT) X-Received: by 10.112.130.226 with SMTP id oh2mr23959479lbb.100.1412243256030; Thu, 02 Oct 2014 02:47:36 -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.112.130.169 with SMTP id of9csp23599lbb; Thu, 2 Oct 2014 02:47:35 -0700 (PDT) X-Received: by 10.66.251.132 with SMTP id zk4mr64693812pac.47.1412243254539; Thu, 02 Oct 2014 02:47:34 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ah2si3313514pbc.137.2014.10.02.02.47.33 for ; Thu, 02 Oct 2014 02:47:34 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751876AbaJBJrb (ORCPT + 27 others); Thu, 2 Oct 2014 05:47:31 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:49474 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751762AbaJBJr2 (ORCPT ); Thu, 2 Oct 2014 05:47:28 -0400 Received: by mail-pa0-f46.google.com with SMTP id fa1so1963141pad.33 for ; Thu, 02 Oct 2014 02:47:27 -0700 (PDT) X-Received: by 10.66.221.163 with SMTP id qf3mr84423685pac.37.1412243247694; Thu, 02 Oct 2014 02:47:27 -0700 (PDT) Received: from localhost.localdomain (KD182249093205.au-net.ne.jp. [182.249.93.205]) by mx.google.com with ESMTPSA id w7sm3013036pbs.4.2014.10.02.02.47.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 02 Oct 2014 02:47:26 -0700 (PDT) From: AKASHI Takahiro To: keescook@chromium.org, catalin.marinas@arm.com, will.deacon@arm.com Cc: dsaxena@linaro.org, arndb@arndb.de, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, AKASHI Takahiro Subject: [PATCH v7 3/6] asm-generic: add generic seccomp.h for secure computing mode 1 Date: Thu, 2 Oct 2014 18:46:13 +0900 Message-Id: <1412243176-16192-4-git-send-email-takahiro.akashi@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1412243176-16192-1-git-send-email-takahiro.akashi@linaro.org> References: <1412243176-16192-1-git-send-email-takahiro.akashi@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: takahiro.akashi@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.217.169 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 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 Reviewed-by: Kees Cook Signed-off-by: AKASHI Takahiro --- include/asm-generic/seccomp.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 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..9fa1f65 --- /dev/null +++ b/include/asm-generic/seccomp.h @@ -0,0 +1,30 @@ +/* + * 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 +#ifndef __NR_seccomp_sigreturn +#define __NR_seccomp_sigreturn __NR_rt_sigreturn +#endif + +#endif /* _ASM_GENERIC_SECCOMP_H */