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, Sep 29, 10:32 PM
Unknown Object (File)
Wed, Sep 24, 7:14 PM
Unknown Object (File)
Tue, Sep 23, 11:12 PM
Unknown Object (File)
Mon, Sep 22, 2:32 PM
Unknown Object (File)
Mon, Sep 22, 12:15 PM
Unknown Object (File)
Mon, Sep 22, 12:06 PM
Unknown Object (File)
Mon, Sep 22, 9:57 AM
Unknown Object (File)
Mon, Sep 22, 6:06 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 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