mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Russell King <rmk@arm.linux.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Patch: module-init-tools-0.6/modprobe.c - support subdirectories
Date: Wed, 20 Nov 2002 08:34:36 +1100	[thread overview]
Message-ID: <20021120072654.09CAE2C075@lists.samba.org> (raw)
In-Reply-To: Your message of "Tue, 19 Nov 2002 14:55:02 -0000." <20021119145502.B5535@flint.arm.linux.org.uk>

In message <20021119145502.B5535@flint.arm.linux.org.uk> you write:
> On Tue, Nov 19, 2002 at 05:42:38PM +1100, Rusty Russell wrote:
> > A: The total linking code is about 200 generic lines, 100
> >    x86-specific lines.
> 
> Should we be bounds-checking the relocations?  Maybe we are (I'm not
> familiar enough with this new module code yet.)  I'm specifically
> thinking about the following:
> 
> 		/* This is where to make the change */
> 		location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_offset
> 			+ rel[i].r_offset;
> 		/* This is the symbol it is referring to */
> 		sym = (Elf32_Sym *)sechdrs[symindex].sh_offset
> 			+ ELF32_R_SYM(rel[i].r_info);
> 		if (!sym->st_value) {

No, you didn't miss anything: I do minimal checking.  I figured it was
worth preventing mistakes (eg. insmod randomcrap.o), but in the end
you're going to trust the module.

I'd say definitely if you know that it has happened (eg. binutils bugs
or something).

Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

  reply	other threads:[~2002-11-20  7:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-18 15:32 Adam J. Richter
2002-11-19  6:42 ` Rusty Russell
2002-11-19  6:49   ` Keith Owens
2002-11-19 14:55   ` Russell King
2002-11-19 21:34     ` Rusty Russell [this message]
2002-11-19  0:13 Adam J. Richter
2002-11-19 13:47 Adam J. Richter
2002-11-19 14:01 Adam J. Richter

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=20021120072654.09CAE2C075@lists.samba.org \
    --to=rusty@rustcorp.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    /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®