From patchwork Thu Sep 20 20:08:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 1487791 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 2ABA03FD40 for ; Thu, 20 Sep 2012 20:43:15 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TEnYg-0005Zt-2u; Thu, 20 Sep 2012 20:41:14 +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 1TEnYc-0005ZV-FP for linux-arm-kernel@lists.infradead.org; Thu, 20 Sep 2012 20:41:11 +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 q8KK85aZ019194; Thu, 20 Sep 2012 13:08:05 -0700 Received: by www.outflux.net (Postfix, from userid 1000) id 53BE3FE0226; Thu, 20 Sep 2012 13:08:05 -0700 (PDT) Date: Thu, 20 Sep 2012 13:08:05 -0700 From: Kees Cook To: linux-kernel@vger.kernel.org Subject: [PATCH] ARM: add finit_module syscall to ARM Message-ID: <20120920200805.GA18919@www.outflux.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-MIMEDefang-Filter: outflux$Revision: 1.316 $ X-HELO: www.outflux.net X-Scanned-By: MIMEDefang 2.71 on 10.2.0.1 X-Spam-Note: CRM114 invocation failed 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 , Rusty Russell , Will Deacon , David Howells , Andrew Morton , linux-arm-kernel@lists.infradead.org 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: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add finit_module syscall to the ARM syscall list. Signed-off-by: Kees Cook --- This depends on the finit_module patchset in Rusty's tree, based on https://lkml.org/lkml/2012/9/7/559 --- arch/arm/include/asm/unistd.h | 1 + arch/arm/kernel/calls.S | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h index 0cab47d..904b579 100644 --- a/arch/arm/include/asm/unistd.h +++ b/arch/arm/include/asm/unistd.h @@ -404,6 +404,7 @@ #define __NR_setns (__NR_SYSCALL_BASE+375) #define __NR_process_vm_readv (__NR_SYSCALL_BASE+376) #define __NR_process_vm_writev (__NR_SYSCALL_BASE+377) +#define __NR_finit_module (__NR_SYSCALL_BASE+378) /* * The following SWIs are ARM private. diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index 463ff4a..54161ac 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S @@ -387,6 +387,7 @@ /* 375 */ CALL(sys_setns) CALL(sys_process_vm_readv) CALL(sys_process_vm_writev) + CALL(sys_finit_module) #ifndef syscalls_counted .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls #define syscalls_counted