Conversation

kernel: tpm tpm0: tpm2_load_context: failed with a TPM error 0x0161

@jarkko Any idea what I'm looking at in v6.16 please? This is Lenovo T460s, and I don't remember seeing such an error in v6.15.

This also makes TPM-related systemd services fail during boot time: https://paste.voidband.net/wucdUTXK.log

1
0
0
@oleksandr It's interesting because I don't recognize by eye 0x161 as TPM error code (I have to check this tho formally). I will take a look at it later this week, just my initial guess.

RT @jejb
1
0
0

@jarkko This puzzles me somewhat because 0x0161 is TPM2_CC_CONTEXT_LOAD, which is not an error code. Might be a co-incidence though.

@jejb

1
0
0
@oleksandr @jejb lol that is true :-) good catch (i was intuitively thinking that it is leaking length from some return value).
1
0
0

@jarkko @oleksandr sorry, wrong jejb. However, it looks to me like tpm_transmit() returned success but the driver didn't replace the command with the response, so you get the command code back as the response code. That probably indicates a bug in the driver ... which tpm2 driver are you using?

2
0
0

@jejb How do I check which tpm2 driver is in use? lsmod | grep tpm doesn't show any. Also, the error seems to be spurious, on next reboot everything was OK.

@jarkko

1
0
0

@oleksandr @jarkko

ls -l /sys/class/tpm/tpm0/device/driver

1
0
0

@jejb

lrwxrwxrwx 1 root root 0 Aug  6 16:43 /sys/class/tpm/tpm0/device/driver -> ../../../../bus/acpi/drivers/tpm_crb

@jarkko

0
0
0
@jejb @oleksandr it's possible buf since given how tpm_transmit() works i don't think that is like behaviour. it looks more like if tpm_transmit() was not invoked at all.
0
0
0