From patchwork Fri Jul 4 07:31:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 33073 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f197.google.com (mail-yk0-f197.google.com [209.85.160.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6487620DCC for ; Fri, 4 Jul 2014 07:32:44 +0000 (UTC) Received: by mail-yk0-f197.google.com with SMTP id 19sf2728582ykq.4 for ; Fri, 04 Jul 2014 00:32:44 -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=d31lzcKxCiu3i4ddeJnMdj7XWUaQC/rmsnn2K3HDa4qXVG/s2ay31QtHMc8C0fhUqW Nt8uNI9d2LpDXn803WcYhkkByGaCIIAaMUN0ndPrVMe3J4Itz9OQXeNSfvxvz7r3tCYx oS0td/vFVia4WYlF25bDb8D4zKuS8s/lJGnoyMNeWs94gP8GQb7v1XUSHB/1DQBYPcKl l8zUJCcoYfQeMhv7+lUPM+w2ASLd22b5UaYLNeLHgpFaLAYglFsCeWwj/fkWpwG3+TiB Igvjsj02Q0vLXxgzcY8ZsBieDskyVo2de3c9I2zqvA21UqLXmdiQh4P6z7XzD0ltcXwX JVWw== X-Gm-Message-State: ALoCoQn8n9E5gnVu3gwZ/0BswLU+Twd9MJWdCbJYfiVIVhxBL9+HPtKb6+/lI/l5t98bDd1UY7Fj X-Received: by 10.236.124.131 with SMTP id x3mr4205091yhh.14.1404459164204; Fri, 04 Jul 2014 00:32:44 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.36.229 with SMTP id p92ls777057qgp.92.gmail; Fri, 04 Jul 2014 00:32:44 -0700 (PDT) X-Received: by 10.52.30.9 with SMTP id o9mr6927772vdh.15.1404459164138; Fri, 04 Jul 2014 00:32:44 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id c3si15230505veo.8.2014.07.04.00.32.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Jul 2014 00:32:44 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id hy4so1253449vcb.33 for ; Fri, 04 Jul 2014 00:32:44 -0700 (PDT) X-Received: by 10.58.245.134 with SMTP id xo6mr8476996vec.14.1404459164053; Fri, 04 Jul 2014 00:32:44 -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 tc5csp446203vcb; Fri, 4 Jul 2014 00:32:43 -0700 (PDT) X-Received: by 10.66.122.70 with SMTP id lq6mr9268725pab.51.1404459163105; Fri, 04 Jul 2014 00:32:43 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id id4si34697271pbc.140.2014.07.04.00.32.42; Fri, 04 Jul 2014 00:32:42 -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 S1755457AbaGDHcc (ORCPT + 27 others); Fri, 4 Jul 2014 03:32:32 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:53209 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755247AbaGDHca (ORCPT ); Fri, 4 Jul 2014 03:32:30 -0400 Received: by mail-pa0-f43.google.com with SMTP id lf10so1585971pab.2 for ; Fri, 04 Jul 2014 00:32:30 -0700 (PDT) X-Received: by 10.66.121.168 with SMTP id ll8mr9484710pab.86.1404459150027; Fri, 04 Jul 2014 00:32:30 -0700 (PDT) Received: from localhost.localdomain (KD182249080206.au-net.ne.jp. [182.249.80.206]) by mx.google.com with ESMTPSA id uj2sm152027160pab.14.2014.07.04.00.32.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 04 Jul 2014 00:32:28 -0700 (PDT) From: AKASHI Takahiro To: wad@chromium.org, catalin.marinas@arm.com, will.deacon@arm.com Cc: dsaxena@linaro.org, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, AKASHI Takahiro Subject: [RESEND PATCH v4 1/2] asm-generic: Add generic seccomp.h for secure computing mode 1 Date: Fri, 4 Jul 2014 16:31:54 +0900 Message-Id: <1404459115-8292-2-git-send-email-takahiro.akashi@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1404459115-8292-1-git-send-email-takahiro.akashi@linaro.org> References: <1404459115-8292-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.174 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 */