gvisor/pkg/sentry
Jamie Liu 128948d6ae Implement basic umounting for vfs2.
This is required to test filesystems with a non-trivial implementation of
FilesystemImpl.Release(). Propagation isn't handled yet, and umount isn't yet
plumbed out to VirtualFilesystem.UmountAt(), but otherwise the implementation
of umount is believed to be correct.

- Move entering mountTable.seq writer critical sections to callers of
  mountTable.{insert,remove}Seqed. This is required since umount(2) must ensure
  that no new references are taken on the candidate mount after checking that
  it isn't busy, which is only possible by entering a vfs.mountTable.seq writer
  critical section before the check and remaining in it until after
  VFS.umountRecursiveLocked() is complete. (Linux does the same thing:
  fs/namespace.c:do_umount() => lock_mount_hash(),
  fs/pnode.c:propagate_mount_busy(), umount_tree(), unlock_mount_hash().)

- It's not possible for dentry deletion to umount while only holding
  VFS.mountMu for reading, but it's also very unappealing to hold VFS.mountMu
  exclusively around e.g. gofer unlink RPCs. Introduce dentry.mu to avoid these
  problems. This means that VFS.mountMu is never acquired for reading, so
  change it to a sync.Mutex.

PiperOrigin-RevId: 282444343
2019-11-25 15:21:49 -08:00
..
arch Reorder BUILD license and load functions in gvisor. 2019-10-16 16:40:30 -07:00
context Add context to state. 2019-10-31 18:03:24 -07:00
control Remove go_test from go_stateify and go_marshal 2019-09-12 15:10:17 -07:00
device Reorder BUILD license and load functions in gvisor. 2019-10-16 16:40:30 -07:00
fs Merge pull request #1176 from xiaobo55x:runsc_boot 2019-11-25 11:01:22 -08:00
fsimpl Implement basic umounting for vfs2. 2019-11-25 15:21:49 -08:00
hostcpu Enable pkg/sentry/hostcpu support on arm64. 2019-09-18 23:51:42 +00:00
hostmm Update canonical repository. 2019-06-13 16:50:15 -07:00
inet Add endpoint tracking to the stack. 2019-10-29 16:14:51 -07:00
kernel Import and structure cleanup. 2019-11-21 11:41:30 -08:00
limits Reorder BUILD license and load functions in gvisor. 2019-10-16 16:40:30 -07:00
loader Fix some build errors on arm64. 2019-11-13 06:46:02 +00:00
memmap Reorder BUILD license and load functions in gvisor. 2019-10-16 16:40:30 -07:00
mm Import and structure cleanup. 2019-11-21 11:41:30 -08:00
pgalloc Add context to state. 2019-10-31 18:03:24 -07:00
platform enable ring0/pagetables to support arm64 2019-11-22 12:05:35 -08:00
safemem Remove go_test from go_stateify and go_marshal 2019-09-12 15:10:17 -07:00
sighandling Update FIXME bug with GitHub issue. 2019-09-30 17:24:29 -07:00
socket Add support for TIME_WAIT timeout. 2019-11-07 09:46:55 -08:00
state netstack: Don't start endpoint goroutines too soon on restore. 2019-08-08 12:33:11 -07:00
strace Import and structure cleanup. 2019-11-21 11:41:30 -08:00
syscalls Pass OpenTruncate to gofer in Open call when opening file with O_TRUNC. 2019-11-20 15:07:16 -08:00
time Import and structure cleanup. 2019-11-21 11:41:30 -08:00
unimpl internal BUILD file cleanup. 2019-09-23 08:25:13 -07:00
uniqueid Update canonical repository. 2019-06-13 16:50:15 -07:00
usage Reorder BUILD license and load functions in gvisor. 2019-10-16 16:40:30 -07:00
usermem Avoid unnecessary slice allocation in usermem.BytesIO.blocksFromAddrRanges(). 2019-11-14 14:04:58 -08:00
vfs Implement basic umounting for vfs2. 2019-11-25 15:21:49 -08:00
watchdog Allow the watchdog to detect when the sandbox is stuck during setup. 2019-11-01 11:49:31 -07:00
BUILD Internal change. 2019-11-25 11:20:30 -08:00