qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 1/3] tpm_tis: fix loop that cancels any seizure by a lower locality
@ 2019-02-11 15:03 Liam Merwick
  2019-02-11 15:03 ` [Qemu-devel] [PATCH v2 2/3] tpm_tis: assert valid addr passed to tpm_tis_locality_from_addr() Liam Merwick
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Liam Merwick @ 2019-02-11 15:03 UTC (permalink / raw)
  To: stefanb, qemu-devel

In tpm_tis_mmio_write() if the requesting locality is seizing
access, any seizure by a lower locality is cancelled.  However the
loop doing the seizure had an off-by-one error and the locality
immediately preceding the requesting locality was not being cleared.
This is fixed by adjusting the test in the for loop to check the
localities up to the requesting locality.

Signed-off-by: Liam Merwick <Liam.Merwick@oracle.com>
---
 hw/tpm/tpm_tis.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index fd6bb9b59a96..61a130beef35 100644
--- a/hw/tpm/tpm_tis.c
+++ b/hw/tpm/tpm_tis.c
@@ -624,7 +624,7 @@ static void tpm_tis_mmio_write(void *opaque, hwaddr addr,
                 }
 
                 /* cancel any seize by a lower locality */
-                for (l = 0; l < locty - 1; l++) {
+                for (l = 0; l < locty; l++) {
                     s->loc[l].access &= ~TPM_TIS_ACCESS_SEIZE;
                 }
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-02-12 17:29 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-11 15:03 [Qemu-devel] [PATCH v2 1/3] tpm_tis: fix loop that cancels any seizure by a lower locality Liam Merwick
2019-02-11 15:03 ` [Qemu-devel] [PATCH v2 2/3] tpm_tis: assert valid addr passed to tpm_tis_locality_from_addr() Liam Merwick
2019-02-12 17:29   ` Stefan Berger
2019-02-11 15:03 ` [Qemu-devel] [PATCH v2 3/3] tpm_tis: fix format string specifier in tpm_tis_show_buffer() Liam Merwick
2019-02-11 16:02   ` Philippe Mathieu-Daudé
2019-02-11 19:56     ` Stefan Berger
2019-02-11 20:09       ` Liam Merwick
2019-02-11 21:13         ` Stefan Berger
2019-02-12 12:31           ` Philippe Mathieu-Daudé
2019-02-12 13:27             ` Stefan Berger
2019-02-12 13:43               ` Liam Merwick
2019-02-12 14:32                 ` Philippe Mathieu-Daudé
2019-02-12 12:02   ` Stefan Berger
2019-02-11 20:53 ` [Qemu-devel] [PATCH v2 1/3] tpm_tis: fix loop that cancels any seizure by a lower locality Stefan Berger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).