Skip to contentSkip to conversation

2.5.42: build nfsd as module broken

PATCH In review Olaf Dietsche 3 participants 3 messages Oct 12, 2002

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.5.42: build nfsd as module broken

# make modules_install
gives the following error:

[...]
if [ -r System.map ]; then /sbin/depmod -ae -F System.map 2.5.42; fi

depmod: *** Unresolved symbols in /lib/modules/2.5.42/kernel/fs/nfsd/nfsd.o
depmod:         auth_domain_find
depmod:         cache_fresh
depmod:         unix_domain_find
depmod:         auth_domain_put
depmod:         cache_flush
depmod:         cache_unregister
depmod:         add_hex
depmod:         cache_check
depmod:         svcauth_unix_purge
depmod:         get_word
depmod:         cache_clean
depmod:         cache_register
depmod:         auth_unix_lookup
depmod:         auth_unix_add_addr
depmod:         cache_init
depmod:         auth_unix_forget_old
depmod:         add_word

This patch adds several EXPORT_SYMBOL() to net/sunrpc/*.c. The kernel builds and boots. I haven't tested nfsd yet.

Regards, Olaf.

net/sunrpc/Makefile +1 -1
diff -urN a/net/sunrpc/Makefile b/net/sunrpc/Makefile
@@ -4,7 +4,7 @@
 
 obj-$(CONFIG_SUNRPC) += sunrpc.o
 
-export-objs := sunrpc_syms.o
+export-objs := sunrpc_syms.o svcauth.o svcauth_unix.o cache.o
 
 sunrpc-y := clnt.o xprt.o sched.o \
 	    auth.o auth_null.o auth_unix.o \
net/sunrpc/cache.c +11 -0
diff -urN a/net/sunrpc/cache.c b/net/sunrpc/cache.c
@@ -925,3 +925,14 @@
 		return len;
 	return -1;
 }
+
+EXPORT_SYMBOL(cache_fresh);
+EXPORT_SYMBOL(cache_flush);
+EXPORT_SYMBOL(cache_unregister);
+EXPORT_SYMBOL(cache_check);
+EXPORT_SYMBOL(cache_clean);
+EXPORT_SYMBOL(cache_register);
+EXPORT_SYMBOL(cache_init);
+EXPORT_SYMBOL(add_word);
+EXPORT_SYMBOL(add_hex);
+EXPORT_SYMBOL(get_word);
net/sunrpc/svcauth.c +4 -0
diff -urN a/net/sunrpc/svcauth.c b/net/sunrpc/svcauth.c
@@ -16,6 +16,7 @@
 #include <linux/sunrpc/svcsock.h>
 #include <linux/sunrpc/svcauth.h>
 #include <linux/err.h>
+#include <linux/module.h>
 
 #define RPCDBG_FACILITY	RPCDBG_AUTH
 
@@ -189,3 +190,6 @@
 	rv = auth_domain_lookup(&ad, 0);
 	return rv;
 }
+
+EXPORT_SYMBOL(auth_domain_find);
+EXPORT_SYMBOL(auth_domain_put);
net/sunrpc/svcauth_unix.c +6 -0
diff -urN a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c
@@ -5,6 +5,7 @@
 #include <linux/sunrpc/svcsock.h>
 #include <linux/sunrpc/svcauth.h>
 #include <linux/err.h>
+#include <linux/module.h>
 
 #define RPCDBG_FACILITY	RPCDBG_AUTH
 
@@ -462,3 +463,8 @@
 	.release	= svcauth_unix_release,
 };
 
+EXPORT_SYMBOL(unix_domain_find);
+EXPORT_SYMBOL(auth_unix_lookup);
+EXPORT_SYMBOL(auth_unix_add_addr);
+EXPORT_SYMBOL(auth_unix_forget_old);
+EXPORT_SYMBOL(svcauth_unix_purge);
#1 lore raw

net/sunrpc/cache.c line 938

Quoted 10 lines · Olaf Dietsche
net/sunrpc/cache.c +10 -0
+EXPORT_SYMBOL(cache_fresh);
+EXPORT_SYMBOL(cache_flush);
+EXPORT_SYMBOL(cache_unregister);
+EXPORT_SYMBOL(cache_check);
+EXPORT_SYMBOL(cache_clean);
+EXPORT_SYMBOL(cache_register);
+EXPORT_SYMBOL(cache_init);
+EXPORT_SYMBOL(add_word);
+EXPORT_SYMBOL(add_hex);
+EXPORT_SYMBOL(get_word);

Ahem. Non-static objects called add_word and get_word? Even the cache_...() stuff is a namespace pollution (which kind of cache?), but that...

#2 lore raw
Quoted 4 lines · On Saturday October 12, [email protected] wrote:

On Sat, 12 Oct 2002, Olaf Dietsche wrote:

Quoted 13 lines

net/sunrpc/cache.c line 938

Quoted 10 lines
net/sunrpc/cache.c +10 -0
+EXPORT_SYMBOL(cache_fresh);
+EXPORT_SYMBOL(cache_flush);
+EXPORT_SYMBOL(cache_unregister);
+EXPORT_SYMBOL(cache_check);
+EXPORT_SYMBOL(cache_clean);
+EXPORT_SYMBOL(cache_register);
+EXPORT_SYMBOL(cache_init);
+EXPORT_SYMBOL(add_word);
+EXPORT_SYMBOL(add_hex);
+EXPORT_SYMBOL(get_word);

Ahem. Non-static objects called add_word and get_word? Even the cache_...() stuff is a namespace pollution (which kind of cache?), but that...

Fair comment.

The words are actually 'quoted words', so maybe:

qword_add
qword_addhex
qword_parse (or qword_get)

would be better.

The caches are for caching user-space-sourced information (IP -> hostname, export options, uid->username etc) so maybe

ucache_*
though that is a bit bland....

uss_cache_*

(for the trekkies)???

NeilBrown