LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [RFC on MODULE SUPPORT] hello, Rusty, Should we provide module information even if the kernel module compiled built-in with bzImage?
@ 2008-01-16 10:02 rae l
  2008-01-16 11:58 ` Mathieu SEGAUD
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: rae l @ 2008-01-16 10:02 UTC (permalink / raw)
  To: Rusty Russell; +Cc: open-iscsi, linux-kernel

hello, Rusty:
I encountered a problem when modules compiled built-in with bzImage:

open-iscsi is an iSCSI software, it has a userspace daemon(iscsid) and
a userspace mani tool(iscsiadm) and a kernel module
(scsi_transport_iscsi),
recently the kernel module has been accepted into the official kernel
release; since the module licensed with GPL, it could be compiled as
built-in,

but when I compiled the module within the bzImage, the problem appeared:

tux ~ # iscsid -f
iscsid: Missing or Invalid version from
/sys/module/scsi_transport_iscsi/version. Make sure a up to date
scsi_transport_iscsi module is loaded and a up todate version of
iscsid is running. Exiting...

this is just because iscsid hope there's an external module could be
under /sys/module, and read the kernel module's version information,
but if the module compiled built-in, all its module information
discarded and it doesn't appeared under /sys/module/, that would break
iscsid.

Now the problem is:

Should we provide module information under
/sys/module/<module-name>/... even if the module compiled built-in
with bzImage?
Or just this module(scsi_transport_iscsi) should be marked with [M] only?

if the former solution is preferred, I would be happy to work on
MODULE_INFO-like macros improvements with CONFIG_MODULE undefined.

-- 
Denis

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC on MODULE SUPPORT] hello, Rusty, Should we provide module information even if the kernel module compiled built-in with bzImage?
  2008-01-16 10:02 [RFC on MODULE SUPPORT] hello, Rusty, Should we provide module information even if the kernel module compiled built-in with bzImage? rae l
@ 2008-01-16 11:58 ` Mathieu SEGAUD
  2008-01-16 22:15   ` Rusty Russell
  2008-01-16 12:25 ` Rusty Russell
  2008-01-16 12:59 ` Sam Ravnborg
  2 siblings, 1 reply; 6+ messages in thread
From: Mathieu SEGAUD @ 2008-01-16 11:58 UTC (permalink / raw)
  To: rae l; +Cc: Rusty Russell, open-iscsi, linux-kernel

Vous m'avez dit récemment :

> hello, Rusty:
> I encountered a problem when modules compiled built-in with bzImage:
>
> open-iscsi is an iSCSI software, it has a userspace daemon(iscsid) and
> a userspace mani tool(iscsiadm) and a kernel module
> (scsi_transport_iscsi),
> recently the kernel module has been accepted into the official kernel
> release; since the module licensed with GPL, it could be compiled as
> built-in,
>
> but when I compiled the module within the bzImage, the problem appeared:
>
> tux ~ # iscsid -f
> iscsid: Missing or Invalid version from
> /sys/module/scsi_transport_iscsi/version. Make sure a up to date
> scsi_transport_iscsi module is loaded and a up todate version of
> iscsid is running. Exiting...
>
> this is just because iscsid hope there's an external module could be
> under /sys/module, and read the kernel module's version information,
> but if the module compiled built-in, all its module information
> discarded and it doesn't appeared under /sys/module/, that would break
> iscsid.
>
> Now the problem is:
>
> Should we provide module information under
> /sys/module/<module-name>/... even if the module compiled built-in
> with bzImage?
> Or just this module(scsi_transport_iscsi) should be marked with [M] only?
>
> if the former solution is preferred, I would be happy to work on
> MODULE_INFO-like macros improvements with CONFIG_MODULE undefined.

your userspace program is somewhat broken
the userspace should not expect to find the version number in
/sys/module, as this is used by the Linux kernel module subsystem. You
should provide the required information in another way such as a
/proc/ file (bad) or a /sys file (better, but no module stuff, this
has no business with it).

-- 
Mathieu

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC on MODULE SUPPORT] hello, Rusty, Should we provide module information even if the kernel module compiled built-in with bzImage?
  2008-01-16 10:02 [RFC on MODULE SUPPORT] hello, Rusty, Should we provide module information even if the kernel module compiled built-in with bzImage? rae l
  2008-01-16 11:58 ` Mathieu SEGAUD
@ 2008-01-16 12:25 ` Rusty Russell
  2008-01-16 12:59 ` Sam Ravnborg
  2 siblings, 0 replies; 6+ messages in thread
From: Rusty Russell @ 2008-01-16 12:25 UTC (permalink / raw)
  To: rae l; +Cc: open-iscsi, linux-kernel

On Wednesday 16 January 2008 21:02:22 rae l wrote:
> hello, Rusty:

Hi Denis.

> Should we provide module information under
> /sys/module/<module-name>/... even if the module compiled built-in
> with bzImage?

Absolutely.  Module parameters (should) already do that, for example.

> Or just this module(scsi_transport_iscsi) should be marked with [M] only?
>
> if the former solution is preferred, I would be happy to work on
> MODULE_INFO-like macros improvements with CONFIG_MODULE undefined.

I'd love to see patches.  module_parm showed it's possible, if messy.

Thanks!
Rusty.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC on MODULE SUPPORT] hello, Rusty, Should we provide module information even if the kernel module compiled built-in with bzImage?
  2008-01-16 10:02 [RFC on MODULE SUPPORT] hello, Rusty, Should we provide module information even if the kernel module compiled built-in with bzImage? rae l
  2008-01-16 11:58 ` Mathieu SEGAUD
  2008-01-16 12:25 ` Rusty Russell
@ 2008-01-16 12:59 ` Sam Ravnborg
  2 siblings, 0 replies; 6+ messages in thread
From: Sam Ravnborg @ 2008-01-16 12:59 UTC (permalink / raw)
  To: rae l; +Cc: Rusty Russell, open-iscsi, linux-kernel

On Wed, Jan 16, 2008 at 06:02:22PM +0800, rae l wrote:
> hello, Rusty:
> I encountered a problem when modules compiled built-in with bzImage:
> 
> open-iscsi is an iSCSI software, it has a userspace daemon(iscsid) and
> a userspace mani tool(iscsiadm) and a kernel module
> (scsi_transport_iscsi),
> recently the kernel module has been accepted into the official kernel
> release; since the module licensed with GPL, it could be compiled as
> built-in,
> 
> but when I compiled the module within the bzImage, the problem appeared:
> 
> tux ~ # iscsid -f
> iscsid: Missing or Invalid version from
> /sys/module/scsi_transport_iscsi/version. Make sure a up to date
> scsi_transport_iscsi module is loaded and a up todate version of
> iscsid is running. Exiting...
> 
> this is just because iscsid hope there's an external module could be
> under /sys/module, and read the kernel module's version information,
> but if the module compiled built-in, all its module information
> discarded and it doesn't appeared under /sys/module/, that would break
> iscsid.
> 
> Now the problem is:
> 
> Should we provide module information under
> /sys/module/<module-name>/... even if the module compiled built-in
> with bzImage?
> Or just this module(scsi_transport_iscsi) should be marked with [M] only?
> 
> if the former solution is preferred, I would be happy to work on
> MODULE_INFO-like macros improvements with CONFIG_MODULE undefined.

I recall Magnus Damm did something in this respect.
Try to google a bit and see if you hit something that
can be used as inspiration.

I was maybe only for module parameters (autoparm was the name I think).

It is not a perfect fit but maybe a help.

	Sam

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC on MODULE SUPPORT] hello, Rusty, Should we provide module information even if the kernel module compiled built-in with bzImage?
  2008-01-16 11:58 ` Mathieu SEGAUD
@ 2008-01-16 22:15   ` Rusty Russell
  2008-01-17  8:29     ` Mathieu SEGAUD
  0 siblings, 1 reply; 6+ messages in thread
From: Rusty Russell @ 2008-01-16 22:15 UTC (permalink / raw)
  To: Mathieu SEGAUD; +Cc: rae l, open-iscsi, linux-kernel

On Wednesday 16 January 2008 22:58:09 Mathieu SEGAUD wrote:
> your userspace program is somewhat broken
> the userspace should not expect to find the version number in
> /sys/module, as this is used by the Linux kernel module subsystem. You
> should provide the required information in another way such as a
> /proc/ file (bad) or a /sys file (better, but no module stuff, this
> has no business with it).

Shh!  He was going to implement a feature we want!

To be honest, I think his expectations of consistency are correct: if a 
version number makes sense, surely it makes sense for builtins as well.

Thanks,
Rusty.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC on MODULE SUPPORT] hello, Rusty, Should we provide module information even if the kernel module compiled built-in with bzImage?
  2008-01-16 22:15   ` Rusty Russell
@ 2008-01-17  8:29     ` Mathieu SEGAUD
  0 siblings, 0 replies; 6+ messages in thread
From: Mathieu SEGAUD @ 2008-01-17  8:29 UTC (permalink / raw)
  To: Rusty Russell; +Cc: rae l, open-iscsi, linux-kernel

Vous m'avez dit récemment :

> On Wednesday 16 January 2008 22:58:09 Mathieu SEGAUD wrote:
>> your userspace program is somewhat broken
>> the userspace should not expect to find the version number in
>> /sys/module, as this is used by the Linux kernel module subsystem. You
>> should provide the required information in another way such as a
>> /proc/ file (bad) or a /sys file (better, but no module stuff, this
>> has no business with it).
>
> Shh!  He was going to implement a feature we want!
>
> To be honest, I think his expectations of consistency are correct: if a 
> version number makes sense, surely it makes sense for builtins as well.

yep, I did not look out the way he suggested to do it; and sure that
is a cool feature. sorry for that one. Sometimes it's difficult to
part what should be done _in_ the kernel, what should be done _by_ the
kernel, and userspace.

thanks a lot

-- 
Mathieu

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-01-17  8:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-16 10:02 [RFC on MODULE SUPPORT] hello, Rusty, Should we provide module information even if the kernel module compiled built-in with bzImage? rae l
2008-01-16 11:58 ` Mathieu SEGAUD
2008-01-16 22:15   ` Rusty Russell
2008-01-17  8:29     ` Mathieu SEGAUD
2008-01-16 12:25 ` Rusty Russell
2008-01-16 12:59 ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).