Skip to contentSkip to conversation

insmod error with module, memcpy

PATCH New Aurelien Francillon 1 participant 1 message Aug 11, 2004 User-mode Linux (UML)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 insmod error with module, memcpy

hi,
i am unable to insmod a external module which uses the memcpy function against a 2.4.26-um2 kernel patched with the last patches from
http://user-mode-linux.sourceforge.net/patches.html
while this works with a 2.4.24 uml kernel.

With the following patch this works again for me, but i really don't know if this is the right way to do this ?

aurélien

arch/um/kernel/user_syms.c Wed Aug 11 14:07:08 2004 renamed from arch/um/kernel/user_syms.c Wed Aug 11 12:21:55 2004 +0 -0
@@ -1,34 +1,28 @@

#include "linux/types.h"
#include "linux/module.h"

-/* XXX Deleted a number of symbols because they clashed strangely with headers
- * Add them back later.
- */
-
-#if 0
/* Some of this are builtin function (some are not but could in the future),
* so I *must* declare good prototypes for them and then EXPORT them.
* The kernel code uses the macro defined by include/linux/string.h,
* so I undef macros; the userspace code does not include that and I
* add an EXPORT for the glibc one.*/

+
#undef strlen
+#undef strstr
#undef memcpy
#undef memset

-EXPORT_SYMBOL_PROTO(strlen); -EXPORT_SYMBOL_PROTO(memset); -EXPORT_SYMBOL_PROTO(memcpy);
-#undef strstr
-
-EXPORT_SYMBOL_PROTO(strstr);
-
extern size_t strlen(const char *);
extern void *memcpy(void *, const void *, size_t); extern void *memset(void *, int, size_t); -extern int printf(const char *, ...);

-#endif
+EXPORT_SYMBOL(strlen);
+EXPORT_SYMBOL(memcpy);
+EXPORT_SYMBOL(memset);
+
+EXPORT_SYMBOL(strstr);
+

/* Here, instead, I can provide a fake prototype. Yes, someone cares: genksyms.
* However, the modules will use the CRC defined *here*, no matter if
it is

-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel