From: Zachary Amsden Subject: [RFC, PATCH 20/24] i386 Vmi module fixups Date: Mon, 13 Mar 2006 10:14:37 -0800 Message-ID: <200603131814.k2DIEbpA005766@zach-dev.vmware.com> Return-path: Sender: linux-kernel-owner@vger.kernel.org To: Linus Torvalds , Linux Kernel Mailing List , Virtualization Mailing List , Xen-devel , Andrew Morton , Zachary Amsden , Dan Hecht , Dan Arai , Anne Holler , Pratap Subrahmanyam , Christopher Li , Joshua LeVasseur , Chris Wright , Rik Van Riel , Jyothy Reddy , Jack Lo , Kip Macy , Jan Beulich , Ky Srinivasan , Wim Coekaerts , Leendert van Doorn Zachary Amsden List-Id: xen-devel@lists.xenproject.org Add a sub-arch specifier to the module identification string to avoid cross loading modules from different subarch compiles. XXX FIXME. Module loading is broken in paravirtualized VMI kernels, since there is no annotation fixup applied to modules. Signed-off-by: Zachary Amsden Index: linux-2.6.16-rc3/include/asm-i386/module.h =================================================================== --- linux-2.6.16-rc3.orig/include/asm-i386/module.h 2006-02-24 16:00:21.000000000 -0800 +++ linux-2.6.16-rc3/include/asm-i386/module.h 2006-02-24 16:02:02.000000000 -0800 @@ -1,6 +1,8 @@ #ifndef _ASM_I386_MODULE_H #define _ASM_I386_MODULE_H +#include + /* x86 is simple */ struct mod_arch_specific { @@ -72,6 +74,7 @@ struct mod_arch_specific #define MODULE_STACKSIZE "" #endif -#define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_REGPARM MODULE_STACKSIZE +#define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_REGPARM MODULE_STACKSIZE \ + MODULE_SUBARCH_VERMAGIC #endif /* _ASM_I386_MODULE_H */ Index: linux-2.6.16-rc3/include/asm-i386/mach-vmi/mach_module.h =================================================================== --- linux-2.6.16-rc3.orig/include/asm-i386/mach-vmi/mach_module.h 2006-02-24 16:02:02.000000000 -0800 +++ linux-2.6.16-rc3/include/asm-i386/mach-vmi/mach_module.h 2006-02-24 16:02:02.000000000 -0800 @@ -0,0 +1,6 @@ +#ifndef _ASM_I386_ARCH_MODULE_H +#define _ASM_I386_ARCH_MODULE_H + +#define MODULE_SUBARCH_VERMAGIC "VMI " + +#endif /* _ASM_I386_ARCH_MODULE_H */ Index: linux-2.6.16-rc3/include/asm-i386/mach-default/mach_module.h =================================================================== --- linux-2.6.16-rc3.orig/include/asm-i386/mach-default/mach_module.h 2006-02-24 16:02:02.000000000 -0800 +++ linux-2.6.16-rc3/include/asm-i386/mach-default/mach_module.h 2006-02-24 16:02:02.000000000 -0800 @@ -0,0 +1,6 @@ +#ifndef _ASM_I386_ARCH_MODULE_H +#define _ASM_I386_ARCH_MODULE_H + +#define MODULE_SUBARCH_VERMAGIC + +#endif /* _ASM_I386_ARCH_MODULE_H */