All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Cc: Ralf Baechle <ralf@uni-koblenz.de>,
	linux-mips@fnet.fr, linux-mips@oss.sgi.com
Subject: Re: [patch] linux 2.4.5: __dbe_table iteration #2
Date: Thu, 23 Aug 2001 11:49:53 +1000	[thread overview]
Message-ID: <19339.998531393@kao2.melbourne.sgi.com> (raw)
In-Reply-To: Your message of "Mon, 20 Aug 2001 15:57:21 +0200." <Pine.GSO.3.96.1010820150047.3562D-100000@delta.ds2.pg.gda.pl>

On Mon, 20 Aug 2001 15:57:21 +0200 (MET DST), 
"Maciej W. Rozycki" <macro@ds2.pg.gda.pl> wrote:
>+	for (mp = module_list; mp != NULL; mp = mp->next) {
>+		if (!mod_member_present(mp, archdata_start) ||
>+		    !mp->archdata_start)
>+			continue;
>+		ap = (struct archdata *)(mp->archdata_start);

The definition of struct archdata in kernel and modutils can be
different, a new kernel layout with an old modutils is legal but fatal
unless you code for it.  The correct test for archdata is

if (!mod_member_present(mp, archdata_start) ||
    (mp->archdata_end - mp->archdata_start) <=
     offsetof(struct archdata, dbe_table_end))
	continue;

Do not use archdata unless it is at least large enough to contain
dbe_table_end.  That test also takes care of NULL pointers, end - start
== 0 for NULL.

The rest of the code looks OK, except it needs a global change of
arch_init_module: to module_arch_init: to match the macro name.

Do you have the corresponding modutils patch or shall I do it?

  reply	other threads:[~2001-08-23  1:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-13 13:38 [patch] linux 2.4.5: Make __dbe_table available to modules Maciej W. Rozycki
2001-08-13 15:50 ` Ralf Baechle
2001-08-13 16:24   ` Maciej W. Rozycki
2001-08-13 18:11     ` Gleb O. Raiko
2001-08-14 17:34       ` Maciej W. Rozycki
2001-08-23 11:23         ` Gleb O. Raiko
2001-08-23 15:46           ` Maciej W. Rozycki
2001-08-23 20:11             ` bus error by write transaction (RE: [patch] linux 2.4.5: Make __dbe_table available to modules) Hiroo Hayashi
2001-08-23 20:11               ` Hiroo Hayashi
2001-08-24 16:18               ` Maciej W. Rozycki
2001-08-27 16:49                 ` Hiroo Hayashi
2001-08-27 16:49                   ` Hiroo Hayashi
2001-08-20 13:57 ` [patch] linux 2.4.5: __dbe_table iteration #2 Maciej W. Rozycki
2001-08-23  1:49   ` Keith Owens [this message]
2001-08-23 16:52     ` Maciej W. Rozycki
2001-08-23 23:11       ` Keith Owens
2001-08-24 15:49         ` Keith Owens
2001-08-24 15:44         ` Maciej W. Rozycki
2001-08-27  3:09           ` Keith Owens
2001-08-27  6:20             ` Ralf Baechle

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=19339.998531393@kao2.melbourne.sgi.com \
    --to=kaos@ocs.com.au \
    --cc=linux-mips@fnet.fr \
    --cc=linux-mips@oss.sgi.com \
    --cc=macro@ds2.pg.gda.pl \
    --cc=ralf@uni-koblenz.de \
    /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.