From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: fix unwinding for XIP kernels
Date: Mon, 21 Nov 2011 18:35:45 +0000 [thread overview]
Message-ID: <20111121183545.GF3272@arm.com> (raw)
In-Reply-To: <20111120112809.GZ30612@pengutronix.de>
On Sun, Nov 20, 2011 at 11:28:09AM +0000, Uwe Kleine-K?nig wrote:
> On Thu, Nov 17, 2011 at 02:17:06PM +0000, Catalin Marinas wrote:
> > On Thu, Nov 17, 2011 at 01:40:00PM +0000, Uwe Kleine-K?nig wrote:
> > > The linker places the unwind tables in readonly sections. So when using
> > > an XIP kernel these are located in ROM and cannot be modified.
> > >
> > > For that reason don't convert the symbol addresses during boot (or
> > > module loading) but only when interpreting them in search_index().
> > > Moreover several consts are added to catch future writes and rename the
> > > member "addr" of struct unwind_idx to "addr_offset" to better match the
> > > new semantic.
> > >
> > > This fixes unwinding on XIP which compared prel31 offsets to absolute
> > > addresses because the initial conversion from prel31 to absolute failed.
> >
> > My only worry - does this increase the index search by doing the prel31
> > conversion every time? It could affect tools like lockdep that need to
> > get the backtrace regularly at run-time.
> I did a first test now using
>
> static int __init unwind_test(void)
With your latest patch, have you tried dropping __init from this
function? Since the .init.text section goes after the unwind_idx tables,
all the prel31 offsets are positive and the number of init functions is
smaller than the run-time ones.
--
Catalin
next prev parent reply other threads:[~2011-11-21 18:35 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-17 13:40 [PATCH] ARM: fix unwinding for XIP kernels Uwe Kleine-König
2011-11-17 14:17 ` Catalin Marinas
2011-11-17 18:59 ` Uwe Kleine-König
2011-11-18 18:28 ` Nicolas Pitre
2011-11-18 21:36 ` Catalin Marinas
2011-11-20 11:28 ` Uwe Kleine-König
2011-11-20 22:52 ` Uwe Kleine-König
2011-11-20 23:12 ` [PATCH RFC] ARM: unwind: optimize to not convert each table value but the address Uwe Kleine-König
2011-11-21 16:34 ` Catalin Marinas
2011-11-21 18:16 ` Uwe Kleine-König
2011-11-30 17:58 ` Catalin Marinas
2011-11-30 19:07 ` [PATCH] ARM: fix unwinding for XIP kernels Uwe Kleine-König
2011-11-30 19:37 ` Nicolas Pitre
2011-11-30 19:52 ` Catalin Marinas
2011-11-21 18:35 ` Catalin Marinas [this message]
2011-11-28 9:22 ` Uwe Kleine-König
2011-11-28 9:45 ` Catalin Marinas
2011-11-28 10:02 ` Uwe Kleine-König
2011-11-28 10:07 ` Catalin Marinas
-- strict thread matches above, loose matches on Subject: below --
2022-11-07 11:14 Sascha Hauer
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=20111121183545.GF3272@arm.com \
--to=catalin.marinas@arm.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.