-
Notifications
You must be signed in to change notification settings - Fork 100
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
attester: tdx: make libtdx-attest optional #905
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cc1dbf7
to
1795fe9
Compare
TDX Guest driver support is problematic: configfs-tsm currently does not allow to request bare TD reports. It's always a signed TD quote that needs exits to QGS for signing. However, for the initdata checks, we only need the TD report. Linux still supports the /dev/tdx_guest ioctl() for getting the report. Since the early days, we have used libtdx-attest wrappers for the ioctls(). However, getting the C libraries and headers installed in various places has turned out to be problematic. Furthermore, it isn't even necessary for uses cases like kbs-client (where only the configfs-tsm GetQuote is needed). Move the get_report() method to use raw ioctls() using iocuddle. This follows the sev crate implementation and which turns out to be very simple to adopt here too. Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
For the use-cases needed by CoCo and supported by upstream Linux, we don't need libtdx-attest so make the dependency a build-time opt-in feature. Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
1795fe9
to
0355d67
Compare
0355d67
to
5f016fd
Compare
mkulke
approved these changes
Feb 14, 2025
fitzthum
approved these changes
Feb 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but one nit about the name of the feature
5f016fd
to
1132136
Compare
For configurations where the out-of-tree RTMR extend ioctl() is available and/or the libtdx-attest supported way to get the TD quote is needed, add a customized tdx-attester feature that provides this. This new feature is disabled by default. Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
1132136
to
598a305
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TDX Guest driver support is problematic: configfs-tsm currently
does not allow to request bare TD reports. It's always a signed
TD quote that needs exits to QGS for signing. However, for the
initdata checks, we only need the TD report.
Linux still supports the /dev/tdx_guest ioctl() for getting the
report. Since the early days, we have used libtdx-attest wrappers
for the ioctls(). However, getting the C libraries and headers
installed in various places has turned out to be problematic.
Furthermore, it isn't even necessary for uses cases like
kbs-client (where only the configfs-tsm GetQuote is needed).