From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Alexey Kardashevskiy <aik@amd.com>,
Cedric Xing <cedric.xing@intel.com>,
Dan Williams <dan.j.williams@intel.com>,
Samuel Ortiz <sameo@rivosinc.com>, Lukas Wunner <lukas@wunner.de>,
Dionna Amalie Glaze <dionnaglaze@google.com>,
Qinkun Bao <qinkun@google.com>,
Mikko Ylinen <mikko.ylinen@linux.intel.com>,
Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, linux-coco@lists.linux.dev
Subject: Re: [PATCH RFC v2 2/2] tsm: Add TVM Measurement Sample Code
Date: Mon, 04 Nov 2024 09:29:32 -0500 [thread overview]
Message-ID: <83c50ab23fbe0727edb489b3d59264896331ce40.camel@HansenPartnership.com> (raw)
In-Reply-To: <5ef943d9-1ce6-4b20-8c6c-7cba4f1b3ea9@amd.com>
On Mon, 2024-11-04 at 19:40 +1100, Alexey Kardashevskiy wrote:
> On 1/11/24 03:50, Cedric Xing wrote:
> > This sample kernel module demonstrates how to make MRs accessible
> > to user mode through TSM.
> >
> > Once loaded, this module registers a virtual measurement provider
> > with the TSM core and will result in the directory tree below.
> >
> > /sys/kernel/tsm/
> > └── measurement-example
> > ├── config_mr
> > │ ├── digest
> > │ └── hash_algo
>
> Do we actually need this many nodes? A digest is 64bytes long (or 128
> chars), hash_algo is lot less, "config_mr" could just print
> human-readable 2 lines (one with the algo, one with the digest), just
> like many other things in sysfs.
Actually, that's not supposed to be like anything in sysfs. Attributes
are supposed to have one value per file:
https://docs.kernel.org/filesystems/sysfs.html#attributes
However, as I keep saying, this structure doesn't support systems, like
the TPM, which can have multiple hashes per measurement register, so I
still think the structure should be
<measurement type>/<pcr number>/<hash>/digest
to allow for that. I even think even Intel will be forced to use agile
cryptography one day: even if Shor's algorithm isn't realised post
quantum, the hash and curve will have to expand to at least 512 bits
and there's bound to be several candidates plus backwards compatibility
problems.
[...]
> It looks that /sys/kernel/tsm/full_report is a binary concatenation
> of 6 digests, with no hash_algo and no hint which digest is which,
> hardly a "structure". I do understand it is an example though :)
That doesn't sound right: the rtmrs can be extended post launch, so
this should be some type of log of all the post launch measurements to
allow the relying system to examine the events as well as the final
value.
James
next prev parent reply other threads:[~2024-11-04 14:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-31 16:50 [PATCH RFC v2 0/2] tsm: Unified Measurement Register ABI for TVMs Cedric Xing
2024-10-31 16:50 ` [PATCH RFC v2 1/2] tsm: Add TVM Measurement Register Support Cedric Xing
2024-11-04 3:51 ` Alexey Kardashevskiy
2024-11-04 22:14 ` Xing, Cedric
2024-11-04 22:22 ` James Bottomley
2024-11-04 23:37 ` Xing, Cedric
2024-11-05 1:20 ` Alexey Kardashevskiy
2024-10-31 16:50 ` [PATCH RFC v2 2/2] tsm: Add TVM Measurement Sample Code Cedric Xing
2024-11-04 8:40 ` Alexey Kardashevskiy
2024-11-04 14:29 ` James Bottomley [this message]
2024-11-12 14:08 ` [PATCH RFC v2 0/2] tsm: Unified Measurement Register ABI for TVMs Mikko Ylinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83c50ab23fbe0727edb489b3d59264896331ce40.camel@HansenPartnership.com \
--to=james.bottomley@hansenpartnership.com \
--cc=aik@amd.com \
--cc=cedric.xing@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dionnaglaze@google.com \
--cc=linux-coco@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=mikko.ylinen@linux.intel.com \
--cc=qinkun@google.com \
--cc=sameo@rivosinc.com \
--cc=sathyanarayanan.kuppuswamy@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox