Page MenuHomeFreeBSD

bhyve: add execution command for tpm devices
ClosedPublic

Authored by corvink on Jun 7 2023, 12:07 PM.
Tags
None
Referenced Files
F164445552: D40460.id122927.diff
Sat, Aug 1, 2:09 AM
F164400472: D40460.diff
Fri, Jul 31, 1:55 PM
Unknown Object (File)
Wed, Jul 29, 10:18 AM
Unknown Object (File)
Fri, Jul 24, 10:08 PM
Unknown Object (File)
Wed, Jul 22, 11:10 PM
Unknown Object (File)
Tue, Jul 21, 2:16 AM
Unknown Object (File)
Jun 25 2026, 1:05 PM
Unknown Object (File)
May 19 2026, 1:20 PM
Subscribers

Details

Summary

Executing a tpm command is as easy as writing the command to the tpm fd and reading back the result.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 52259
Build 49150: arc lint + arc unit

Event Timeline

usr.sbin/bhyve/tpm_emul_passthru.c
71

Should you check rsp_size >= sizeof(struct tpm_resp_hdr) before doing anything?

74

rsp_size is unsigned, the last format should be %u. I'm surprised the compiler doesn't warn about it.

markj added inline comments.
usr.sbin/bhyve/tpm_emul_passthru.c
71
78
This revision is now accepted and ready to land.Jun 23 2023, 2:58 PM