Page MenuHomeFreeBSD

Fix bug in TPM 2.0 TIS driver.
ClosedPublic

Authored by darrick.freebsd_gmail.com on Jan 8 2020, 2:37 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 19, 6:02 PM
Unknown Object (File)
Mon, Apr 1, 4:25 AM
Unknown Object (File)
Fri, Mar 29, 9:12 AM
Unknown Object (File)
Mon, Mar 25, 3:34 PM
Unknown Object (File)
Mar 20 2024, 6:16 AM
Unknown Object (File)
Mar 19 2024, 3:19 PM
Unknown Object (File)
Mar 19 2024, 3:04 PM
Unknown Object (File)
Dec 20 2023, 3:32 AM
Subscribers

Details

Summary

tpmtis_go_ready() reads the value of the TPM_STS register and ORs TPM_STS_CMD_READY to the existing value and writes it back to the register. However, the TPM Profile (PTP) specification states that only one bit in the write request value may be set to 1, or else the entire write request is ignored.

Also removed call which clears the TPM_STS_CMD_READY flag in the same call. It was being ignored for the same reasons.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 28532
Build 26585: arc lint + arc unit

Event Timeline

(I suspect all of these AND4/OR4 constructs are dubious and should be removed in favor of explicit AND/ORing as necessary, but that's a larger cleanup than fixing the bug.)

This revision is now accepted and ready to land.Jan 8 2020, 2:55 AM
This revision was automatically updated to reflect the committed changes.