Skip to content
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

tdx-attester: make DCAP libs optional #572

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

mythi
Copy link
Contributor

@mythi mythi commented Jun 4, 2024

Still WIP/RFC.

In #434 I had proposed to make use of tdx-attest-rs behind a new feature but dropped the idea since the initdata work moved to use it too and that is a valid case event with upstream kernels.

However, @fidencio mentioned a use case that building kbs-client without having to install libtdx-attest* (because of added complexity and the fact that the libs are not yet avail on all OS'es, e.g, 24.04) but still get the basic get_evidence() working can be useful. So I restored my original code and added here for feedback on how it's best handled.

mythi added 4 commits June 4, 2024 14:33
'all-attesters' is a default feature for the crate so it
does not have to be set as a dependency to bin. In fact, it can
be useful to be able to select a subset of the attesters, e.g.,

cargo build --no-default-features --features bin,tdx-attester --bin evidence_getter --release

Moreover, with --no-default-features, 'codicon' becomes missing so
set it as a mandatory dependency instead.

Signed-off-by: Mikko Ylinen <[email protected]>
The attester crate pulls in DCAP 1.20 which only supports
/dev/tdx_guest ioctls so the two other (legacy) character devices
can be dropped.

However, this triggers another issue: we can have /dev/tdx_guest
ioctls (e.g., the RTMR extend) that are not part of Linux upstream
so the recently added runtime_measurement_extend_available() won't
work anymore. This change tries to mitigate that (for the time being)
by making the simplification that "if TSM reports, no RTMRs".

Signed-off-by: Mikko Ylinen <[email protected]>
It can be useful, e.g., when testing RCAR protocol with kbs-client,
to be able to just have get_evidence() from the TDX attester without
the need to have libtdx-attest/*-dev available.

Signed-off-by: Mikko Ylinen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant