-
Notifications
You must be signed in to change notification settings - Fork 177
vcomLink communication refactoring #4502
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
Conversation
ba73204 to
3597b93
Compare
3597b93 to
ed98a85
Compare
21fb09d to
10803cd
Compare
|
Code ready for review, I'm fixing the CI errors and updating the documents. |
db381cd to
251b958
Compare
6f1b902 to
30fbca9
Compare
|
I recall using code from this PR once... I had to modify it slightly to make it suitable... But I have no memory of the details... Will have to review again... |
|
@shjala could you, please, meanwhile, check the Docker hash warning?... |
Sure, I have some more changes coming today, I'll fix that docker too. |
Yeah that probably was for sending monitoring data. |
30fbca9 to
e1be23b
Compare
|
@shjala, I think it's better to rebase the branch |
022b171 to
e8e5aa9
Compare
|
There are failures in TestEdenScripts/eden_vcom, and also SPDX license headers to address. |
eriknordmark
left a comment
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.
There are failures in TestEdenScripts/eden_vcom, and also SPDX license headers to address.
e8e5aa9 to
0d744cb
Compare
@eriknordmark the test failure is expected, I can disable that test for now in Eden until this gets merged lf-edge/eden#1095, but @OhmSpectator is in favour of not doing that and letting the test to fail. |
eriknordmark
left a comment
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.
Note one more SPDX failure:
Checking tests/tpm/prep-and-run.sh
- SPDX-License-Identifier: OK
- Copyright: does not have the current year 2025 in the copyright notice!
Letting the test fail until Eden is fixed should be ok, but presumably we need a new version of eden so we can run the older one on 14.5.0?
0d744cb to
83912e2
Compare
But the older branches point to the old Eden right? so we need one for the master... |
83912e2 to
8ca6886
Compare
|
Yetus is picking up on unrelated files, my local run shows nothing : shah in 🌐 shah-MS-7E12 in eve on vcomlink.refactor [$?] via 🐍 v3.12.3 took 5s
❯ make mini-yetus MYETUS_VERBOSE=y
shah in 🌐 shah-MS-7E12 in eve on vcomlink.refactor [$?] via 🐍 v3.12.3 took 8s
❯ cat /tmp/yetus.WZ5B3epSZ1/yetus-output/results-full.txt
shah in 🌐 shah-MS-7E12 in eve on vcomlink.refactor [$?] via 🐍 v3.12.3
❯ |
I did see a comment in the output that the pr is not on top of current master so it might pick up other files. |
VSOCKListener implements the net.Conn and net.Listener interfaces for vsock. Signed-off-by: Shahriyar Jalayeri <[email protected]>
Add vcom link API protobufs definition and generated code for Go and Python. Signed-off-by: Shahriyar Jalayeri <[email protected]>
New TPM communication APIs have been changed to use protbuf and the vcomlink package has been refactored to accommodate these changes. Signed-off-by: Shahriyar Jalayeri <[email protected]>
Updated the vcomlink.md documentation to reflect recent changes in the TPM service protobuf API. Signed-off-by: Shahriyar Jalayeri <[email protected]>
Make sure read syscall does not return n < 0 which then panics the bufio. Signed-off-by: Shahriyar Jalayeri <[email protected]>
Add a script to prepare and run SWTPM to test vcomlink locally. Signed-off-by: Shahriyar Jalayeri <[email protected]>
8ca6886 to
ed75b9a
Compare
rebased, let's see if Yetus is happy now... |
Disable vComLink test temporarily until we have an EVE release that includes the changes introduced in lf-edge/eve#4502. Signed-off-by: Shahriyar Jalayeri <[email protected]>
Disable vComLink test temporarily until we have an EVE release that includes the changes introduced in lf-edge/eve#4502. Signed-off-by: Shahriyar Jalayeri <[email protected]>
Description
New TPM communication APIs have been changed to use protobuf and the vcomlink package has been refactored to accommodate these changes. The existing custom message handling/protocol has been removed, and its functionalities have been integrated into the mentioned protobuf based API. This restructuring aims to streamline TPM-related operations and improve code maintainability.
New functions have been introduced to handle various TPM tasks more effectively. These include:
In addition this update introduces stricter security measures, such as enforcing security policies before performing TPM operations (for now a simple but sufficient policy, based on the key/NV index).
Relates to lf-edge/eve-tools#13 (not dependent).
How to test and validate this PR
Go tests are provided to fully test the vcomlink TPM related functionalities, the following are results of testing on HW TPM:
Changelog notes
Refactored vcomlink TPM communication to use protobuf-based APIs with updated vcomlink support, replacing custom messaging, adding tpmReadNV, tpmGetPub, and tpmSign functions, and introducing basic security policy enforcement.
Checklist
For backport PRs (remove it if it's not a backport):
And the last but not least:
check them.
Please, check the boxes above after submitting the PR in interactive mode.