xaptum / tpm-proxy Goto Github PK
View Code? Open in Web Editor NEWKernel driver and USB gadget to expose a router card TPM on the host
License: GNU General Public License v2.0
Kernel driver and USB gadget to expose a router card TPM on the host
License: GNU General Public License v2.0
The 8B01
USB product id is reserved for the XAP-RC-001 router card. Let's use pid 7B01
for a TPM proxy device.
See our Master USB Product IDs sheet for details.
7B01
7B01
.Each TPM request or response (i.e., read or write from the device file) can be up to 4096 bytes long (in the Linux implementation). Currently the proxy artificially restricts this to 512 bytes (dev->bulk_in_size
). We should lift this restriction.
USBG_READ_MAX
in gadget/tpm-proxy.h
to 4096.min(dev->bulk_in_size, count)
with just count
in in host/tpmproxy-core.c
.Why is the initial 512 limit there?
A USB bulk transfer consists of a sequence of packets. For USB 2.0, each packet is limited to 512 bytes. It's likely that this was assumed to be the limit for a transfer as well.
However, a transfer can be much larger (up to 2 GiB at least on 64-bit Linux). The Linux kernel bulk interfaces (host and gadget) operate on transfers, not packets, so the 512 byte packet limit is not relevant.
Further reading: https://stackoverflow.com/a/48982843
Currently the TPM device is exposed on the host as a device file named /dev/rc_tpmX
, where X is some integer.
Since we're calling this functionality "proxy TPM", I think the files should be named /dev/tpmpX
. This fits with the in-kernel convention for resource-managed TPMs, which are exposed as /dev/tpmrmX
.
rc_tpm
to tpmp
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.