WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] linux: prevent non-Xen modules from loading in X

To: Jan Beulich <jbeulich@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] linux: prevent non-Xen modules from loading in Xen kernel
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Fri, 18 Jan 2008 15:35:37 +0000
Cc: Zachary Amsden <zach@xxxxxxxxxx>
Delivery-date: Fri, 18 Jan 2008 07:36:08 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4790CB11.76E4.0078.0@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AchZ58W+BE+9ksXbEdyBqQAX8io7RQ==
Thread-topic: [Xen-devel] [PATCH] linux: prevent non-Xen modules from loading in Xen kernel
User-agent: Microsoft-Entourage/11.3.6.070618
Does the XEN_INTERFACE_VERSION add anything? It has not much to do with the
module<->Linux-core interface. Seems a pretty random thing to stuff into the
module magic version string.

 -- Keir

On 18/1/08 14:51, "Jan Beulich" <jbeulich@xxxxxxxxxx> wrote:

> .. and vice versa.
> 
> Inspired by Zach Amsden's functionally similar VMI patch.
> 
> As usual, written and tested on 2.6.24-rc7 and made apply to the 2.6.18
> tree without further testing.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
> 
> Index: head-2008-01-08/drivers/xen/Kconfig
> ===================================================================
> --- head-2008-01-08.orig/drivers/xen/Kconfig 2008-01-08 12:26:03.000000000
> +0100
> +++ head-2008-01-08/drivers/xen/Kconfig 2008-01-08 14:56:58.000000000 +0100
> @@ -13,7 +13,7 @@ config XEN
>  if XEN
>  config XEN_INTERFACE_VERSION
> hex
> - default 0x00030207
> + default 0x30207
>  
>  menu "XEN"
>  
> Index: head-2008-01-08/include/linux/vermagic.h
> ===================================================================
> --- head-2008-01-08.orig/include/linux/vermagic.h 2006-11-29
> 22:57:37.000000000 +0100
> +++ head-2008-01-08/include/linux/vermagic.h 2008-01-08 15:01:52.000000000
> +0100
> @@ -17,6 +17,11 @@
>  #else
>  #define MODULE_VERMAGIC_MODULE_UNLOAD ""
>  #endif
> +#ifdef CONFIG_XEN
> +#define MODULE_VERMAGIC_XEN "Xen:" __stringify(CONFIG_XEN_INTERFACE_VERSION)
> " "
> +#else
> +#define MODULE_VERMAGIC_XEN
> +#endif
>  #ifndef MODULE_ARCH_VERMAGIC
>  #define MODULE_ARCH_VERMAGIC ""
>  #endif
> @@ -24,5 +29,6 @@
>  #define VERMAGIC_STRING       \
> UTS_RELEASE " "       \
> MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT    \
> - MODULE_VERMAGIC_MODULE_UNLOAD MODULE_ARCH_VERMAGIC   \
> + MODULE_VERMAGIC_MODULE_UNLOAD MODULE_VERMAGIC_XEN  \
> + MODULE_ARCH_VERMAGIC      \
> "gcc-" __stringify(__GNUC__) "." __stringify(__GNUC_MINOR__)
> 
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel