From patchwork Thu Aug 17 07:23:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 9905155 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2CD4B6038C for ; Thu, 17 Aug 2017 07:34:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1EDEB28AAF for ; Thu, 17 Aug 2017 07:34:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 13C7128ABB; Thu, 17 Aug 2017 07:34:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7861428AAF for ; Thu, 17 Aug 2017 07:34:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=W8WnGYWXRDu+86M9cEvBXkH9RoBXfrxCqlNgsMyinys=; b=HTdn6IZQ3L5Y7qwYQWEDO2Wn9R dsrv2cLLX4Iww3mq9PcRzFke5sE+rrJKp4d4rQmi84XqE9Hnd5WsY9KExf/nKuUA4UI8M4XQhep+e FalVysJAcUvgD6QUiMr1NInSU91kg6Wz1i9Os7l53haH0aDuB6vLEhyyszLktHfopD9xeSERxDHZH LdAZUp5VDydQRIUR2KnhnQzxI+DJ0kh/cv+LfMeYT3VLHZKsxo+EIwnaAODUHGfRkLFt3JjFbsM4p r1uJdqq95eR6TMvgr+lwW6T8ha20u7bLUFGvxLWW3EcMIksAGvrHYlcfrTEdk74ThBrP8FnAAWJe7 MCa9puLw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1diFK8-0003md-35; Thu, 17 Aug 2017 07:34:36 +0000 Received: from merlin.infradead.org ([205.233.59.134]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1diFAU-0005O9-Qc for linux-arm-kernel@bombadil.infradead.org; Thu, 17 Aug 2017 07:24:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=UAu58PgRE9kqcGX9aceOUI+GuB0I7lz81D4xe5BIYq4=; b=nzPa1uAhzEoYn2p64bDRUtbrB gNqEC8Jb3zAVm/k3nGiuudvePInEMRfNIYS8RRFcvsBKcEfoNOL6xFVfrRs4ARvkw+rf9qzLepm6+ AROQYoU9syFaChWf4y0wjUcmAf5DgzZ7Z8Atzt+6/M4l3MwvdALUrpLAbazLOnHQDEcwezW5FnvBj Chct2hpQzJLM8hn1uW0P9N3mNawHThLkC72t2uvxikfQSh/e4eylBZ4wAX6nc8OvGvuFPeHismZkM Lvl/9ngg69IT5Yy+icm68Y/3cJpvziTbIEQD3NeVtbLVu0rA9E4TTkc7hPuw1ZbCoRrv/1z7aEoOB IR7FQZJLw==; Received: from pb-smtp1.pobox.com ([64.147.108.70] helo=sasl.smtp.pobox.com) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1diFAQ-0003FF-UZ for linux-arm-kernel@lists.infradead.org; Thu, 17 Aug 2017 07:24:37 +0000 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 09DE29FF06; Thu, 17 Aug 2017 03:24:10 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:date:message-id:in-reply-to:references; s=sasl; bh=kShp lxB54j4GtP5mOLAe9oq3V5k=; b=lDXOO/tV3Prm/9Q4ecWTJC3qqSMxGD7C+l0y gmpEad+97LZ8yRPr6A+5eAiCmqgvcyezb9qHkUQCDMn3fmnhMsDitoVYIOWEwXkx 2boeemBPWYba34VMzNW3UPoUK0bE7AQMo+rYUX3fU0sVscZQyCtIEnukOF2UYrB4 1UOVvkc= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 01C1F9FF05; Thu, 17 Aug 2017 03:24:10 -0400 (EDT) Received: from yoda.home (unknown [70.80.200.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id 716DE9FF03; Thu, 17 Aug 2017 03:24:09 -0400 (EDT) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTP id CB7612DA055A; Thu, 17 Aug 2017 03:24:08 -0400 (EDT) From: Nicolas Pitre To: Russell King - ARM Linux , linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 2/8] arm_elf_read_implies_exec(): remove unused argument Date: Thu, 17 Aug 2017 03:23:41 -0400 Message-Id: <20170817072347.19990-3-nicolas.pitre@linaro.org> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20170817072347.19990-1-nicolas.pitre@linaro.org> References: <20170817072347.19990-1-nicolas.pitre@linaro.org> X-Pobox-Relay-ID: 0F76F140-831D-11E7-AF09-FE4B1A68708C-78420484!pb-smtp1.pobox.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Mickael Guene ." , Alexandre Torgue MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The first argument to elf_read_implies_exec() is either the actual header structure or a pointer to that structure whether one looks at fs/binfmt_elf.c or fs/binfmt_elf_fdpic.c. This ought to be fixed of course, but in the mean time let's sidestep the issue by removing that first argument from arm_elf_read_implies_exec() as it is unused anyway. Signed-off-by: Nicolas Pitre Tested-by: Vincent Abriou --- arch/arm/include/asm/elf.h | 4 ++-- arch/arm/kernel/elf.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h index f13ae153fb..e2786acf82 100644 --- a/arch/arm/include/asm/elf.h +++ b/arch/arm/include/asm/elf.h @@ -102,8 +102,8 @@ extern int elf_check_arch(const struct elf32_hdr *); #define vmcore_elf64_check_arch(x) (0) -extern int arm_elf_read_implies_exec(const struct elf32_hdr *, int); -#define elf_read_implies_exec(ex,stk) arm_elf_read_implies_exec(&(ex), stk) +extern int arm_elf_read_implies_exec(int); +#define elf_read_implies_exec(ex,stk) arm_elf_read_implies_exec(stk) struct task_struct; int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs); diff --git a/arch/arm/kernel/elf.c b/arch/arm/kernel/elf.c index d0d1e83150..52fb98358d 100644 --- a/arch/arm/kernel/elf.c +++ b/arch/arm/kernel/elf.c @@ -80,7 +80,7 @@ EXPORT_SYMBOL(elf_set_personality); * - the binary requires an executable stack * - we're running on a CPU which doesn't support NX. */ -int arm_elf_read_implies_exec(const struct elf32_hdr *x, int executable_stack) +int arm_elf_read_implies_exec(int executable_stack) { if (executable_stack != EXSTACK_DISABLE_X) return 1;