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

[LibOS] Update mmapped regions when writing to encrypted files #1523

Merged

Commits on Nov 23, 2023

  1. [LibOS] Update mmaped regions when writing to files

    Previously, Gramine didn't propagate changes to a mmaped file back to
    memory. This is unexpected for apps that use both mmap and read/write on
    the same file (e.g., etcd-io/bbolt has such implementation to write data
    via `write()` and read it via the mmaped memory).
    
    This commit introduces the reloading of affected mmaped regions on
    `chroot_encrypted`, `chroot` and `tmpfs` file writes. To reduce
    performance penalty in normal cases (where apps use either `write()` or
    `mmap()`), this commit also creates a new field in the inode to record
    the number of mmaped regions of this file. We hence simply check on this
    field to determine whether to perform the reloading to make the overhead
    negligible if none mmaped.
    
    Signed-off-by: Kailun Qin <kailun.qin@intel.com>
    kailun-qin committed Nov 23, 2023
    Configuration menu
    Copy the full SHA
    1ea3e60 View commit details
    Browse the repository at this point in the history