All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Kay Sievers <kay.sievers@vrfy.org>
Cc: Jon Masters <jcm@redhat.com>,
	linux-kernel@vger.kernel.org,
	Lucas De Marchi <lucas.demarchi@profusion.mobi>
Subject: Re: [PATCH] modules: sysfs - export: taint, address, size
Date: Tue, 10 Jan 2012 09:14:14 +1030	[thread overview]
Message-ID: <87zkdw7ayp.fsf@rustcorp.com.au> (raw)
In-Reply-To: <CAPXgP12rUUYfRy6QB5Z4Rwdday3hNHubCsSRY4gMDYuQGs3oJg@mail.gmail.com>

On Mon, 9 Jan 2012 13:44:52 +0100, Kay Sievers <kay.sievers@vrfy.org> wrote:
> On Mon, Jan 9, 2012 at 08:27, Rusty Russell <rusty@rustcorp.com.au> wrote:
> > The else here is weird.  Shouldn't we leave the exclusion elsewhere?
> 
> You mean the 'else if ... TAINT_OOT_MODULE'?  It's a one-to-one copy
> of the current code, which just moved up a bit.
> 
> Disconnect the two flags form each other?

Yes, I think so.

> > This copies a past mistake, and is definitely wrong.  Either expose both
> > pointers and sizes, or don't include init_size here.  Sure, it'll
> > normally be 0, but if not it's confusing...
> 
> Ah, good to know, mod->init_size is 0 for all modules here, so we
> should just drop mod->init_size and maybe name the 'size' attribute to
> 'coresize'?

If a module is still initializing, mod->init_size may well be non-zero.
Let's rename it to coresize, and add initsize.

> > But the bigger question is: Why are we exposing these sizes?
> > /proc/modules did since 2.2, or before, but that doesn't make it the
> > best option...
> 
> Good question, I doubt it is too useful, it's just that 'lsmod' shows
> it, so we wanted to show too.

And breaking lsmod output might kill some scripts.  So it stays.

Let's drop the address stuff though.

We can actually do something more radical: we could change the kernel to
call modprobe to resolve unresolved symbols.  We already support
symbol:<symbol> for symbol_request().

This means that modprobe still needs to maintain a sym->mod mapping
(though I would argue depmod should be moved into the kernel source),
but not any dependency mapping.

Thanks,
Rusty.

  parent reply	other threads:[~2012-01-09 22:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-07 15:44 [PATCH] modules: sysfs - export: taint, address, size Kay Sievers
2012-01-09  7:27 ` Rusty Russell
2012-01-09 12:44   ` Kay Sievers
2012-01-09 18:40     ` Randy Dunlap
2012-01-09 22:44     ` Rusty Russell [this message]
2012-01-10 16:47       ` Kay Sievers
2012-01-10 23:54         ` Rusty Russell
2012-01-11  1:56           ` Lucas De Marchi
2012-01-09 15:52 ` Nick Bowler
2012-01-09 23:07 ` Greg KH

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=87zkdw7ayp.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=jcm@redhat.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucas.demarchi@profusion.mobi \
    /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.