27. February #1772
dimakuv
started this conversation in
Meeting notes
27. February
#1772
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Agenda
(please write your proposed agenda items in comments under this discussion)
Dmitrii/Kailun: discuss design and implementation steps for [LibOS,Pal,common,tools] Improved protected files performance #1681
Dmitrii: Gramine-TDX presentation, plus deep dive into the GitHub repo: https://github.com/gramineproject/gramine-tdx
Misc: introductions
Yao (@yao-ji) is from the Intel SGX validation team. Submitted PR [LibOS,Pal,common,tools] Improved protected files performance #1681; similar to Intel SGX SDK's Protected FS.
Bobby (@BobbyAtFortanix) works for Fortanix. Had a fork of Graphene from 2016. Now are merging their patches back to Gramine.
Marcelina (@mwkmwkmwk) works for ITL, a new developer / reviewer for Gramine.
Design and implementation steps for 1681
mwk: we still need read/write callbacks where we'll encapsulate the SGX-specific copies.
mwk: mmaped-backed untrusted-memory file logic will become more complex than Trusted Files, because Protected/Encrypted Files are not read-only but read-write and truncation.
mwk: how does file extension during
ftruncate()
work?offset
).ocall_mmap_untrusted()
andocall_munmap_untrusted()
, but mwk thinks we also needocall_mremap_untrusted()
for performance reasons.mremap()
must be called + host syscallftruncate()
must also be called; so the ocall should actually do two things.Dmitrii: Common Protected Files code must have the temporary buffer to encrypt/decrypt, and this temporary buffer is given to the
cb_read()
/cb_write()
(ending up inPalStreamRead()
/PalStreamWrite()
).mwk: because we'll have memory-mapped files, we will need host-level
msync()
. The app wants tofsync()
, this ends up infile_flush()
, so we needmsync()
on the untrusted memory region.Dmitrii: now we change the "traditional File I/O" backend for Encrypted Files with the "Memory I/O" backend, with a completely different set of syscalls: memory loads instead of
read()
, memory stores instead ofwrite()
,mremap()
instead offtruncate()
,msync()
instead offsync()
.Yao: needs to understand msync vs fsync more now.
Kailun: this improvement got very big, and we may not have this improvement in time for the next release.
Yao: for decryption (from untrusted memory to trusted memory), can we skip the temporary buffer? The rationale: the input is definitely not changed, so the attacker cannot steal any intermediate info.
Beta Was this translation helpful? Give feedback.
All reactions