From patchwork Sat Jul 29 03:51:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 9869721 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 7E2776035E for ; Sat, 29 Jul 2017 03:53:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 710C228799 for ; Sat, 29 Jul 2017 03:53:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 655BD287AE; Sat, 29 Jul 2017 03:53:16 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE 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 E650B28799 for ; Sat, 29 Jul 2017 03:53:15 +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=YKGSCUbmg9ly5VaDcANHT8pa+ZGo8ewoXxdtSo8Peq4=; b=VgkhjgmDHkhNKK873cpWJbroKJ VU6gtyNTFuCk3Kv3V4rwVWrtsX06pH2JhR4NvH4y6Yz5cnHC8fN4R98wuQ4UbuvluwIjun9N9WiqO S57S+odXYZ1I9w82diP3MVEI4y7Pj0QRj3P2CsZpSd4MP+bRUpN7nNef22nbdeP6n5TZHXdtanPF+ RVHMfQXAmxwIHTqfcAnzy51fD0iH3jTxDgkedFh7nH3/iP0JWN82B89q+r7bfEYipyBaIe6wcBqZy MBZ23qp1e4HHzzXtd0a023R+2vh8/ji0FKJNbX2VuoyjTf4NelCII//sdKITvuQGmM+wkRE8/idf4 y6CSYWsQ==; 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 1dbIoS-0002Gv-1Y; Sat, 29 Jul 2017 03:53:12 +0000 Received: from pb-smtp2.pobox.com ([64.147.108.71] helo=sasl.smtp.pobox.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dbInb-0001c6-DC for linux-arm-kernel@lists.infradead.org; Sat, 29 Jul 2017 03:52:23 +0000 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 9B4659A020; Fri, 28 Jul 2017 23:51:56 -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=FgGe NvNzkkZxgfNhj0Jkh3bhMXs=; b=awiU/zgdc4szXU4GTKl6MsCleXG3pTlC4VpW cJYrMpIW8ACE8UZ8Y9V2aHRe3nNHksnXKF8RCcOjo+ym/eUmAT3UswcvSZzb1Tfb Z9+yT6h0xNYimUaMme21mmldCup7knrxIhUwTrk/IZ+1aqiznG4N93MywE9Uh0j2 83/eri4= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 8C93D9A01E; Fri, 28 Jul 2017 23:51:56 -0400 (EDT) Received: from yoda.home (unknown [96.23.157.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id D6C099A01D; Fri, 28 Jul 2017 23:51:55 -0400 (EDT) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTP id 21CA32DA0619; Fri, 28 Jul 2017 23:51:55 -0400 (EDT) From: Nicolas Pitre To: Russell King - ARM Linux , linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/4] arm_elf_read_implies_exec(): remove unused argument Date: Fri, 28 Jul 2017 23:51:47 -0400 Message-Id: <20170729035150.5214-2-nicolas.pitre@linaro.org> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170729035150.5214-1-nicolas.pitre@linaro.org> References: <20170729035150.5214-1-nicolas.pitre@linaro.org> X-Pobox-Relay-ID: 43CE19AC-7411-11E7-BDD4-9D2B0D78B957-78420484!pb-smtp2.pobox.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170728_205219_629304_A1A69B99 X-CRM114-Status: GOOD ( 12.90 ) 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 --- 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;