From: Jessica Yu <jeyu@kernel.org>
To: Vincent Whitchurch <vincent.whitchurch@axis.com>
Cc: kernel@axis.com, linux@armlinux.org.uk,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] module: allow arch overrides for .init section names
Date: Fri, 8 May 2020 10:25:07 +0200 [thread overview]
Message-ID: <20200508082504.GA15302@linux-8ccs.fritz.box> (raw)
In-Reply-To: <20200506152533.31286-1-vincent.whitchurch@axis.com>
+++ Vincent Whitchurch [06/05/20 17:25 +0200]:
>ARM stores unwind information for .init.text in sections named
>.ARM.extab.init.text and .ARM.exidx.init.text. Since those aren't
>currently recognized as init sections, they're allocated along with the
>core section, and relocation fails if the core and the init section are
>allocated from different regions and can't reach other.
>
> final section addresses:
> ...
> 0x7f800000 .init.text
> ..
> 0xcbb54078 .ARM.exidx.init.text
> ..
>
> section 16 reloc 0 sym '': relocation 42 out of range (0xcbb54078 ->
> 0x7f800000)
>
>Allow architectures to override the section name so that ARM can fix
>this.
>
>Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
>---
> include/linux/moduleloader.h | 2 ++
> kernel/module.c | 9 +++++++--
> 2 files changed, 9 insertions(+), 2 deletions(-)
>
>diff --git a/include/linux/moduleloader.h b/include/linux/moduleloader.h
>index ca92aea8a6bd..07d079085f11 100644
>--- a/include/linux/moduleloader.h
>+++ b/include/linux/moduleloader.h
>@@ -29,6 +29,8 @@ void *module_alloc(unsigned long size);
> /* Free memory returned from module_alloc. */
> void module_memfree(void *module_region);
>
>+bool module_init_section(const char *name);
>+
Hi, I just have two small nits. Could you please add a comment on top of
module_init_section to document it? (similar to module_exit_section())
> /* Determines if the section name is an exit section (that is only used during
> * module unloading)
> */
>diff --git a/kernel/module.c b/kernel/module.c
>index 33569a01d6e1..a5f2b4e1ef53 100644
>--- a/kernel/module.c
>+++ b/kernel/module.c
>@@ -2370,6 +2370,11 @@ static long get_offset(struct module *mod, unsigned int *size,
> return ret;
> }
>
>+bool __weak module_init_section(const char *name)
>+{
>+ return strstarts(name, ".init");
>+}
>+
Could you move this next to module_exit_section()? Just trying to keep
similar functions together. Otherwise, the patch looks fine to me.
Thanks!
Jessica
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2020-05-08 8:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-06 15:25 [PATCH 1/2] module: allow arch overrides for .init section names Vincent Whitchurch
2020-05-06 15:25 ` [PATCH 2/2] ARM: module: fix handling of unwind init sections Vincent Whitchurch
2020-05-08 8:25 ` Jessica Yu [this message]
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=20200508082504.GA15302@linux-8ccs.fritz.box \
--to=jeyu@kernel.org \
--cc=kernel@axis.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=vincent.whitchurch@axis.com \
/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;
as well as URLs for NNTP newsgroup(s).