-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Resource Manager (/dev/tpmrrm0
) rather then /dev/tpm0
#222
Comments
/dev/tpm0
/dev/tpmrrm0
) rather then /dev/tpm0
Yes, ultimately we should use the resource manager backed device, although I'd rather not during early boot because it's not really necessary there. There are some additional challenges / risks here:
So whilst we should move towards using it, it's not quite as simple as changing the device path to /dev/tpmrm0. (On a related note, go-tpm2 has a proper API for iterating / accessing TPM devices now that doesn't rely on specifying the device path - https://pkg.go.dev/github.com/canonical/[email protected]/linux#DefaultTPM2Device. And there's an accessor for the resource manager backed device as well - https://pkg.go.dev/github.com/canonical/[email protected]/linux#TPMDeviceRaw.ResourceManagedDevice) |
This may finally get worked on since #357 has landed, which provides a nice internal API for doing what we want. I suspect what we'll want is to hide the internals of this a bit such that:
@pedronis does this seem like a reasonable approach? When doing the switch to the resource managed device, we'll need to audit the code in the |
yes, it seems reasonable. One question
what's the idea to achieve this? just that the unlocking code is separate enough to know where to use Direct? or something else? |
Hi,
The snapd reports the following error message when an application snap tries to open up the
/dev/tpm0
.stateengine.go:149: state ensure error: devicemgr: cannot connect to TPM: no TPM2 device is available
Any application snap could block the use of
/dev/tpm0
and therefore, we might consider using the resource manager (/dev/tpmrmx
) rather than using the/dev/tpm0
as described here => https://github.com/snapcore/secboot/blob/master/internal/tcti/tcti.go#L29In addition to that, potentially, we might want to change the snapd's tpm interface to block access to
/dev/tpmx
directly. => https://github.com/snapcore/snapd/blob/master/interfaces/builtin/tpm.go#L36What do you think?
Thanks,
Bugra
The text was updated successfully, but these errors were encountered: