Page MenuHomeFreeBSD

bhyve: add execution command for tpm devices
ClosedPublic

Authored by corvink on Jun 7 2023, 12:07 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Aug 4, 1:12 AM
Unknown Object (File)
Tue, Jul 29, 3:58 AM
Unknown Object (File)
Mon, Jul 28, 6:41 AM
Unknown Object (File)
Thu, Jul 24, 12:23 PM
Unknown Object (File)
Jul 2 2025, 6:22 PM
Unknown Object (File)
Jun 30 2025, 2:09 AM
Unknown Object (File)
Jun 28 2025, 4:27 AM
Unknown Object (File)
Jun 25 2025, 11:12 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