From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: Continuing kallsyms failures - large kernels, XIP kernels, and large XIP kernels
Date: Fri, 6 Feb 2015 15:25:30 +0100 [thread overview]
Message-ID: <20150206142530.GC10842@pengutronix.de> (raw)
In-Reply-To: <20150131002253.GR26493@n2100.arm.linux.org.uk>
On Sat, Jan 31, 2015 at 12:22:53AM +0000, Russell King - ARM Linux wrote:
> On Fri, Jan 30, 2015 at 12:29:30PM -0500, Nicolas Pitre wrote:
> > On Fri, 30 Jan 2015, Russell King - ARM Linux wrote:
> > > +#ifdef CONFIG_XIP_KERNEL
> > > +/*
> > > + * __data_loc is not only the LMA of the data section, but also the VMA of
> > > + * the end of the .rodata section. This must not overlap the VMA of the
> > > + * data section. Since the .text section starts in module space, and that
> > > + * is always below the .data section, this should be sufficient.
> > > + */
> > > +ASSERT((_data >= __data_loc), "Text section oversize")
> > > +#endif
> >
> > I agree with this patch.
> >
> > Acked-by: Nicolas Pitre <nico@linaro.org>
> >
> > This might not prevent a config leading to this from happening, but at
> > least it makes the issue much clearer. XIP kernel was created for
> > systems where the total amount of RAM is often smaller than the imposed
> > size limit here.
>
> Yes, I expect more of Arnd's randconfigs to fail with this patch applied.
>
> I did also notice that we still have swapper_pg_dir at _data - 0x4000
> for XIP kernels - so the above check is slightly too lenient. A better
> threshold for __data_loc might be MODULES_END, since we can't allow the
> XIP part to overlap into RAM.
>
> #ifdef CONFIG_HIGHMEM
> #define MODULES_END (PAGE_OFFSET - PMD_SIZE)
> #else
> #define MODULES_END (PAGE_OFFSET)
> #endif
BTW, on no-MMU MODULES_END is defined as
#define END_MEM (UL(CONFIG_DRAM_BASE) + CONFIG_DRAM_SIZE)
#define MODULES_END (END_MEM)
I'd like to get rid of CONFIG_DRAM_SIZE because it's stupid to have that
fixed in .config. MODULES_END is hardly used on no-MMU apart from
printing the (IIRC wrong) memory layout during boot.
If we define END_MEM to 0xffffffff on no-MMU this should effectively nop
the assertion which at least prevents false positives?!
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
prev parent reply other threads:[~2015-02-06 14:25 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-30 14:56 Continuing kallsyms failures - large kernels, XIP kernels, and large XIP kernels Russell King - ARM Linux
2015-01-30 15:32 ` Russell King - ARM Linux
2015-01-30 15:34 ` Russell King - ARM Linux
2015-01-30 17:29 ` Nicolas Pitre
2015-01-31 0:22 ` Russell King - ARM Linux
2015-02-04 0:03 ` Russell King - ARM Linux
2015-02-04 1:59 ` Nicolas Pitre
2015-02-04 9:44 ` Russell King - ARM Linux
2015-02-04 13:50 ` Nicolas Pitre
2015-02-04 14:44 ` Arnd Bergmann
2015-02-05 8:43 ` Uwe Kleine-König
2015-02-06 14:20 ` Uwe Kleine-König
2015-02-06 16:14 ` Russell King - ARM Linux
2015-02-10 8:17 ` Uwe Kleine-König
2015-02-10 19:13 ` Russell King - ARM Linux
2015-02-11 20:46 ` Stephen Rothwell
2015-02-06 20:14 ` Stefan Agner
2015-02-06 14:25 ` Uwe Kleine-König [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=20150206142530.GC10842@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--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;
as well as URLs for NNTP newsgroup(s).