Re: Add missing module license tag to vring helpers.
Dave Jones writes: > On Mon, May 06, 2013 at 05:06:23PM +0930, Rusty Russell wrote: > > Dave Jones writes: > > > [ 624.286653] vringh: module license 'unspecified' taints kernel. > > > > > > Signed-off-by: Dave Jones > > > > Thanks! This is exactly right. > > > > But note that the default license tag for otherwise-unlabelled modules > > would be "GPLv2". "GPL" means v2 or later (which is what I want, but > > it's not the kernel default). > > It would be good if we could somehow catch missing tags at build-time > rather than have to run around fixing them after they get merged. Hmm, modpost seems to have code to detect that... but it doesn't. That's because there's not .modinfo section at all, so for some reason it doesn't warn. Sam put this check in a few years ago, with a fairly useless commit message: commit 2fa365682943866baf85305ef701741fe41b27e0 Author: Sam Ravnborg Date: Sat Apr 26 21:07:26 2008 +0200 kbuild: soften MODULE_LICENSE check Only modules that has other MODULE_* content shall have the MODULE_LICENSE() tag. This fixes allmodconfig build on my box. Signed-off-by: Sam Ravnborg Ripped that out, and fast forward a few hours later when I've done an allmodconfig build; OK, now I'm confused. Why do we hand init/built-in.o to modpost? WARNING: modpost: missing MODULE_LICENSE() in init/built-in.o There were some real problems found, too: WARNING: modpost: missing MODULE_LICENSE() in drivers/acpi/acpi_i2c.o see include/linux/module.h for more information WARNING: modpost: missing MODULE_LICENSE() in drivers/mfd/cros_ec.o see include/linux/module.h for more information WARNING: modpost: missing MODULE_LICENSE() in drivers/mtd/nand/denali_pci.o see include/linux/module.h for more information WARNING: modpost: missing MODULE_LICENSE() in drivers/thermal/cpu_cooling.o see include/linux/module.h for more information WARNING: modpost: missing MODULE_LICENSE() in drivers/usb/phy/phy-samsung-usb.o see include/linux/module.h for more information WARNING: modpost: missing MODULE_LICENSE() in drivers/vhost/vringh.o see include/linux/module.h for more information WARNING: modpost: missing MODULE_LICENSE() in sound/soc/atmel/snd-soc-atmel-pcm.o see include/linux/module.h for more information WARNING: modpost: missing MODULE_LICENSE() in sound/soc/codecs/snd-soc-wm-adsp.o see include/linux/module.h for more information Confused, Rusty. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Add missing module license tag to vring helpers.
Dave Jones da...@redhat.com writes: On Mon, May 06, 2013 at 05:06:23PM +0930, Rusty Russell wrote: Dave Jones da...@redhat.com writes: [ 624.286653] vringh: module license 'unspecified' taints kernel. Signed-off-by: Dave Jones da...@redhat.com Thanks! This is exactly right. But note that the default license tag for otherwise-unlabelled modules would be GPLv2. GPL means v2 or later (which is what I want, but it's not the kernel default). It would be good if we could somehow catch missing tags at build-time rather than have to run around fixing them after they get merged. Hmm, modpost seems to have code to detect that... but it doesn't. That's because there's not .modinfo section at all, so for some reason it doesn't warn. Sam put this check in a few years ago, with a fairly useless commit message: commit 2fa365682943866baf85305ef701741fe41b27e0 Author: Sam Ravnborg s...@uranus.ravnborg.org Date: Sat Apr 26 21:07:26 2008 +0200 kbuild: soften MODULE_LICENSE check Only modules that has other MODULE_* content shall have the MODULE_LICENSE() tag. This fixes allmodconfig build on my box. Signed-off-by: Sam Ravnborg s...@ravnborg.org Ripped that out, and fast forward a few hours later when I've done an allmodconfig build; OK, now I'm confused. Why do we hand init/built-in.o to modpost? WARNING: modpost: missing MODULE_LICENSE() in init/built-in.o There were some real problems found, too: WARNING: modpost: missing MODULE_LICENSE() in drivers/acpi/acpi_i2c.o see include/linux/module.h for more information WARNING: modpost: missing MODULE_LICENSE() in drivers/mfd/cros_ec.o see include/linux/module.h for more information WARNING: modpost: missing MODULE_LICENSE() in drivers/mtd/nand/denali_pci.o see include/linux/module.h for more information WARNING: modpost: missing MODULE_LICENSE() in drivers/thermal/cpu_cooling.o see include/linux/module.h for more information WARNING: modpost: missing MODULE_LICENSE() in drivers/usb/phy/phy-samsung-usb.o see include/linux/module.h for more information WARNING: modpost: missing MODULE_LICENSE() in drivers/vhost/vringh.o see include/linux/module.h for more information WARNING: modpost: missing MODULE_LICENSE() in sound/soc/atmel/snd-soc-atmel-pcm.o see include/linux/module.h for more information WARNING: modpost: missing MODULE_LICENSE() in sound/soc/codecs/snd-soc-wm-adsp.o see include/linux/module.h for more information Confused, Rusty. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Add missing module license tag to vring helpers.
On Mon, May 06, 2013 at 05:06:23PM +0930, Rusty Russell wrote: > Dave Jones writes: > > [ 624.286653] vringh: module license 'unspecified' taints kernel. > > > > Signed-off-by: Dave Jones > > Thanks! This is exactly right. > > But note that the default license tag for otherwise-unlabelled modules > would be "GPLv2". "GPL" means v2 or later (which is what I want, but > it's not the kernel default). It would be good if we could somehow catch missing tags at build-time rather than have to run around fixing them after they get merged. Dave -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Add missing module license tag to vring helpers.
Dave Jones writes: > [ 624.286653] vringh: module license 'unspecified' taints kernel. > > Signed-off-by: Dave Jones Thanks! This is exactly right. But note that the default license tag for otherwise-unlabelled modules would be "GPLv2". "GPL" means v2 or later (which is what I want, but it's not the kernel default). Applied, Rusty. > diff --git a/drivers/vhost/vringh.c b/drivers/vhost/vringh.c > index bff0775..5174eba 100644 > --- a/drivers/vhost/vringh.c > +++ b/drivers/vhost/vringh.c > @@ -3,6 +3,7 @@ > * > * Since these may be in userspace, we use (inline) accessors. > */ > +#include > #include > #include > #include > @@ -1005,3 +1006,5 @@ int vringh_need_notify_kern(struct vringh *vrh) > return __vringh_need_notify(vrh, getu16_kern); > } > EXPORT_SYMBOL(vringh_need_notify_kern); > + > +MODULE_LICENSE("GPL"); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Add missing module license tag to vring helpers.
On Mon, May 06, 2013 at 05:06:23PM +0930, Rusty Russell wrote: Dave Jones da...@redhat.com writes: [ 624.286653] vringh: module license 'unspecified' taints kernel. Signed-off-by: Dave Jones da...@redhat.com Thanks! This is exactly right. But note that the default license tag for otherwise-unlabelled modules would be GPLv2. GPL means v2 or later (which is what I want, but it's not the kernel default). It would be good if we could somehow catch missing tags at build-time rather than have to run around fixing them after they get merged. Dave -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Add missing module license tag to vring helpers.
Dave Jones da...@redhat.com writes: [ 624.286653] vringh: module license 'unspecified' taints kernel. Signed-off-by: Dave Jones da...@redhat.com Thanks! This is exactly right. But note that the default license tag for otherwise-unlabelled modules would be GPLv2. GPL means v2 or later (which is what I want, but it's not the kernel default). Applied, Rusty. diff --git a/drivers/vhost/vringh.c b/drivers/vhost/vringh.c index bff0775..5174eba 100644 --- a/drivers/vhost/vringh.c +++ b/drivers/vhost/vringh.c @@ -3,6 +3,7 @@ * * Since these may be in userspace, we use (inline) accessors. */ +#include linux/module.h #include linux/vringh.h #include linux/virtio_ring.h #include linux/kernel.h @@ -1005,3 +1006,5 @@ int vringh_need_notify_kern(struct vringh *vrh) return __vringh_need_notify(vrh, getu16_kern); } EXPORT_SYMBOL(vringh_need_notify_kern); + +MODULE_LICENSE(GPL); -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/