This is useful to be able to refer to them from external packages, such as
to represent the `ioctl(2)` syscall profile that the Sentry has with the
KVM platform.
PiperOrigin-RevId: 566705114
This saves on allocations.
This change is a subset of the changes in cl/563529897 and cl/563752003.
Committing this change in more discrete parts will help narrow down the
causes of b/299603749.
PiperOrigin-RevId: 565484026
Syzkaller is reporting crashes relating to changes made by these commits.
Rolling back for now. Should be rolled forward with fix.
Reported-by: [email protected]
PiperOrigin-RevId: 564000728
When copying a mount tree, new child mounts are added to a mount's
pending list. Each of these mounts has its pending mountpoint already set
with setKey. Eventually this method will be used to enable recursive binds.
PiperOrigin-RevId: 563236298
The ring data structure's requires it's own implementation of Entry. With
the new version you can more easily be part of multiple rings at once. Also,
a user who wants to use ilist probably doesn't need ring as well, so it makes
sense to separate the two.
PiperOrigin-RevId: 563151782
While there is a difference between flavors of this ioctl (`TCSETS`,
`TCSETSF`, `TCSETSW`), in practice it seems not to matter. We should let
users call `TCSETSF` and can implement those differences if necessary.
This issue was reported by Syzkaller. The stacktrace shows
forgetDeadMountpoint(..., skipDecRef=true) being called. But unlockMounts()
is still shown DecRef()-ing the objects. PopDelayedDecRefs() should be clearing
vfs.toDecRef.
Also make gofer.dentry.evictLocked() DecRef the returned objects. It was
ignoring the return value earlier.
Reported-by: [email protected]
PiperOrigin-RevId: 560164788
For example, docker specifies a directory descriptor via /proc/self/fd:
mount(/sys/fs/cgroup/...", "/proc/self/fd/6", MS_BIND, 0x502f, <null>)
PiperOrigin-RevId: 557312955
This refactor changes the "shared list" from being a list pointer that's
shared among all the peers, to a circularly linked list that links all the
mounts together. This is generally safer (no shared pointer) and easier
to understand and work with. It's also closer to how linux implements this
feature.
The propagationType is also removed in favor of just using the propagation
flags from linux. This makes more sense as mounts can have two types at once
(shared+slave).
PiperOrigin-RevId: 556906544
- Adds methods to Enter, Leave and Migrate the tasks for memory controller.
- Update the memory cgroup id when the task enters and leaves the cgroups.
PiperOrigin-RevId: 555568875
DynamicBytesFD is used for cgroup and proc files. In Linux, these file systems
don't set splice_write callbacks.
Reported-by: [email protected]
PiperOrigin-RevId: 553818208
task.netns is always changed from a task goroutine under task.mu.
It means that we can access it without any locks from a task goroutine
we don't need to increment a reference counter in such cases.
In all other cases, we need to take task.mu.
PiperOrigin-RevId: 552913323
This change implements only the basic functions of mount namespaces.
All features that depends on user namespaces will be implemented separately.
PiperOrigin-RevId: 552673896
Failing to resolve a mount promise is never expected behavior. The
sandbox should crash in this case, since something has gone
fatally wrong.
PiperOrigin-RevId: 552652799