From: Jarkko Sakkinen <jarkko@kernel.org>
To: Daniel Almeida <daniel.almeida@collabora.com>
Cc: rust-for-linux@vger.kernel.org, linux-integrity@vger.kernel.org
Subject: Re: Using Rust on non-Rust side of kernel
Date: Sun, 24 Aug 2025 02:41:02 +0300 [thread overview]
Message-ID: <aKpRjgkhz5C9YM-o@kernel.org> (raw)
In-Reply-To: <BE42A51A-60C4-4E79-8459-CADEAB8DC3BA@collabora.com>
On Sat, Aug 23, 2025 at 11:38:00AM -0300, Daniel Almeida wrote:
> My somewhat limited understanding here is that you’re trying to implement Rust
> code that can be called from the rest of the kernel, but that otherwise doesn’t
> depend on it?
OK so please fill me up with rest of the email I'll respond to this
uncluttered part.
First of all, it's fully TCG spec complete in-stack implementation
with no dependencies, does not use allocator, no_std all implementation,
which can run even on bare metal and could empower chips. tpm2_protocol
generates bidirectional parsers and builders to both directions.
It purposely does not share anything with the environment.
The gist here is that given the implementations of properties this could
be used as shared entity between kernel and TPM-RS project, which would
give a single shared project, which would be anyhow "same same" if they
had separate implementations.
Not being dependent on kernel code would make it also applicable to
early boot code because you can put it anywhere, or link against
anything. E.g., perhaps Trechnboot could be one of such use case
because for that we need to find model where protocol is needed
without having TPM driver in the first place.
For TPM driver itself it would increase stability because the crate
gives guarantees on structural integrity vs looking at just "max
length".
>
>
> If so, I did try something similar [0]. Perhaps this is useful to you and is
> somewhat applicable to your use case as well?
Thanks! I will look into this :-) I'm not like pushing anything
this just early querying what are options for the future. I.e is
Rust code enforced live its own cage or are there options for
doing "hybrid solutions". I'm only starting to learn of the
possible integration options. I.e. not even debating of anything,
only learning.
>
> [0]: https://lwn.net/Articles/970565/
>
>
BR, Jarkko
next prev parent reply other threads:[~2025-08-23 23:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-23 12:12 Using Rust on non-Rust side of kernel Jarkko Sakkinen
2025-08-23 12:22 ` Jarkko Sakkinen
[not found] ` <BE42A51A-60C4-4E79-8459-CADEAB8DC3BA@collabora.com>
2025-08-23 23:06 ` Jarkko Sakkinen
2025-08-23 23:12 ` Jarkko Sakkinen
2025-08-24 1:12 ` Daniel Almeida
2025-08-24 7:15 ` Jarkko Sakkinen
2025-08-24 9:21 ` Jarkko Sakkinen
2025-08-23 23:41 ` Jarkko Sakkinen [this message]
2025-08-23 23:50 ` Jarkko Sakkinen
2025-08-25 12:04 ` Jonathan McDowell
2025-08-25 19:30 ` Jarkko Sakkinen
2025-08-25 19:42 ` Jarkko Sakkinen
2025-08-25 22:29 ` Jarkko Sakkinen
2025-08-25 23:23 ` Jarkko Sakkinen
2025-08-26 8:35 ` Jonathan McDowell
2025-08-26 8:56 ` Jarkko Sakkinen
2025-08-26 9:13 ` Jarkko Sakkinen
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=aKpRjgkhz5C9YM-o@kernel.org \
--to=jarkko@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=linux-integrity@vger.kernel.org \
--cc=rust-for-linux@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.