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)
Fri, Apr 25, 11:52 AM
Unknown Object (File)
Sat, Apr 19, 11:29 PM
Unknown Object (File)
Mon, Apr 14, 11:51 AM
Unknown Object (File)
Mon, Apr 14, 4:13 AM
Unknown Object (File)
Sun, Apr 13, 10:57 PM
Unknown Object (File)
Sun, Apr 13, 10:56 PM
Unknown Object (File)
Sun, Apr 13, 10:53 PM
Unknown Object (File)
Mar 10 2025, 11:52 AM
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 Not Applicable
Unit
Tests Not Applicable

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