Re: [RFC] add kobject to struct module

From: Greg KH (greg_at_kroah.com)
Date: 09/11/03

  • Next message: Nakajima, Jun: "RE: 2.6.0-test5-mm1"
    Date:	Wed, 10 Sep 2003 16:45:38 -0700
    To: rusty@rustcorp.com.au, linux-kernel@vger.kernel.org
    
    

    On Thu, Sep 11, 2003 at 12:32:47AM +0100, Russell King wrote:
    > On Tue, Sep 09, 2003 at 03:24:21PM -0700, Greg KH wrote:
    > > A while ago we had talked about adding a kobject to struct module. By
    > > doing this we add support for module paramaters and other module info to
    > > be exported in sysfs. So here's a patch that does this that is against
    > > 2.6.0-test4 (it applies with some fuzz, sorry.)
    >
    > Please excuse my short-sightedness, but I think the following points
    > haven't been thought deeply enough:
    >
    > - modules which use their parameters on initialisation only once.
    > (eg, 3c59x "full_duplex" parameter)
    >
    > - Also, what about module parameters which modules aren't expecting to
    > change beneath themselves? (eg, all the watchdog modules)
    >
    > - Are we opening the floodgates for another round of races and driver
    > updates?

    If you set the "perm" portion of the module_param() macro to 0, then the
    sysfs file will not be created. That will cause all of the old modules
    that use the MODULE_PARAM() macro to not have things change for them, as
    they will not be expecting it.

    To quote from include/linux/moduleparam.h:
    /* This is the fundamental function for registering boot/module
       parameters. perm sets the visibility in driverfs: 000 means it's
       not there, read bits mean it's readable, write bits mean it's
       writable. */

    Sound ok with you?

    thanks,

    greg k-h
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Nakajima, Jun: "RE: 2.6.0-test5-mm1"

    Relevant Pages

    • Re: Driver Model
      ... If the driver does not contain the appropriate ... > If the MODULE_LICENSEmacro is what determines taint, ... the module is GPL and (after you've shipped ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • RE: Driver Model
      ... If the driver does not contain the appropriate ... If the MODULE_LICENSEmacro is what determines taint, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: patch for sysfs in the cyclades driver
      ... I will check the driver you pointed as an example. ... >> patch, and also to Greg for his comments to the last patch. ... > Hm, ok, you can't use a macro for them then, sorry. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: My thoughts on the "new development model"
      ... |>>> 2.6 tree is great for gentoo users who like gcc consuming all CPU ... |>> that after a month or so of fixes etc it will be a very stable kernel ... driver for 2.6.7 for an ADSL card; a development driver for 2.6.5 for a ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: sata related hang with linux-2.6
      ... IMHO there's something not quite right with the Silicon Image libata ... Perhaps the driver is enabling the hardware to generate interrupts ... before setting up the interrupt routine for it? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)