[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-3.1-testing] xen vtpm: Initialize the comms ring with zeroes.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1199964483 0
# Node ID 0f30524c7408eb05446943279db61052695b1766
# Parent  023e7a1d43fafc8d2c1bcef814892e2b6941ccea
xen vtpm: Initialize the comms ring with zeroes.

Initialize the ring with zeroes on the backend side and on the
frontend set the 'unused' member to zeroes.

Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>
linux-2.6.18-xen changeset:   374:fedc10fba9f1d5ec0c72dbcbca87e508222b4c48
linux-2.6.18-xen date:        Tue Jan 08 09:55:29 2008 +0000
---
 linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c      |    1 +
 linux-2.6-xen-sparse/drivers/xen/tpmback/interface.c |    1 +
 2 files changed, 2 insertions(+)

diff -r 023e7a1d43fa -r 0f30524c7408 
linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c
--- a/linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c   Fri Dec 28 16:00:43 
2007 +0000
+++ b/linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c   Thu Jan 10 11:28:03 
2008 +0000
@@ -618,6 +618,7 @@ static int tpm_xmit(struct tpm_private *
                tx = &tp->tx->ring[i].req;
                tx->addr = virt_to_machine(txb->data);
                tx->size = txb->len;
+               tx->unused = 0;
 
                DPRINTK("First 4 characters sent by TPM-FE are "
                        "0x%02x 0x%02x 0x%02x 0x%02x\n",
diff -r 023e7a1d43fa -r 0f30524c7408 
linux-2.6-xen-sparse/drivers/xen/tpmback/interface.c
--- a/linux-2.6-xen-sparse/drivers/xen/tpmback/interface.c      Fri Dec 28 
16:00:43 2007 +0000
+++ b/linux-2.6-xen-sparse/drivers/xen/tpmback/interface.c      Thu Jan 10 
11:28:03 2008 +0000
@@ -126,6 +126,7 @@ int tpmif_map(tpmif_t *tpmif, unsigned l
        }
 
        tpmif->tx = (tpmif_tx_interface_t *)tpmif->tx_area->addr;
+       memset(tpmif->tx, 0, PAGE_SIZE);
 
        err = bind_interdomain_evtchn_to_irqhandler(
                tpmif->domid, evtchn, tpmif_be_int, 0, tpmif->devname, tpmif);

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.