Re: [PATCH 2.5.5] do export vmalloc_to_page to modules...

Andrea Arcangeli (andrea@suse.de)
Wed, 3 Apr 2002 18:21:18 +0200


On Wed, Feb 20, 2002 at 11:01:27AM -0500, Arjan van de Ven wrote:
> Now if it should be EXPORT_SYMBOL or EXPORT_SYMBOL_GPL() I leave to Ingo

It has to be EXPORT_SYMBOL. Requiring non GPL drivers to walk pagetables
by hand is pointless. we should definitely recommend those driver
authors to use vmalloc_to_page, in particular if the drivers are not
GPL.

To see it in another way If we make vmalloc_to_page linkable only by GPL
drivers, then we should do the same with all the other functionalities
too starting from map_user_kiobuf etc...

Infact I'm not really sure the _GPL tag makes sense in the first place.
If an interface shouldn't be used by a binary only module, why should it
be used by a GPL module? It doesn't make any sense to me, of course
I'm looking at it from a technical prospective. If your grand plan is to
forbid a non GPL module to call vmalloc/kmalloc/alloc_pages, then the
non GPL module developer will be in great pain I see, but that still
doesn't make any sense to me because the rule is that binary only
modules are legal. Not that I will ever use binary only modules myself,
not that I will ever do anything to help binary only modules, but I
don't either do anything to explicitly hurt them, I just ignore them.

--- 2.4.19pre5aa1/kernel/ksyms.c.~1~ Sun Mar 31 03:37:18 2002
+++ 2.4.19pre5aa1/kernel/ksyms.c Wed Apr 3 17:53:29 2002
@@ -114,7 +114,7 @@
EXPORT_SYMBOL(kfree);
EXPORT_SYMBOL(vfree);
EXPORT_SYMBOL(__vmalloc);
-EXPORT_SYMBOL_GPL(vmalloc_to_page);
+EXPORT_SYMBOL(vmalloc_to_page);
#ifndef CONFIG_DISCONTIGMEM
EXPORT_SYMBOL(contig_page_data);
EXPORT_SYMBOL(mem_map);
Andrea
-
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/