Re: [PATCH] tpm: remove file header documentation from tpm2-sessions.c

From: Jarkko Sakkinen
Date: Sun Sep 15 2024 - 08:47:28 EST


On Sun Sep 15, 2024 at 3:33 PM EEST, Jarkko Sakkinen wrote:
> The documentation in the file header is duplicate documentation, which
> is already addressed elsewhere (tpm-security.rs and function associated
> documentations). In addition remove the invalid newline character after
> the SPDX tag.
>
> Signed-off-by: Jarkko Sakkinen <jarkko@xxxxxxxxxx>
> ---
> It is good time to remove this finally before doing anything else.
> Unless someone commits to maintain this part of the file, I will just
> take it away because I have neither intention nor motivation to maintain
> it. Came right on front when I started to look into kernel command-line
> and optimizations for session life-time so thus the patch. I'll include
> this later on to a larger patch set.

Moving forward to actual fixes is to fixup tpm_chip_boostrap() as
follows:

1. Saving the handle and not saving the context in the null key
creation. I.e. rip of create_primary_null() or whatever the
function was called.
2. Use that handle to go through selftest.
3. Save the context in the end of the bootstrap.

That cuts out unnecessary overhead of saving and loading context
between null key creation and selftest. I'll do this fix and see
how much it affects the boot time.

BR, Jarkko