From patchwork Tue Feb 25 09:20:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 25251 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f71.google.com (mail-pb0-f71.google.com [209.85.160.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5FDB920558 for ; Tue, 25 Feb 2014 09:21:19 +0000 (UTC) Received: by mail-pb0-f71.google.com with SMTP id up15sf3183122pbc.10 for ; Tue, 25 Feb 2014 01:21:18 -0800 (PST) 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=42Ex+LcDnJftD1qpDLKfGrG6Q3lvfJ46NzyfUIUBakQ=; b=jDnB2INqgcML9Z1RZJupLKnLCfPO6Ym/fGgXE0lEVW49s/V+dSU2FEwtA/q74Akk6x EJjSBDyBY1OEoX8HAta2ekiQ58GOAJvamcnAk1r16FFcLbYb9YZUV93EkWf/+vNllf0b bLFefnXYOOgZiPiZ5ur1nCBfq99JzHcMivdf4rW0P+IhavVyrjX2wtFaZdIZg7QK6PM4 U29P0SILWOPWNta5MCk2VtqhMYlmxqtNfpbkEMajUB+UmxyxImV5ezVtsJNM/d8BxSfB T/xVK2//oRYO8sB82K1vR7TR2rgD+1fHxXQclHYUnNjhH8NG0lWClTaoLLxbQsjn1u+h j0TA== X-Gm-Message-State: ALoCoQntrDwYZj73kdU/tBlDvWFCLuT9L9UzsdE0uA/QNd2jVvnWSu6WfxeZSbLzPyjVIvosInUi X-Received: by 10.66.158.6 with SMTP id wq6mr113753pab.39.1393320078628; Tue, 25 Feb 2014 01:21:18 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.47.9 with SMTP id l9ls2426822qga.13.gmail; Tue, 25 Feb 2014 01:21:18 -0800 (PST) X-Received: by 10.58.48.133 with SMTP id l5mr185778ven.36.1393320078464; Tue, 25 Feb 2014 01:21:18 -0800 (PST) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by mx.google.com with ESMTPS id tr5si6645137vdc.78.2014.02.25.01.21.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Feb 2014 01:21:18 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.182 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.182; Received: by mail-ve0-f182.google.com with SMTP id jy13so114429veb.13 for ; Tue, 25 Feb 2014 01:21:18 -0800 (PST) X-Received: by 10.52.247.231 with SMTP id yh7mr142460vdc.34.1393320078377; Tue, 25 Feb 2014 01:21:18 -0800 (PST) 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.220.174.196 with SMTP id u4csp123767vcz; Tue, 25 Feb 2014 01:21:17 -0800 (PST) X-Received: by 10.66.151.205 with SMTP id us13mr406257pab.93.1393320076972; Tue, 25 Feb 2014 01:21:16 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id nd12si20037637pab.185.2014.02.25.01.21.16; Tue, 25 Feb 2014 01:21:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753026AbaBYJU6 (ORCPT + 26 others); Tue, 25 Feb 2014 04:20:58 -0500 Received: from mail-pd0-f177.google.com ([209.85.192.177]:51763 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752205AbaBYJUx (ORCPT ); Tue, 25 Feb 2014 04:20:53 -0500 Received: by mail-pd0-f177.google.com with SMTP id g10so1898452pdj.36 for ; Tue, 25 Feb 2014 01:20:53 -0800 (PST) X-Received: by 10.66.123.5 with SMTP id lw5mr415653pab.83.1393320053209; Tue, 25 Feb 2014 01:20:53 -0800 (PST) Received: from localhost.localdomain (KD182249093189.au-net.ne.jp. [182.249.93.189]) by mx.google.com with ESMTPSA id eb5sm138975943pad.22.2014.02.25.01.20.49 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Feb 2014 01:20:52 -0800 (PST) From: AKASHI Takahiro To: wad@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 v2 1/3] asm-generic: Add generic seccomp.h for secure computing mode 1 Date: Tue, 25 Feb 2014 18:20:23 +0900 Message-Id: <1393320025-2855-2-git-send-email-takahiro.akashi@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1393320025-2855-1-git-send-email-takahiro.akashi@linaro.org> References: <1391767892-5395-1-git-send-email-takahiro.akashi@linaro.org> <1393320025-2855-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=neutral (google.com: 209.85.128.182 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 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. 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 */