[PATCH 0/3] Address !chip->auth

Jarkko Sakkinen posted 3 patches 1 year, 7 months ago
There is a newer version of this series
drivers/char/tpm/Makefile        |   2 +-
drivers/char/tpm/tpm2-sessions.c | 400 +++++++++++++++++--------------
include/linux/tpm.h              |  75 ++----
3 files changed, 245 insertions(+), 232 deletions(-)
[PATCH 0/3] Address !chip->auth
Posted by Jarkko Sakkinen 1 year, 7 months ago
Tested on x86-64 with:

- TCG_TPM2_HMAC disabled.
- TCG_TPM2_HMAC enabled.
- TCG_TPM2_HMAC enabled, and "/* rc = tpm2_sessions_init(chip); */".

Jarkko Sakkinen (3):
  tpm: Address !chip->auth in tpm2_*_auth_session()
  tpm: Address !chip->auth in tpm_buf_append_name()
  tpm: Address !chip->auth in tpm_buf_append_hmac_session*()

 drivers/char/tpm/Makefile        |   2 +-
 drivers/char/tpm/tpm2-sessions.c | 400 +++++++++++++++++--------------
 include/linux/tpm.h              |  75 ++----
 3 files changed, 245 insertions(+), 232 deletions(-)

-- 
2.45.2
Re: [PATCH 0/3] Address !chip->auth
Posted by Jarkko Sakkinen 1 year, 7 months ago
On Wed Jul 3, 2024 at 8:08 PM EEST, Jarkko Sakkinen wrote:
> Tested on x86-64 with:
>
> - TCG_TPM2_HMAC disabled.
> - TCG_TPM2_HMAC enabled.
> - TCG_TPM2_HMAC enabled, and "/* rc = tpm2_sessions_init(chip); */".
>
> Jarkko Sakkinen (3):
>   tpm: Address !chip->auth in tpm2_*_auth_session()
>   tpm: Address !chip->auth in tpm_buf_append_name()
>   tpm: Address !chip->auth in tpm_buf_append_hmac_session*()
>
>  drivers/char/tpm/Makefile        |   2 +-
>  drivers/char/tpm/tpm2-sessions.c | 400 +++++++++++++++++--------------
>  include/linux/tpm.h              |  75 ++----
>  3 files changed, 245 insertions(+), 232 deletions(-)

Aiming these still to 6.10 so that there would not be known regressions
in hmac authenticated sessions. Note that issue is wider than "just"
tpm_ibmvtpm.

BR, Jarkko
Re: [PATCH 0/3] Address !chip->auth
Posted by Michael Ellerman 1 year, 7 months ago
"Jarkko Sakkinen" <jarkko@kernel.org> writes:
> On Wed Jul 3, 2024 at 8:08 PM EEST, Jarkko Sakkinen wrote:
>> Tested on x86-64 with:
>>
>> - TCG_TPM2_HMAC disabled.
>> - TCG_TPM2_HMAC enabled.
>> - TCG_TPM2_HMAC enabled, and "/* rc = tpm2_sessions_init(chip); */".
>>
>> Jarkko Sakkinen (3):
>>   tpm: Address !chip->auth in tpm2_*_auth_session()
>>   tpm: Address !chip->auth in tpm_buf_append_name()
>>   tpm: Address !chip->auth in tpm_buf_append_hmac_session*()
>>
>>  drivers/char/tpm/Makefile        |   2 +-
>>  drivers/char/tpm/tpm2-sessions.c | 400 +++++++++++++++++--------------
>>  include/linux/tpm.h              |  75 ++----
>>  3 files changed, 245 insertions(+), 232 deletions(-)
>
> Aiming these still to 6.10 so that there would not be known regressions
> in hmac authenticated sessions. Note that issue is wider than "just"
> tpm_ibmvtpm.

This seems OK on my PowerVM box using tpm_ibmvtpm and TCG_TPM2_HMAC=y.
I do see one new message:

  [    2.475208] tpm2_start_auth_session: encryption is not active

But no error messages like on mainline.

Tested-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)

cheers
Re: [PATCH 0/3] Address !chip->auth
Posted by Jarkko Sakkinen 1 year, 7 months ago
On Thu Jul 4, 2024 at 4:03 PM EEST, Michael Ellerman wrote:
> "Jarkko Sakkinen" <jarkko@kernel.org> writes:
> > On Wed Jul 3, 2024 at 8:08 PM EEST, Jarkko Sakkinen wrote:
> >> Tested on x86-64 with:
> >>
> >> - TCG_TPM2_HMAC disabled.
> >> - TCG_TPM2_HMAC enabled.
> >> - TCG_TPM2_HMAC enabled, and "/* rc = tpm2_sessions_init(chip); */".
> >>
> >> Jarkko Sakkinen (3):
> >>   tpm: Address !chip->auth in tpm2_*_auth_session()
> >>   tpm: Address !chip->auth in tpm_buf_append_name()
> >>   tpm: Address !chip->auth in tpm_buf_append_hmac_session*()
> >>
> >>  drivers/char/tpm/Makefile        |   2 +-
> >>  drivers/char/tpm/tpm2-sessions.c | 400 +++++++++++++++++--------------
> >>  include/linux/tpm.h              |  75 ++----
> >>  3 files changed, 245 insertions(+), 232 deletions(-)
> >
> > Aiming these still to 6.10 so that there would not be known regressions
> > in hmac authenticated sessions. Note that issue is wider than "just"
> > tpm_ibmvtpm.
>
> This seems OK on my PowerVM box using tpm_ibmvtpm and TCG_TPM2_HMAC=y.
> I do see one new message:
>
>   [    2.475208] tpm2_start_auth_session: encryption is not active
>
> But no error messages like on mainline.
>
> Tested-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)

Thank you, appreciate this!

BR, Jarkko