Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp841691imm; Mon, 9 Jul 2018 11:36:30 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc92wkCGRYOpfbn62nx39aaOb8U+71uO4EEliI/HpzQqwsuNUYLUz632pLKy/gGzjkVr/Hz X-Received: by 2002:a17:902:8308:: with SMTP id bd8-v6mr21851607plb.329.1531161389990; Mon, 09 Jul 2018 11:36:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531161389; cv=none; d=google.com; s=arc-20160816; b=VxMMD4ifAMsiL404udIBGs0ITm7HwEjeVgjwQQGE0DnWqVtPp3ojiWYIMje8KtwOsw lBT9MdCpfovtGQLH85KTAR1Q6BUTLGOZpHhdNc8xdze74LIhDFYDwVq4KYWEQpRbjlKM 946gmKi7WT/4InTorgMw1NDdXaDHOuqmv7UkA8GR6AQkhbje8l54aqaw7eYyaLg5nCTs iUiPZw2itUUyqy1kzKrhXCgAth23jDXTFnVqiRko4r0r+p94ie36OB9ir+NCaWvb1IVh sjQeY78uzwX98dx37/grCjRt8u9zy7X5Lseyto03Y0TzsMA7PxdWAQmBykA/beB84QM6 ccpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=EwiNBsnBQQVhVyKJuckd8HYC7GnkPJGsFvDYZQQ79e8=; b=0TT9xs2A80SmUqkfKwSRJOcIVlR1r5c4QavigddppnvHzjHey8UGhcUT3UDEZiv0BY BDDLZ6gWfG8REUYEJk7Gn/Uha/2WMV5fArJfOezQzJ0LglJMrIvLFW1/7ugdCFuE8knd ivkHcoC81544n/Ld28VW/3WSiATFPmb68hF1MIj42YOSQ4jyyyVP9NZcsdEa0Qy5cNao 3lHOAI06SlXLDjIzuikweYPhW3PTWtU79hGgYQqM96wYlwH+5TSIxooZkGjI4gdKiZ6c 2K2BWgytbG+DZrrd+/2ZsF59M2eho/56/J6AsEIqKiRL0VvpjL8eevKJ3LOpMeV5SRV4 FgSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RbqGtuc3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i13-v6si14345408pgi.277.2018.07.09.11.36.14; Mon, 09 Jul 2018 11:36:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RbqGtuc3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933283AbeGISeQ (ORCPT + 99 others); Mon, 9 Jul 2018 14:34:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:38708 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932607AbeGISeP (ORCPT ); Mon, 9 Jul 2018 14:34:15 -0400 Received: from redbean (ip5f5adbb9.dynamic.kabel-deutschland.de [95.90.219.185]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 22EE6208DE; Mon, 9 Jul 2018 18:34:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1531161254; bh=IYDA+MRTAVOEPn6c6Ha5ZyNs5AVyGuc9B6qLAMBHdAc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RbqGtuc3Jorangbu9omoV3cvbhUEts2iBZWJaNBSfuL+RMutdKtniy4aRLqjoqoWO Zf2uKBqnW8GpvqkoU3VwL8EWxA/I6m355Lndd7EiyiWK4ISdPEpzyF6cXr+Wh+qFDE CHBOs4s0V8LUpbBdSc8j25uycHDqkqm5G3pQREI4= Date: Mon, 9 Jul 2018 20:34:09 +0200 From: Jessica Yu To: Russell King - ARM Linux Cc: Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ARM: module: fix modsign build error Message-ID: <20180709183409.34ir5xkulil7drn2@redbean> References: <20180706124900.3294525-1-arnd@arndb.de> <20180706130055.GY17271@n2100.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20180706130055.GY17271@n2100.armlinux.org.uk> X-OS: Linux redbean 4.16.11-100.fc26.x86_64 x86_64 User-Agent: NeoMutt/20180622 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +++ Russell King - ARM Linux [06/07/18 14:00 +0100]: >On Fri, Jul 06, 2018 at 02:48:47PM +0200, Arnd Bergmann wrote: >> The asm/module.h header file can not be included standalone, which >> breaks the module signing code after a recent change: >> >> In file included from kernel/module-internal.h:13, >> from kernel/module_signing.c:17: >> arch/arm/include/asm/module.h:37:27: error: 'struct module' declared inside parameter list will not be visible outside of this definition or declaration [-Werror] >> u32 get_module_plt(struct module *mod, unsigned long loc, Elf32_Addr val); >> >> This adds a forward declaration of struct module to make it all work. >> >> Fixes: f314dfea16a0 ("modsign: log module name in the event of an error") >> Signed-off-by: Arnd Bergmann > >We used to have a general rule that where an asm/foo.h header and >linux/foo.h header exists, and the linux/foo.h includes the asm/foo.h, >then the linux/foo.h header will be used for including in .c files >rather than the asm/ version of the same. Is there a reason why >that can't be done here? Generally yes, it's just that in this case module_signing.c neither needs nor includes linux/module.h. The needed load_info struct definition just requires definitions for Elf_[SPE]hdr, Elf_Addr, Elf_Sym, etc. and those are all defined in asm/module.h. >That said, adding this is no bad thing. > >Acked-by: Russell King > >Thanks. Thanks! Queued in modules-next. Jessica