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: 4478461 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C0161BEEAA for ; Fri, 4 Jul 2014 07:34:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0033B20414 for ; Fri, 4 Jul 2014 07:34:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 223D120411 for ; Fri, 4 Jul 2014 07:34:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X2xzX-0007UL-Br; Fri, 04 Jul 2014 07:33:07 +0000 Received: from mail-pd0-f171.google.com ([209.85.192.171]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X2xzH-0006hZ-0J for linux-arm-kernel@lists.infradead.org; Fri, 04 Jul 2014 07:32:51 +0000 Received: by mail-pd0-f171.google.com with SMTP id fp1so1558055pdb.16 for ; Fri, 04 Jul 2014 00:32:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=0zvywfIQntKeZJKnkQ9CzG0MWh7VAOg1Sv8PPfN+LC4=; b=NVFv1EPGM2Deu23gMsdoAt0FBY2AZRjSYDmV0nTdYWozkQLPakXKDQ4e0piUSVwr70 G9XdPa85Pzm9q0p00vReys9RYS7W4qra7XyTtWrcSmaJKKaoRKesqSS9xJ2LgQWkNsy7 lHARhk5UaCrKQ/m7obB0mlgGLgtkm3xEo8C9RFt7zMJM6BSdPFqYoFUjsaOiKlIpRY7w uNwe3xWdKYQ7XQeTcSgc/R2kiSiUDNt0MvpfD+8TnVOj0ZsPXLPBMoSyIyAxw86cpkyh K1ws9WX7fwe0nCfnFwkTVF5BO+o8Haq/19W845naVmlL1BWH15Vmug2ja8NIc6Yjcbrh xqBw== X-Gm-Message-State: ALoCoQlKXM1Eb3ep0PIg7MJYbpXdebXNRLqnhaiJ/kZ4HaYIQHeHBbI+7F6MaycdWIB52m+bdn5o 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140704_003251_101044_5F434663 X-CRM114-Status: GOOD ( 10.32 ) X-Spam-Score: -2.3 (--) Cc: AKASHI Takahiro , dsaxena@linaro.org, linaro-kernel@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 */