-
Notifications
You must be signed in to change notification settings - Fork 352
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
TCTI: Add USB TPM (LetsTrust-TPM2Go) TCTI module #2479
TCTI: Add USB TPM (LetsTrust-TPM2Go) TCTI module #2479
Conversation
4422c73
to
7e8615c
Compare
Apparently, the build is still failing on Fedora-32 and Alpine-3.15. This is weird, because of https://github.com/tpm2-software/tpm2-software-container/blob/f15f2ee3e4d69ac332c8acfaa8867d0546090cda/fedora-32.docker.m4#L62 and https://github.com/tpm2-software/tpm2-software-container/blob/f15f2ee3e4d69ac332c8acfaa8867d0546090cda/alpine-3.15.docker.m4#L55 I thought, the dockers were updated automatically? @williamcroberts Do you have any idea ? |
Their's a rule in the build do only build/and publish for containers detected in the diff, but the diff action seems to have a bug and only compares the top level commit (the build output said this is the valid compare url):
|
@wxleong and @AndreasFuchsTPM I have updated all the containers, what a nightmare. I have no idea why their is a curl error popping up in the build now, here is the PR that fixes that: So @wxleong you can cherry-pick that change into your branch or just rebase once it's merged. |
5ea4383
to
8e0ebd8
Compare
@williamcroberts CI workflow has passed, but CIFuzz and CirrusCI workflows still encountered libusb-1.0 library missing error. |
@wxleong for For CirrusCI add it to this file (Note it's FreeBSD): |
12823a5
to
4337fe1
Compare
Last item to fix: CIFuzz, simple fix but have to sort out the Google Contributor License Agreement before I can do anything. |
Hi WenXin,
Thank you for all this effort!
Happy holidays if you have one 😅
Paul
…-----Original Message-----
From: WenXin ***@***.***>
To: tpm2-software/tpm2-tss ***@***.***>
Cc: Paul Kissinger ***@***.***>, Mention ***@***.***>
Sent: Do., 22 Dez. 2022 10:18
Subject: Re: [tpm2-software/tpm2-tss] TCTI: Add USB TPM (LetsTrust-TPM2Go) TCTI module (PR #2479)
Last item to fix: CIFuzz, simple fix but have to sort out the Google Contributor License Agreement before I can do anything.
--
Reply to this email directly or view it on GitHub:
#2479 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
I can do CI Fuzz |
Thanks, |
4337fe1
to
2bd97b1
Compare
@williamcroberts thanks for the help with oss-fuzz. The conflicts was already resolved prior to this. I just did a dummy force push and all are passing now. |
Awesome! I look forward to giving this a spin after Christmas. |
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.
I think you also want to rebase ontop of current master
64e7628
to
2b7007c
Compare
merged master, 2b7007c |
de82b7d
to
020c7c3
Compare
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.
Please force reset you branch and amend the history, as you make a change related to the PR git commit --amend. If you need to update the branch ontop of master, git pull --rebase origin master is your friend as well.
I was able to build this on ArchLinux, but it fails for me with "Probing TPM failed" because spi_tpm_helper_read_reg(TCTI_SPI_HELPER_TPM_DID_VID_REG) keeps reading 0. Logs with tcti+TRACE are here if you'd like to have a look. @PaulKissinger have there been any changes to the hardware? I have the relatively old stick with serial number 000008 here. |
Hi @tobyp, Thanks for testing! Paul |
I also see an error message in the kernel log for every tss command, like this:
I made a fix commit here, feel free to squash it into your branch if you agree this is a good solution (I'm not really fit with USB, I'm not even sure what "claiming" an interface means, just that the error bothers me :P). |
I'm not fit either, but I don't see anything glairingly wrong... I'll let @wxleong weigh in and we can pick it in. |
@PaulKissinger I hope this is detailed enough, else I'll have to find a better camera than my phone 😅 |
Hi @tobyp, yes, wrong hardware revision. The chip select of the TPM is connected to the GPIO1 of the USB Bridge. I have a new revision on my desk so I'll replace your stick in the next weeks. Context: The patchset from @wxleong uses the burst count register and so wait states are not needed. This behavior reduces the communication between the host and the USB bridge. In the early phases of the hardware, it was not clear if the Chipselect works as expected, or that these sticks need a user-controllable chip select via GPIO. The latest HW revision will have a USB Bridge-controlled chip select. Thank you and best regards, Paul |
f8207a0
to
0aea261
Compare
I'll look into this |
Thanks for the help on squashing the commits. Merge was a mistake, moving forward i'll stick to rebase. |
4dd5e4d
to
9b97f20
Compare
|
8cbd219
to
f5e27f9
Compare
LetsTrust-TPM2Go is a USB 2.0 stick with built-in TPM. The base is taken from https://gist.github.com/tobyp/aed5598188088f4abbeb737b408e5287. Signed-off-by: Peter Huewe <Peter.Huewe@infineon.com> Signed-off-by: wenxin.leong <wenxin.leong@infineon.com> Signed-off-by: William Roberts <william.c.roberts@intel.com>
f5e27f9
to
47b13bb
Compare
Codecov Report
@@ Coverage Diff @@
## master #2479 +/- ##
==========================================
- Coverage 83.70% 83.70% -0.01%
==========================================
Files 362 363 +1
Lines 41537 41564 +27
==========================================
+ Hits 34769 34790 +21
- Misses 6768 6774 +6
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@williamcroberts all requested changes are applied, please review |
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.
I am good with this, I'll let @JuergenReppSIT do a review and merge since I am stepping down as a full time maintainer.
Bringing up a TCTI module to support the LetsTrust-TPM2Go, a USB TPM from @PaulKissinger. It's a combined effort and resources are taken from:
The CI is expected to fail at this stage since the library
libusb-1.0-0-dev
is missing from the CI container image.