From patchwork Tue Jul 22 09:14:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 34025 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1A9BD20672 for ; Tue, 22 Jul 2014 09:16:24 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id eb12sf48258276oac.9 for ; Tue, 22 Jul 2014 02:16:23 -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=wdAKzwLSN4wVnkc9IjCRz3wcmZJv5E+cKhHDSuuXyYU=; b=fB2uaLIeh6J3CmF5nVRzOzF00A68hMw94tittNz2MUJfcIv1KDB8ly60ZtuE9nTvnM fDxUx2tqj8ipMQL0RFU93OqvKnwmLeFXxBdFm6WqW+a6fedAfnbOUGHEWPPXu5OkKLwo 9124lvyXWJ2ly5pqqUQQ30mxaVTXMzUl8Ai4eqq1u4OWqvQ5+PY3gc4R7L7b1Ss1PGdn xfN+qhD7HHHbnAu91TFfrgS2JBSyu2pVLeXiM0GszGBMxQPjGtbgjhfc7rG5EGhl8/Lz +oRqB9kL8EZOxG0ZveKwTneDBwivhhHw3SZXP2e3rKhHUn6QqFM/rt2Cvv//oyZq+isT RjAw== X-Gm-Message-State: ALoCoQn424ctsV429Ouva+abmBGpp46LSsLZRWlWUMC50aitOeYVXGYmHRzaOzNuVXbqUeSredmm X-Received: by 10.182.128.234 with SMTP id nr10mr16060434obb.0.1406020583659; Tue, 22 Jul 2014 02:16:23 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.20.23 with SMTP id 23ls2191201qgi.26.gmail; Tue, 22 Jul 2014 02:16:23 -0700 (PDT) X-Received: by 10.220.174.137 with SMTP id t9mr38016574vcz.12.1406020583548; Tue, 22 Jul 2014 02:16:23 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id fu11si13481857vdb.105.2014.07.22.02.16.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Jul 2014 02:16:23 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id hu12so14070180vcb.6 for ; Tue, 22 Jul 2014 02:16:23 -0700 (PDT) X-Received: by 10.221.47.9 with SMTP id uq9mr20485208vcb.48.1406020583479; Tue, 22 Jul 2014 02:16:23 -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 tc5csp180004vcb; Tue, 22 Jul 2014 02:16:21 -0700 (PDT) X-Received: by 10.70.102.66 with SMTP id fm2mr31631728pdb.102.1406020580417; Tue, 22 Jul 2014 02:16:20 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ck17si8538919pdb.292.2014.07.22.02.16.19 for ; Tue, 22 Jul 2014 02:16:19 -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 S1753887AbaGVJQB (ORCPT + 12 others); Tue, 22 Jul 2014 05:16:01 -0400 Received: from mail-pd0-f182.google.com ([209.85.192.182]:38262 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753658AbaGVJP7 (ORCPT ); Tue, 22 Jul 2014 05:15:59 -0400 Received: by mail-pd0-f182.google.com with SMTP id fp1so10884788pdb.13 for ; Tue, 22 Jul 2014 02:15:54 -0700 (PDT) X-Received: by 10.68.69.71 with SMTP id c7mr20863479pbu.43.1406020554792; Tue, 22 Jul 2014 02:15:54 -0700 (PDT) Received: from localhost.localdomain (KD182249094163.au-net.ne.jp. [182.249.94.163]) by mx.google.com with ESMTPSA id v1sm12071461pbs.1.2014.07.22.02.15.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Jul 2014 02:15:53 -0700 (PDT) From: AKASHI Takahiro To: wad@chromium.org, catalin.marinas@arm.com, will.deacon@arm.com, keescook@chromium.org Cc: dsaxena@linaro.org, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, AKASHI Takahiro Subject: [PATCH v5 2/3] asm-generic: Add generic seccomp.h for secure computing mode 1 Date: Tue, 22 Jul 2014 18:14:58 +0900 Message-Id: <1406020499-5537-3-git-send-email-takahiro.akashi@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1406020499-5537-1-git-send-email-takahiro.akashi@linaro.org> References: <1406020499-5537-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.220.175 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 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 */