public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel@vger.kernel.org, sfr@canb.auug.org.au,
	rth@twiddle.net, rmk@arm.linux.org.uk, bjornw@axis.com,
	davidm@hpl.hp.com, geert@linux-m68k.org, ralf@gnu.org,
	paulus@samba.org, anton@samba.org,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	gniibe@m17n.org, kkojima@rr.iij4u.or.jp,
	"David S. Miller" <davem@redhat.com>,
	ak@suse.de
Subject: Re: [PATCH] extable cleanup
Date: Sat, 04 Jan 2003 16:33:57 +1100	[thread overview]
Message-ID: <20030104060424.6E8CC2C37B@lists.samba.org> (raw)
In-Reply-To: Your message of "Fri, 03 Jan 2003 10:41:41 -0800." <Pine.LNX.4.44.0301031036560.2750-100000@home.transmeta.com>

In message <Pine.LNX.4.44.0301031036560.2750-100000@home.transmeta.com> you wri
te:
> 
> On Fri, 3 Jan 2003, Rusty Russell wrote:
> >
> > Fairly straightforward consolidation of extable handling.  Sparc64 is
> > trickiest, with its extable range stuff (ideally, the ranges would be
> > in a separate __extable_range section, then the extable walking code
> > could be made common, too).
> > 
> > Only tested on x86: ppc and sparc64 written untested, others broken.
> 
> Did you test on a true i386, which needs exception handling very early on 
> to handle the test for broken WP? In other words, are all the exception 
> table data structures properly initialized?

That's not a problem: the exception table search code looks like:

/* Given an address, look for it in the exception tables. */
const struct exception_table_entry *search_exception_tables(unsigned long addr)
{
	const struct exception_table_entry *e;

	e = search_extable(__start___ex_table, __stop___ex_table-1, addr);
	if (!e)
		e = search_module_extables(addr);
	return e;
}

search_extable is arch specific, and requires no setup on any arch.
The list containing the modules is initialized using the LIST_HEAD, so
is empty, so search_module_extables is a noop.

> And did you check that an oops in the init handling works correctly before
> the kallsyms table has been initialized? That "initcall(symbol_init)"  
> makes me suspect it won't..

Once again, no initialization required.  "symbol_init" initializes the
EXPORT'ed symbol tables for module loading: kallsyms doesn't need
initialization.

> There was a reason why "extable_init()" was in init/main.c, and was done 
> _early_.

Yes, because archs iterated through the extable list to find even core
kernel exception tables.  The patch changes that: the lookup for core
kernel is done first, then the module code looks through a linked
list, meaning you don't need an extable list for !CONFIG_MODULES, etc.

Hope that clarifies,
Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

  reply	other threads:[~2003-01-04  5:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-03  8:07 [PATCH] extable cleanup Rusty Russell
2003-01-03  8:19 ` David S. Miller
2003-01-03 18:41 ` Linus Torvalds
2003-01-04  5:33   ` Rusty Russell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-01-03 22:06 Manfred Spraul
2003-01-04  6:03 ` Rusty Russell

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=20030104060424.6E8CC2C37B@lists.samba.org \
    --to=rusty@rustcorp.com.au \
    --cc=ak@suse.de \
    --cc=anton@samba.org \
    --cc=bjornw@axis.com \
    --cc=davem@redhat.com \
    --cc=davidm@hpl.hp.com \
    --cc=geert@linux-m68k.org \
    --cc=gniibe@m17n.org \
    --cc=kkojima@rr.iij4u.or.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.org \
    --cc=ralf@gnu.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=rth@twiddle.net \
    --cc=schwidefsky@de.ibm.com \
    --cc=sfr@canb.auug.org.au \
    --cc=torvalds@transmeta.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