From patchwork Sat Nov 10 22:44:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 1724641 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 05D433FC8A for ; Sat, 10 Nov 2012 22:48:00 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TXJnn-0003AD-Fx; Sat, 10 Nov 2012 22:45:23 +0000 Received: from [2001:19d0:2:6:c0de::] (helo=smtp.outflux.net) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TXJnc-00039B-Mt for linux-arm-kernel@lists.infradead.org; Sat, 10 Nov 2012 22:45:13 +0000 Received: from www.outflux.net (serenity-end.outflux.net [10.2.0.2]) by vinyl.outflux.net (8.14.4/8.14.4/Debian-2ubuntu2) with ESMTP id qAAMili1015878; Sat, 10 Nov 2012 14:44:47 -0800 From: Kees Cook To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/4] arch/arm: add syscall_get_arch Date: Sat, 10 Nov 2012 14:44:42 -0800 Message-Id: <1352587485-18348-2-git-send-email-keescook@chromium.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1352587485-18348-1-git-send-email-keescook@chromium.org> References: <1352587485-18348-1-git-send-email-keescook@chromium.org> X-MIMEDefang-Filter: outflux$Revision: 1.316 $ X-HELO: www.outflux.net X-Scanned-By: MIMEDefang 2.71 on 10.2.0.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121110_174513_075483_12CAF498 X-CRM114-Status: UNSURE ( 9.79 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.1 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom; id=keescook%40www.outflux.net; ip=2001%3A19d0%3A2%3A6%3Ac0de%3A%3A; r=merlin.infradead.org] 0.0 SPF_HELO_FAIL SPF: HELO does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=helo; id=smtp.outflux.net; ip=2001%3A19d0%3A2%3A6%3Ac0de%3A%3A; r=merlin.infradead.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.8 RDNS_NONE Delivered to internal network by a host with no rDNS Cc: Russell King , Kees Cook , Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org, Al Viro , Will Drewry , Geremy Condra X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Will Drewry Provide an ARM implementation of syscall_get_arch. This is a pre-requisite for CONFIG_HAVE_ARCH_SECCOMP_FILTER. Signed-off-by: Will Drewry Signed-off-by: Kees Cook --- arch/arm/include/asm/syscall.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/include/asm/syscall.h b/arch/arm/include/asm/syscall.h index 9fdded6..f1d96d4 100644 --- a/arch/arm/include/asm/syscall.h +++ b/arch/arm/include/asm/syscall.h @@ -7,6 +7,8 @@ #ifndef _ASM_ARM_SYSCALL_H #define _ASM_ARM_SYSCALL_H +#include /* for AUDIT_ARCH_* */ +#include /* for ELF_EM */ #include #include @@ -95,4 +97,11 @@ static inline void syscall_set_arguments(struct task_struct *task, memcpy(®s->ARM_r0 + i, args, n * sizeof(args[0])); } +static inline int syscall_get_arch(struct task_struct *task, + struct pt_regs *regs) +{ + /* ARM tasks don't change audit architectures on the fly. */ + return AUDIT_ARCH_ARM; +} + #endif /* _ASM_ARM_SYSCALL_H */