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: 5017421 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 D78C0BEEA6 for ; Thu, 2 Oct 2014 09:50:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1467C20279 for ; Thu, 2 Oct 2014 09:50:26 +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 E1B4D20270 for ; Thu, 2 Oct 2014 09:50:24 +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 1XZczH-0007BT-U7; Thu, 02 Oct 2014 09:47:51 +0000 Received: from mail-pa0-f47.google.com ([209.85.220.47]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XZczF-0006sY-6X for linux-arm-kernel@lists.infradead.org; Thu, 02 Oct 2014 09:47:49 +0000 Received: by mail-pa0-f47.google.com with SMTP id rd3so1964905pab.20 for ; Thu, 02 Oct 2014 02:47:27 -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=nUB7Nmjvo9QH6c6Yj2eqAeKn+Lys7Z+PdgLx4JjUDbY=; b=TOQeWKuOOjJC/CUwLMKIccVooitPaYZxr+l/eD2K1tepDqhivBdYAZrxneGSo6+nu6 w1TGADHXcJuPt5J/sZN3ArunGJyuSxI5KxskeE5tG7aYkOvF/7CvSZzHTTfU2yIuR8Do HPToclRQ4M/L3JozBLb9nTVBsHj9EJeORojWr7mDYp7B51+4Q3GvATOtBa8INO8qMkmk KSGHeot+YBc7Hb8f+f0yfb2JG0ik91jtpO3O+cWs+sco4IjABy9wjaulJ/U5+UPvsmU3 iltDAs/IOwkX7PeynH1Wc9491PGkFX+WvV6xB48XMwYatxwAWb1cNFh5Ko95pQffXPl5 9uBw== X-Gm-Message-State: ALoCoQkBH0EstvAyp80CMtPE1toA+90G14s7YzlF1xtUBGU21I9OF42KluopG+RqDVweY8m7bYuV 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141002_024749_289834_C3F50559 X-CRM114-Status: GOOD ( 11.10 ) X-Spam-Score: -0.9 (/) Cc: linaro-kernel@lists.linaro.org, arndb@arndb.de, linux-kernel@vger.kernel.org, AKASHI Takahiro , dsaxena@linaro.org, linux-arm-kernel@lists.infradead.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=-2.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, 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 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 */