From: Stefan Berger Subject: [PATCH][vTPM] prevent module removal Date: Wed, 10 May 2006 16:32:55 -0400 Message-ID: <1147293175.6599.3.camel@941e-2.watson.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-ZR3JDANoQzDGrahM9W4I" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org --=-ZR3JDANoQzDGrahM9W4I Content-Type: text/plain Content-Transfer-Encoding: 7bit This patch fixes the building of the Xen TPM driver as module and prevents front- and backends to be rmmod'ed by removing their module_exit line. Signed-off-by: Stefan Berger --=-ZR3JDANoQzDGrahM9W4I Content-Disposition: attachment; filename=tpm_module2.diff Content-Type: text/x-patch; name=tpm_module2.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit Index: root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/char/tpm/Kconfig =================================================================== --- root.orig/xen-unstable.hg/linux-2.6-xen-sparse/drivers/char/tpm/Kconfig +++ root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/char/tpm/Kconfig @@ -53,10 +53,9 @@ config TCG_XEN tristate "XEN TPM Interface" depends on TCG_TPM && XEN ---help--- - If you want to make TPM support available to a Xen - user domain, say Yes and it will - be accessible from within Linux. To compile this driver - as a module, choose M here; the module will be called - tpm_xen. + If you want to make TPM support available to a Xen user domain, + say Yes and it will be accessible from within Linux. + To compile this driver as a module, choose M here; the module + will be called tpm_xenu. endmenu Index: root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/char/tpm/Makefile =================================================================== --- root.orig/xen-unstable.hg/linux-2.6-xen-sparse/drivers/char/tpm/Makefile +++ root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/char/tpm/Makefile @@ -8,4 +8,5 @@ endif obj-$(CONFIG_TCG_NSC) += tpm_nsc.o obj-$(CONFIG_TCG_ATMEL) += tpm_atmel.o obj-$(CONFIG_TCG_INFINEON) += tpm_infineon.o -obj-$(CONFIG_TCG_XEN) += tpm_xen.o tpm_vtpm.o +obj-$(CONFIG_TCG_XEN) += tpm_xenu.o +tpm_xenu-y = tpm_xen.o tpm_vtpm.o Index: root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c =================================================================== --- root.orig/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c +++ root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c @@ -1071,8 +1071,6 @@ static void __exit tpmback_exit(void) misc_deregister(&vtpms_miscdevice); } -module_exit(tpmback_exit); - MODULE_LICENSE("Dual BSD/GPL"); /* Index: root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c =================================================================== --- root.orig/xen-unstable.hg/linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c +++ root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c @@ -752,7 +752,6 @@ static void __exit tpmif_exit(void) } module_init(tpmif_init); -module_exit(tpmif_exit); MODULE_LICENSE("Dual BSD/GPL"); --=-ZR3JDANoQzDGrahM9W4I Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-ZR3JDANoQzDGrahM9W4I--