From: linux@armlinux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: module: fix modsign build error
Date: Fri, 6 Jul 2018 14:00:55 +0100 [thread overview]
Message-ID: <20180706130055.GY17271@n2100.armlinux.org.uk> (raw)
In-Reply-To: <20180706124900.3294525-1-arnd@arndb.de>
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 <arnd@arndb.de>
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?
That said, adding this is no bad thing.
Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
Thanks.
> ---
> I guess it would be useful if Jessica can pick this change up
> in her tree that introduced the warning.
> ---
> arch/arm/include/asm/module.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/include/asm/module.h b/arch/arm/include/asm/module.h
> index 89ad0596033a..9e81b7c498d8 100644
> --- a/arch/arm/include/asm/module.h
> +++ b/arch/arm/include/asm/module.h
> @@ -34,6 +34,7 @@ struct mod_arch_specific {
> #endif
> };
>
> +struct module;
> u32 get_module_plt(struct module *mod, unsigned long loc, Elf32_Addr val);
>
> /*
> --
> 2.9.0
>
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 13.8Mbps down 630kbps up
According to speedtest.net: 13Mbps down 490kbps up
next prev parent reply other threads:[~2018-07-06 13:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-06 12:48 [PATCH] ARM: module: fix modsign build error Arnd Bergmann
2018-07-06 13:00 ` Russell King - ARM Linux [this message]
2018-07-09 18:34 ` Jessica Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180706130055.GY17271@n2100.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox