nanovms / nanos

A kernel designed to run one and only one application in a virtualized environment
https://nanos.org
Apache License 2.0
2.58k stars 133 forks source link

memfd_create(): add support for file sealing #2027

Closed francescolavra closed 3 months ago

francescolavra commented 3 months ago

This change set enhances the tmpfs implementation so that it supports file sealing, and modifies memfd_create() so that it acts upon the MFD_ALLOW_SEALING flag when configuring the initial set of seals for the underlying tmpfs file. The fcntl() syscall now accepts 2 additional commands, needed for file sealing operations: F_ADD_SEALS and F_GET_SEALS. The fcntl runtime test has been amended to exercise this new feature.