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/
Home Products Support Community News


Re: [Xen-devel] Re: [PATCH] [vTPM] Not building vTPM frontend as module

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH] [vTPM] Not building vTPM frontend as module
From: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Date: Wed, 10 May 2006 16:02:06 +0100
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefan Berger <stefanb@xxxxxxxxxx>
Delivery-date: Wed, 10 May 2006 08:02:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <95377b78a7bc3ca192d2e130212915fb@xxxxxxxxxxxx>
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>
References: <1147194526.421.4.camel@xxxxxxxxxxxxxxxxxxxxx> <95377b78a7bc3ca192d2e130212915fb@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, 2006-05-10 at 15:55 +0100, Keir Fraser wrote:
> Even if it is unsafe to unload the module, there is still enormous 
> benefit in allowing to build as a module as it allows the user to 
> choose whether or not to load it in the first place!
> I suggest you add __unsafe(THIS_MODULE) to the end of your module_init 
> function, as we have done for netback and blkback. This will make it 
> impossible for the user to unload the module, and print a message to 
> the kernel log explaining why.

If a module_init() is present but a module_exit() is not then you cannot
unload the module.

(unless you enable CONFIG_MODULE_FORCE_UNLOAD and use rmmod's --force
option, in which case your kernel become tainted)


Xen-devel mailing list