All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: David Decotigny <david.decotigny@google.com>,
	linux-kernel@vger.kernel.org
Cc: Randy Dunlap <rdunlap@xenotime.net>,
	Michal Schmidt <mschmidt@redhat.com>,
	Linus Walleij <linus.walleij@stericsson.com>,
	David Decotigny <david.decotigny@google.com>
Subject: Re: [PATCH v1 3/3] param: allow to selectively enable /sys/module/MOD/paramaters nodes
Date: Mon, 31 Oct 2011 12:12:23 +1030	[thread overview]
Message-ID: <87vcr6os1r.fsf@rustcorp.com.au> (raw)
In-Reply-To: <d1eab40bc9015e24c2c455cf3142f7966daa827a.1319679966.git.david.decotigny@google.com>

Hi David,

        I'm having real trouble parsing your descriptions.  I found it
easier to read the patches, and that'd not good.

On Wed, 26 Oct 2011 19:22:27 -0700, David Decotigny <david.decotigny@google.com> wrote:
> This change defines CONFIG_SYSFS_MODULE_PARAM to prevent kernel module
> parameters from being exposed to user. When unset, /sys/module/MOD is
> populated as usual, except for the "parameters" sub-directory, which
> is not created anymore.

That's backwards.  CONFIG_SYSFS_MODULE_PARAM *enables*
/sys/module/<modname>/parameters, this implies it disables it.  Sure, it
allows it to be disabled without disabling all of CONFIG_SYSFS.

> Context: by default, when the module_param() attribute perm == 0, the
> module attribute is not exposed to user in
> /sys/module/*/parameters. Many module implementations use this
> strategy, presumably to spare some memory.

No, they use it because that was the default when I transferred them all
from the older module parameter system.  It was the safe choice.

> However, it can be
> interesting to retrieve how kernel modules are configured at run-time
> (debug, audit, etc.): it would be nice to see more modules have perm
> != 0 in order to expose their configuration pararemers to
> user.

But this patch doesn't address any of that.

> Unfortunately, this doesn't play well with memory-constrained
> systems that need sysfs but don't need this level of
> introspection. This change allows to support both use cases.

Do you have any statistics to support your assertion that this has any
significant effect on memory usage?

Your patches seem fine, but your descriptions are not straightforward!

Thanks,
Rusty.

      reply	other threads:[~2011-10-31  6:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-27  2:22 [PATCH v1 0/3] param: configurable /sys/module/*/paramaters David Decotigny
2011-10-27  2:22 ` [PATCH v1 1/3] param: make destroy_params() private David Decotigny
2011-10-27  2:22 ` [PATCH v1 2/3] param: simple refactoring David Decotigny
2011-10-27  2:22 ` [PATCH v1 3/3] param: allow to selectively enable /sys/module/MOD/paramaters nodes David Decotigny
2011-10-31  1:42   ` Rusty Russell [this message]

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=87vcr6os1r.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=david.decotigny@google.com \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mschmidt@redhat.com \
    --cc=rdunlap@xenotime.net \
    /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.