From: Tom Rini <trini@kernel.crashing.org>
To: Paul Mackerras <paulus@samba.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Christoph Hellwig <hch@infradead.org>,
Andrew Morton <akpm@osdl.org>,
Rusty Russell <rusty@rustcorp.com.au>
Cc: Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][RFC] 2.6 && module + -g && kernel w/o -g
Date: Wed, 14 Jan 2004 14:09:37 -0700 [thread overview]
Message-ID: <20040114210937.GA983@stop.crashing.org> (raw)
In-Reply-To: <20040108003040.GA18481@stop.crashing.org>
On Wed, Jan 07, 2004 at 05:30:40PM -0700, Tom Rini wrote:
> Okay, this is what seems to fix the bug that hch found for me. Does
> this seem right to everyone else? I'm going to poke at it a bit more
> tomorrow, pending time.
>
> ===== arch/ppc/kernel/module.c 1.10 vs edited =====
> --- 1.10/arch/ppc/kernel/module.c Fri Sep 12 09:26:52 2003
> +++ edited//home/trini/work/kernel/testing/linux-2.6/arch/ppc/kernel/module.c Wed Jan 7 17:07:30 2004
> @@ -87,6 +87,9 @@
> if ((strstr(secstrings + sechdrs[i].sh_name, ".init") != 0)
> != is_init)
> continue;
> + /* Skip over debug bits. */
> + if (strstr(secstrings + sechdrs[i].sh_name, ".debug") != 0)
> + continue;
>
> if (sechdrs[i].sh_type == SHT_RELA) {
> DEBUGP("Found relocations in section %u\n", i);
Okay. I've been looking at stock 2.6.1 noticed that the fix for this
issue that Rusty proposed, and that ultimately made it into 2.6.1-rc3
(or so) is not correct. The problem is that we do:
err = module_frob_arch_sections(hdr, sechdrs, secstrings, mod);
/* Which goes over every .debug section and can take _ages_ on something
* like ipv6 */
... skip 100 lines ...
.... Checks Rusty / Linus added ...
The following patch fixes the problem for me on PPC32:
--- 1.96/kernel/module.c Wed Jan 7 22:46:59 2004
+++ edited/kernel/module.c Wed Jan 14 14:05:12 2004
@@ -1439,6 +1439,13 @@
strindex = sechdrs[i].sh_link;
strtab = (char *)hdr + sechdrs[strindex].sh_offset;
}
+
+ /* If we find any debug RELAs, frob these away now. */
+ if (sechdrs[i].sh_type == SHT_RELA &&
+ (strstr(secstrings+sechdrs[i].sh_name, ".debug")
+ != 0))
+ sechdrs[i].sh_type = SHT_NULL;
+
#ifndef CONFIG_MODULE_UNLOAD
/* Don't load .exit sections */
if (strncmp(secstrings+sechdrs[i].sh_name, ".exit", 5) == 0)
IMHO, this shouldn't be covered under a PPC32 test since at least PPC32,
PPC64 and Alpha have this issue, and I suspect that ia64, parisc, s390
and v850 have the problem as well (based on what their module_arch_frob
bits look to be doing).
--
Tom Rini
http://gate.crashing.org/~trini/
next parent reply other threads:[~2004-01-14 21:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20040108003040.GA18481@stop.crashing.org>
2004-01-14 21:09 ` Tom Rini [this message]
2004-01-14 22:23 ` [PATCH][RFC] 2.6 && module + -g && kernel w/o -g David Mosberger
2004-01-14 22:33 ` Tom Rini
2004-01-14 23:00 ` Rusty Russell
2004-01-15 15:38 ` Tom Rini
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=20040114210937.GA983@stop.crashing.org \
--to=trini@kernel.crashing.org \
--cc=akpm@osdl.org \
--cc=benh@kernel.crashing.org \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
--cc=rusty@rustcorp.com.au \
/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.