* [KJ] What does (P) in /proc/modules mean?
@ 2007-03-04 4:05 Badai Aqrandista
2007-03-04 5:31 ` Randy Dunlap
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Badai Aqrandista @ 2007-03-04 4:05 UTC (permalink / raw)
To: kernel-janitors
Hi,
I have a plain kernel module like this:
#include <linux/module.h>
#include <linux/init.h>
MODULE_AUTHOR("Badai Aqrandista");
MODULE_LICENSE("Dual BSD/GPL");
static int cheepy_init(void)
{
printk(KERN_ALERT "cheepy: Module loaded\n");
return 0;
}
static void cheepy_cleanup(void)
{
printk(KERN_ALERT "cheepy: Module unloaded\n");
}
module_init(cheepy_init);
module_exit(cheepy_cleanup);
When I load and unload it with insmod or rmmod, it does not print
anything on the console or log. On /proc/modules, there is (P) next to
its entry, like this:
cheepy 2560 0 - Live 0xd0a37000 (P)
What does (P) mean there?
--
Thanks,
Badai Aqrandista (cheepy)
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [KJ] What does (P) in /proc/modules mean?
2007-03-04 4:05 [KJ] What does (P) in /proc/modules mean? Badai Aqrandista
@ 2007-03-04 5:31 ` Randy Dunlap
2007-03-04 5:37 ` Randy Dunlap
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Randy Dunlap @ 2007-03-04 5:31 UTC (permalink / raw)
To: kernel-janitors
On Sun, 4 Mar 2007 14:05:24 +1000 Badai Aqrandista wrote:
> Hi,
>
> I have a plain kernel module like this:
>
> #include <linux/module.h>
> #include <linux/init.h>
>
> MODULE_AUTHOR("Badai Aqrandista");
> MODULE_LICENSE("Dual BSD/GPL");
>
> static int cheepy_init(void)
> {
> printk(KERN_ALERT "cheepy: Module loaded\n");
> return 0;
> }
>
> static void cheepy_cleanup(void)
> {
> printk(KERN_ALERT "cheepy: Module unloaded\n");
> }
>
> module_init(cheepy_init);
> module_exit(cheepy_cleanup);
>
> When I load and unload it with insmod or rmmod, it does not print
> anything on the console or log. On /proc/modules, there is (P) next to
> its entry, like this:
>
> cheepy 2560 0 - Live 0xd0a37000 (P)
>
> What does (P) mean there?
It means Proprietary. What kernel version are you using?
It could be a kernel bug. What other modules do you have loaded?
I'll do some checking with your sample module.
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [KJ] What does (P) in /proc/modules mean?
2007-03-04 4:05 [KJ] What does (P) in /proc/modules mean? Badai Aqrandista
2007-03-04 5:31 ` Randy Dunlap
@ 2007-03-04 5:37 ` Randy Dunlap
2007-03-04 12:19 ` Badai Aqrandista
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Randy Dunlap @ 2007-03-04 5:37 UTC (permalink / raw)
To: kernel-janitors
On Sat, 3 Mar 2007 21:31:38 -0800 Randy Dunlap wrote:
> On Sun, 4 Mar 2007 14:05:24 +1000 Badai Aqrandista wrote:
>
> > Hi,
> >
> > I have a plain kernel module like this:
> >
> > #include <linux/module.h>
> > #include <linux/init.h>
> >
> > MODULE_AUTHOR("Badai Aqrandista");
> > MODULE_LICENSE("Dual BSD/GPL");
> >
> > static int cheepy_init(void)
> > {
> > printk(KERN_ALERT "cheepy: Module loaded\n");
> > return 0;
> > }
> >
> > static void cheepy_cleanup(void)
> > {
> > printk(KERN_ALERT "cheepy: Module unloaded\n");
> > }
> >
> > module_init(cheepy_init);
> > module_exit(cheepy_cleanup);
> >
> > When I load and unload it with insmod or rmmod, it does not print
> > anything on the console or log. On /proc/modules, there is (P) next to
> > its entry, like this:
> >
> > cheepy 2560 0 - Live 0xd0a37000 (P)
> >
> > What does (P) mean there?
>
> It means Proprietary. What kernel version are you using?
>
> It could be a kernel bug. What other modules do you have loaded?
>
> I'll do some checking with your sample module.
I just tested this module on 2.6.20, no license issues/problems
at all. So what kernel version were you using and what other
modules were loaded or had been loaded?
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [KJ] What does (P) in /proc/modules mean?
2007-03-04 4:05 [KJ] What does (P) in /proc/modules mean? Badai Aqrandista
2007-03-04 5:31 ` Randy Dunlap
2007-03-04 5:37 ` Randy Dunlap
@ 2007-03-04 12:19 ` Badai Aqrandista
2007-03-04 18:23 ` Randy Dunlap
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Badai Aqrandista @ 2007-03-04 12:19 UTC (permalink / raw)
To: kernel-janitors
Hi,
On 3/4/07, Randy Dunlap <rdunlap@xenotime.net> wrote:
> I just tested this module on 2.6.20, no license issues/problems
> at all. So what kernel version were you using and what other
> modules were loaded or had been loaded?
I think I found the cause. It's the Makefile. I copied the Makefile
from ldd3 and it includes this line:
CFLAGS += $(DEBFLAGS) -I$(LDDINCDIR)
When I removed -I$(LDDINCDIR) from that line and recompiled the
module, the (P) mark is gone and all printk's are printed to the log.
And $(LDDINCDIR) variable is empty because I didn't pass it.
So I think I can reduce the problem to: passing an empty -I parameter
to CFLAGS makes the module proprietory.
Why is that?
Anyway, thanks for replying so quickly.
--
Thanks,
Badai Aqrandista (cheepy)
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [KJ] What does (P) in /proc/modules mean?
2007-03-04 4:05 [KJ] What does (P) in /proc/modules mean? Badai Aqrandista
` (2 preceding siblings ...)
2007-03-04 12:19 ` Badai Aqrandista
@ 2007-03-04 18:23 ` Randy Dunlap
2007-03-04 21:30 ` Sam Ravnborg
2007-03-05 3:49 ` Greg KH
5 siblings, 0 replies; 7+ messages in thread
From: Randy Dunlap @ 2007-03-04 18:23 UTC (permalink / raw)
To: kernel-janitors
On Sun, 4 Mar 2007 22:19:51 +1000 Badai Aqrandista wrote:
> Hi,
>
> On 3/4/07, Randy Dunlap <rdunlap@xenotime.net> wrote:
> > I just tested this module on 2.6.20, no license issues/problems
> > at all. So what kernel version were you using and what other
> > modules were loaded or had been loaded?
>
> I think I found the cause. It's the Makefile. I copied the Makefile
> from ldd3 and it includes this line:
>
> CFLAGS += $(DEBFLAGS) -I$(LDDINCDIR)
>
> When I removed -I$(LDDINCDIR) from that line and recompiled the
> module, the (P) mark is gone and all printk's are printed to the log.
> And $(LDDINCDIR) variable is empty because I didn't pass it.
>
> So I think I can reduce the problem to: passing an empty -I parameter
> to CFLAGS makes the module proprietory.
I'll confirm that.
> Why is that?
Good question. I have no idea.
Sam, do you have any idea why adding "-I " to a Makefile
causes a module license not to be found correctly?
From my testing:
cheepy: module license 'unspecified' taints kernel.
(2.6.20 kernel)
> Anyway, thanks for replying so quickly.
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [KJ] What does (P) in /proc/modules mean?
2007-03-04 4:05 [KJ] What does (P) in /proc/modules mean? Badai Aqrandista
` (3 preceding siblings ...)
2007-03-04 18:23 ` Randy Dunlap
@ 2007-03-04 21:30 ` Sam Ravnborg
2007-03-05 3:49 ` Greg KH
5 siblings, 0 replies; 7+ messages in thread
From: Sam Ravnborg @ 2007-03-04 21:30 UTC (permalink / raw)
To: kernel-janitors
On Sun, Mar 04, 2007 at 10:23:59AM -0800, Randy Dunlap wrote:
> On Sun, 4 Mar 2007 22:19:51 +1000 Badai Aqrandista wrote:
>
> > Hi,
> >
> > On 3/4/07, Randy Dunlap <rdunlap@xenotime.net> wrote:
> > > I just tested this module on 2.6.20, no license issues/problems
> > > at all. So what kernel version were you using and what other
> > > modules were loaded or had been loaded?
> >
> > I think I found the cause. It's the Makefile. I copied the Makefile
> > from ldd3 and it includes this line:
> >
> > CFLAGS += $(DEBFLAGS) -I$(LDDINCDIR)
ldd3 is wrong. Never ever mess around with CFLAGS. Use EXTRA_CFLAGS
which is there for a purpose.
Copied Greg + Jon to notice them.
> > When I removed -I$(LDDINCDIR) from that line and recompiled the
> > module, the (P) mark is gone and all printk's are printed to the log.
> > And $(LDDINCDIR) variable is empty because I didn't pass it.
> >
> > So I think I can reduce the problem to: passing an empty -I parameter
> > to CFLAGS makes the module proprietory.
>
> I'll confirm that.
>
> > Why is that?
>
> Good question. I have no idea.
> Sam, do you have any idea why adding "-I " to a Makefile
> causes a module license not to be found correctly?
Puzzeled???
I did not try it out myself but I do not see why it should
impact module licensing.
It is only in a very few places this flag is set which makes it
look even more strange.
Sam
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [KJ] What does (P) in /proc/modules mean?
2007-03-04 4:05 [KJ] What does (P) in /proc/modules mean? Badai Aqrandista
` (4 preceding siblings ...)
2007-03-04 21:30 ` Sam Ravnborg
@ 2007-03-05 3:49 ` Greg KH
5 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2007-03-05 3:49 UTC (permalink / raw)
To: kernel-janitors
On Sun, Mar 04, 2007 at 10:30:21PM +0100, Sam Ravnborg wrote:
> On Sun, Mar 04, 2007 at 10:23:59AM -0800, Randy Dunlap wrote:
> > On Sun, 4 Mar 2007 22:19:51 +1000 Badai Aqrandista wrote:
> >
> > > Hi,
> > >
> > > On 3/4/07, Randy Dunlap <rdunlap@xenotime.net> wrote:
> > > > I just tested this module on 2.6.20, no license issues/problems
> > > > at all. So what kernel version were you using and what other
> > > > modules were loaded or had been loaded?
> > >
> > > I think I found the cause. It's the Makefile. I copied the Makefile
> > > from ldd3 and it includes this line:
> > >
> > > CFLAGS += $(DEBFLAGS) -I$(LDDINCDIR)
>
> ldd3 is wrong. Never ever mess around with CFLAGS. Use EXTRA_CFLAGS
> which is there for a purpose.
> Copied Greg + Jon to notice them.
Thanks for letting us know, I think that for the few examples in LDD3
that use this, we didn't realize EXTRA_CFLAGS was possible (remember,
the book is quite old now...)
If we do a new release, this will be one of those things that we change.
thanks,
greg k-h
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-03-05 3:49 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-04 4:05 [KJ] What does (P) in /proc/modules mean? Badai Aqrandista
2007-03-04 5:31 ` Randy Dunlap
2007-03-04 5:37 ` Randy Dunlap
2007-03-04 12:19 ` Badai Aqrandista
2007-03-04 18:23 ` Randy Dunlap
2007-03-04 21:30 ` Sam Ravnborg
2007-03-05 3:49 ` Greg KH
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.