qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] tpm: Set the flags of the CMD_INIT command to 0
@ 2018-01-22 21:33 Stefan Berger
  2018-01-22 22:50 ` Marc-André Lureau
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Berger @ 2018-01-22 21:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: stefanb, marcandre.lureau

The flags of the CMD_INIT control channel command were not
initialized properly. Fix this and set to 0.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
---
 hw/tpm/tpm_emulator.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/tpm/tpm_emulator.c b/hw/tpm/tpm_emulator.c
index 35c78de..532d3e3 100644
--- a/hw/tpm/tpm_emulator.c
+++ b/hw/tpm/tpm_emulator.c
@@ -320,7 +320,9 @@ static int tpm_emulator_set_buffer_size(TPMBackend *tb,
 static int tpm_emulator_startup_tpm(TPMBackend *tb, size_t buffersize)
 {
     TPMEmulator *tpm_emu = TPM_EMULATOR(tb);
-    ptm_init init;
+    ptm_init init = {
+        .u.req.init_flags = 0,
+    };
     ptm_res res;
 
     if (buffersize != 0 &&
-- 
2.5.5

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

* Re: [Qemu-devel] [PATCH] tpm: Set the flags of the CMD_INIT command to 0
  2018-01-22 21:33 [Qemu-devel] [PATCH] tpm: Set the flags of the CMD_INIT command to 0 Stefan Berger
@ 2018-01-22 22:50 ` Marc-André Lureau
  0 siblings, 0 replies; 2+ messages in thread
From: Marc-André Lureau @ 2018-01-22 22:50 UTC (permalink / raw)
  To: Stefan Berger; +Cc: QEMU

On Mon, Jan 22, 2018 at 10:33 PM, Stefan Berger
<stefanb@linux.vnet.ibm.com> wrote:
> The flags of the CMD_INIT control channel command were not
> initialized properly. Fix this and set to 0.
>
> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>


> ---
>  hw/tpm/tpm_emulator.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/hw/tpm/tpm_emulator.c b/hw/tpm/tpm_emulator.c
> index 35c78de..532d3e3 100644
> --- a/hw/tpm/tpm_emulator.c
> +++ b/hw/tpm/tpm_emulator.c
> @@ -320,7 +320,9 @@ static int tpm_emulator_set_buffer_size(TPMBackend *tb,
>  static int tpm_emulator_startup_tpm(TPMBackend *tb, size_t buffersize)
>  {
>      TPMEmulator *tpm_emu = TPM_EMULATOR(tb);
> -    ptm_init init;
> +    ptm_init init = {
> +        .u.req.init_flags = 0,
> +    };
>      ptm_res res;
>
>      if (buffersize != 0 &&
> --
> 2.5.5
>
>



-- 
Marc-André Lureau

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

end of thread, other threads:[~2018-01-22 22:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-22 21:33 [Qemu-devel] [PATCH] tpm: Set the flags of the CMD_INIT command to 0 Stefan Berger
2018-01-22 22:50 ` Marc-André Lureau

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).