diff mbox series

[v6,4/8] tpm: Update struct tpm_buf documentation comments

Message ID 20231124020237.27116-5-jarkko@kernel.org (mailing list archive)
State New
Headers show
Series Extend struct tpm_buf to support sized buffers (TPM2B) | expand

Commit Message

Jarkko Sakkinen Nov. 24, 2023, 2:02 a.m. UTC
Remove deprecated portions and document enum values.

Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
---
v1 [2023-11-21]: A new patch.
v2 [2023-11-24]: Refined the commit message a bit.
---
 include/linux/tpm.h | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Comments

Stefan Berger Nov. 27, 2023, 8:41 p.m. UTC | #1
On 11/23/23 21:02, Jarkko Sakkinen wrote:
> Remove deprecated portions and document enum values.
> 
> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
> ---
> v1 [2023-11-21]: A new patch.
> v2 [2023-11-24]: Refined the commit message a bit.
> ---
>   include/linux/tpm.h | 9 ++++-----
>   1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/include/linux/tpm.h b/include/linux/tpm.h
> index bb0e8718a432..0a8c1351adc2 100644
> --- a/include/linux/tpm.h
> +++ b/include/linux/tpm.h
> @@ -297,15 +297,14 @@ struct tpm_header {
>   	};
>   } __packed;
>   
> -/* A string buffer type for constructing TPM commands. This is based on the
> - * ideas of string buffer code in security/keys/trusted.h but is heap based
> - * in order to keep the stack usage minimal.
> - */
> -
>   enum tpm_buf_flags {
> +	/* the capacity exceeded: */

was exceeded

>   	TPM_BUF_OVERFLOW	= BIT(0),
>   };
>   
> +/*
> + * A string buffer type for constructing TPM commands.
> + */
>   struct tpm_buf {
>   	unsigned int flags;
>   	u8 *data;

Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Jarkko Sakkinen Dec. 4, 2023, 2:40 a.m. UTC | #2
On Mon Nov 27, 2023 at 10:41 PM EET, Stefan Berger wrote:
>
>
> On 11/23/23 21:02, Jarkko Sakkinen wrote:
> > Remove deprecated portions and document enum values.
> > 
> > Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
> > ---
> > v1 [2023-11-21]: A new patch.
> > v2 [2023-11-24]: Refined the commit message a bit.
> > ---
> >   include/linux/tpm.h | 9 ++++-----
> >   1 file changed, 4 insertions(+), 5 deletions(-)
> > 
> > diff --git a/include/linux/tpm.h b/include/linux/tpm.h
> > index bb0e8718a432..0a8c1351adc2 100644
> > --- a/include/linux/tpm.h
> > +++ b/include/linux/tpm.h
> > @@ -297,15 +297,14 @@ struct tpm_header {
> >   	};
> >   } __packed;
> >   
> > -/* A string buffer type for constructing TPM commands. This is based on the
> > - * ideas of string buffer code in security/keys/trusted.h but is heap based
> > - * in order to keep the stack usage minimal.
> > - */
> > -
> >   enum tpm_buf_flags {
> > +	/* the capacity exceeded: */
>
> was exceeded

+1, agreed a better form :-)

>
> >   	TPM_BUF_OVERFLOW	= BIT(0),
> >   };
> >   
> > +/*
> > + * A string buffer type for constructing TPM commands.
> > + */
> >   struct tpm_buf {
> >   	unsigned int flags;
> >   	u8 *data;
>
> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>

If possible give this to the James' patch set, thank you for the review.

BR, Jarkko
diff mbox series

Patch

diff --git a/include/linux/tpm.h b/include/linux/tpm.h
index bb0e8718a432..0a8c1351adc2 100644
--- a/include/linux/tpm.h
+++ b/include/linux/tpm.h
@@ -297,15 +297,14 @@  struct tpm_header {
 	};
 } __packed;
 
-/* A string buffer type for constructing TPM commands. This is based on the
- * ideas of string buffer code in security/keys/trusted.h but is heap based
- * in order to keep the stack usage minimal.
- */
-
 enum tpm_buf_flags {
+	/* the capacity exceeded: */
 	TPM_BUF_OVERFLOW	= BIT(0),
 };
 
+/*
+ * A string buffer type for constructing TPM commands.
+ */
 struct tpm_buf {
 	unsigned int flags;
 	u8 *data;