gvisor/pkg/sentry
Nicolas Lacasse e8a4f2e133 runsc: Change cache policy for root fs and volume mounts.
Previously, gofer filesystems were configured with the default "fscache"
policy, which caches filesystem metadata and contents aggressively.  While this
setting is best for performance, it means that changes from inside the sandbox
may not be immediately propagated outside the sandbox, and vice-versa.

This CL changes volumes and the root fs configuration to use a new
"remote-revalidate" cache policy which tries to retain as much caching as
possible while still making fs changes visible across the sandbox boundary.

This cache policy is enabled by default for the root filesystem. The default
value for the "--file-access" flag is still "proxy", but the behavior is
changed to use the new cache policy.

A new value for the "--file-access" flag is added, called "proxy-exclusive",
which turns on the previous aggressive caching behavior. As the name implies,
this flag should be used when the sandbox has "exclusive" access to the
filesystem.

All volume mounts are configured to use the new cache policy, since it is
safest and most likely to be correct. There is not currently a way to change
this behavior, but it's possible to add such a mechanism in the future. The
configurability is a smaller issue for volumes, since most of the expensive
application fs operations (walking + stating files) will likely served by the
root fs.

PiperOrigin-RevId: 208735037
Change-Id: Ife048fab1948205f6665df8563434dbc6ca8cfc9
2018-08-14 16:25:58 -07:00
..
arch Automated rollback of changelist 207037226 2018-08-02 10:42:48 -07:00
context Automated rollback of changelist 207037226 2018-08-02 10:42:48 -07:00
control stateify: support explicit annotation mode; convert refs and stack packages. 2018-07-27 10:17:21 -07:00
device New conditional for adding key/value pairs to maps. 2018-08-01 09:44:57 -07:00
fs runsc: Change cache policy for root fs and volume mounts. 2018-08-14 16:25:58 -07:00
hostcpu stateify: support explicit annotation mode; convert refs and stack packages. 2018-07-27 10:17:21 -07:00
inet Basic support for ip link/addr and ifconfig 2018-08-08 22:39:58 -07:00
kernel Fix missing O_LARGEFILE from O_CREAT files 2018-08-09 16:50:37 -07:00
limits Automated rollback of changelist 207037226 2018-08-02 10:42:48 -07:00
loader Automated rollback of changelist 207037226 2018-08-02 10:42:48 -07:00
memmap Automated rollback of changelist 207037226 2018-08-02 10:42:48 -07:00
memutil stateify: support explicit annotation mode; convert refs and stack packages. 2018-07-27 10:17:21 -07:00
mm Automated rollback of changelist 207037226 2018-08-02 10:42:48 -07:00
platform Protect PCIDs with a mutex. 2018-08-08 21:29:19 -07:00
safemem stateify: support explicit annotation mode; convert refs and stack packages. 2018-07-27 10:17:21 -07:00
sighandling stateify: support explicit annotation mode; convert refs and stack packages. 2018-07-27 10:17:21 -07:00
socket Enforce Unix socket address length limit 2018-08-14 15:07:05 -07:00
state stateify: support explicit annotation mode; convert refs and stack packages. 2018-07-27 10:17:21 -07:00
strace stateify: support explicit annotation mode; convert refs and stack packages. 2018-07-27 10:17:21 -07:00
syscalls Automated rollback of changelist 208284483 2018-08-14 11:50:49 -07:00
time stateify: support explicit annotation mode; convert refs and stack packages. 2018-07-27 10:17:21 -07:00
uniqueid stateify: support explicit annotation mode; convert refs and stack packages. 2018-07-27 10:17:21 -07:00
usage Automated rollback of changelist 207037226 2018-08-02 10:42:48 -07:00
usermem Automated rollback of changelist 207037226 2018-08-02 10:42:48 -07:00
watchdog stateify: support explicit annotation mode; convert refs and stack packages. 2018-07-27 10:17:21 -07:00
BUILD Check in gVisor. 2018-04-28 01:44:26 -04:00