[Qemu-devel] [PATCH] tpm: Set the flags of the CMD_INIT command to 0

Stefan Berger posted 1 patch 6 years, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1516656818-31834-1-git-send-email-stefanb@linux.vnet.ibm.com
Test checkpatch passed
Test docker-build@min-glib passed
Test docker-mingw@fedora passed
Test docker-quick@centos6 passed
Test ppc passed
Test s390x passed
hw/tpm/tpm_emulator.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
[Qemu-devel] [PATCH] tpm: Set the flags of the CMD_INIT command to 0
Posted by Stefan Berger 6 years, 2 months ago
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


Re: [Qemu-devel] [PATCH] tpm: Set the flags of the CMD_INIT command to 0
Posted by Marc-André Lureau 6 years, 2 months ago
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