Re: [PATCH v4 2/2] test: tpm: check malformed capability and OIAP responses are rejected

Ilias Apalodimas <[email protected]>
Newsgroups gmane.comp.boot-loaders.u-boot
Message-ID <CAC_iWjLmnQoaNVqpUd2UsbDSkXh3AUKn5PCT8dT4hPCy6V5RAQ@mail.gmail.com>
This generally looks ok

> diff --git a/include/tpm-v2.h b/include/tpm-v2.h
> index 4f5082f2234..648dfa2aec8 100644
> --- a/include/tpm-v2.h
> +++ b/include/tpm-v2.h
> @@ -43,6 +43,16 @@ struct udevice;
>  #define TPM2_CAP_PCRS 0x00000005U
>  #define TPM2_CAP_TPM_PROPERTIES 0x00000006U
>
> +/*
> + * Sandbox emulator test hooks: a TPM2_GetCapability for these properties makes
> + * the emulated TPM reply with, respectively, a header-only response and one
> + * advertising more property data than a single-property request can hold. They
> + * let tests drive the response parser with a reply shorter or longer than the
> + * data it should carry, as a tampered or faulty TPM on the bus could.
> + */
> +#define TPM2_PT_SANDBOX_SHORT_RESPONSE 0x00ffffff
> +#define TPM2_PT_SANDBOX_LONG_RESPONSE  0x00fffffe

Move these to some sandbox TPM related header only.
This file is trying to define the common parts across TPMs

[...]


With the change above

Acked-by: Ilias Apalodimas <[email protected]>

Thanks
/Ilias
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.