From: "Adam J. Richter" <adam@yggdrasil.com>
To: kaos@ocs.com.au
Cc: linux-kernel@vger.kernel.org
Subject: Re: Modules with list
Date: Wed, 27 Nov 2002 17:54:36 -0800 [thread overview]
Message-ID: <200211280154.RAA07955@baldur.yggdrasil.com> (raw)
On 2002-11-27 22:42:46 GMT, Keith Owens wrote:
>On Wed, 27 Nov 2002 10:19:02 -0800,
>"Adam J. Richter" <adam@yggdrasil.com> wrote:
>> Hmm. We could certainly have a binary editing tool to remove
>>what was the .exit{,func} sections after the link...
>> In this scenario, the .exit{,func} section would be linked
>>in and then discarded by the module loader, by the process of the
>>kernel releasing its .init{,data} areas, or, if you wanted to build
>>a bzImage without CONFIG_HOTPLUG, by using a binary editing tool or
>>perhaps an ld script as I mentioned earlier in this response.
>>
>> The point of the .devexit_p_refs section would just be to
>>set those references to NULL if that was useful. The kernel module
>>load code would do something like:
>
>You have it back to front. The real problem is open code that calls
>functions in sections that have been discarded, that code is an oops
>just waiting to happen. When binutils was changed to detect such
>dangling references, it found a lot of bad code on rarely tested error
>paths. Your method would stop binutils finding the dangling references
>and open the kernel up to bad code again.
Currently, for __devexit{,func}, this is only detected on
CONFIG_HOTPLUG=n systems. Under my scheme we would always build
.devexit.{text,data} sections, so we could actually test this more
widely, although it would require making a binary tool to delete the
relocations at addresses pointed to by the .devexit_p_ptrs entries.
We could have a regession test that would run that tool on every
module, then run an ld script to delete .devexit.{data,text} and see
if there are any dangling references.
Adam J. Richter __ ______________ 575 Oroville Road
adam@yggdrasil.com \ / Milpitas, California 95035
+1 408 309-6081 | g g d r a s i l United States of America
"Free Software For The Rest Of Us."
next reply other threads:[~2002-11-28 1:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-28 1:54 Adam J. Richter [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-11-29 8:23 Adam J. Richter
2002-11-28 0:25 Adam J. Richter
2002-11-28 23:53 ` Rusty Russell
2002-11-27 19:04 Adam J. Richter
2002-11-27 18:19 Adam J. Richter
2002-11-27 22:42 ` Keith Owens
2002-11-27 7:22 Adam J. Richter
2002-11-27 23:15 ` Rusty Russell
2002-11-27 7:01 Adam J. Richter
2002-11-26 16:18 Adam J. Richter
2002-11-27 17:05 ` Kai Germaschewski
2002-11-26 6:53 Adam J. Richter
2002-11-26 6:49 Adam J. Richter
2002-11-26 22:40 ` Rusty Russell
2002-11-26 4:06 Adam J. Richter
2002-11-26 5:04 ` Rusty Russell
2002-11-25 22:39 Adam J. Richter
2002-11-25 22:11 Adam J. Richter
2002-11-26 0:35 ` Rusty Russell
2002-11-26 7:57 ` Ingo Oeser
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=200211280154.RAA07955@baldur.yggdrasil.com \
--to=adam@yggdrasil.com \
--cc=kaos@ocs.com.au \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®