Skip to content
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

Fs update #5

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open

Fs update #5

wants to merge 5 commits into from

Conversation

mmisono
Copy link
Member

@mmisono mmisono commented Jan 11, 2025

  • Support dir_open / dir_read
  • Support trusted files
  • read file with a bigger buffer
  • cache file contents in memory

This add support of trusted files for svsm. The PAL calculates the hash
values of trusted files when loading and checks if it mathes the value
in the manifest. We can get the sha256 hash value with `sha256sum`
command.

The code (tf_file.c and tf_file.h) is adopted from the gramine-tdx. As
the comment in the original file says, most of the code is the same as
the trusted file handling of linux-sgx' pal and we should unify them.

Example of manifest:
```
[fs]
root.type = "tmpfs"
mounts = [
  { type = "pseudo", path = "/lib", uri = "lib" },
  { path = "/external", uri = "file:/root/module/libwallet/external" },
]

[svsm]
file_check_policy = "strict"
allowed_files = [
  "file:/root/module/libwallet/external/lib",
]
trusted_files = [
  { uri="file:/root/module/libwallet/external/helloworld", sha256="9e7f594364c7d8b3bff5cc4984c7192fce14aa676a9ce145fe3553119b557258"},
  { uri="file:/root/module/libwallet/external/test.txt", sha256="5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03"},
]
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant