Proto commits in google/gvisor

These commits are when the Protocol Buffers files have changed: (only the last 100 relevant commits are shown)

Commit:237e29f
Author:Xin Zhong
Committer:gVisor bot

seccheck: add binary_in_memfd to ExecveInfo PiperOrigin-RevId: 953601428

The documentation is generated from this commit.

Commit:f73db29
Author:Xin Zhong
Committer:gVisor bot

seccheck: support ptrace request extraction via syscall points PiperOrigin-RevId: 953109282

Commit:67dd940
Author:Xin Zhong
Committer:gVisor bot

seccheck: add overlayfs layer information to mmap seccheck points. PiperOrigin-RevId: 953060531

Commit:87c8897
Author:Xin Zhong
Committer:gVisor bot

seccheck: Add trace point for the listen(2) syscall. This change implements the PointListen trace point to capture details of the listen syscall, including the file descriptor, backlog, socket family, socket type, and bound address. It also updates the seccheck metadata for amd64 and arm64, adds the Listen protobuf message, and includes test coverage. PiperOrigin-RevId: 952916092

Commit:9c27149
Author:Xin Zhong
Committer:gVisor bot

seccheck: add binary_in_memfd to ExecveInfo PiperOrigin-RevId: 952308439

Commit:e6f06ef
Author:Xin Zhong
Committer:gVisor bot

seccheck: support ptrace request extraction via syscall points PiperOrigin-RevId: 952361532

Commit:9f2877f
Author:Xin Zhong
Committer:gVisor bot

Add binary size and nlink to exec security check points. PiperOrigin-RevId: 952306838

Commit:440fd2a
Author:Xin Zhong
Committer:gVisor bot

seccheck: Add trace point for the listen(2) syscall. This change implements the PointListen trace point to capture details of the listen syscall, including the file descriptor, backlog, socket family, socket type, and bound address. It also updates the seccheck metadata for amd64 and arm64, adds the Listen protobuf message, and includes test coverage. PiperOrigin-RevId: 951708245

Commit:694dee8
Author:Xin Zhong
Committer:gVisor bot

seccheck: Add an LRU cache for execve binary SHA-256 and SHA-1 hashes. This change introduces an LRU cache (ExecveHashCache) and multi-algorithm calculation engine (file_hash.go) to store and resolve SHA-256 and SHA-1 digests of executables during execve syscalls. PiperOrigin-RevId: 952257971

Commit:949d969
Author:Xin Zhong
Committer:gVisor bot

seccheck: Add execfn to ExecveInfo seccheck point This change adds the execfn field to the ExecveInfo seccheck point. This field preserves the original, unresolved pathname passed to execve(2) (used for AT_EXECFN), distinguishing it from BinaryPath, which contains the fully resolved filesystem path after symlink and interpreter resolution. Tests have been updated to verify the distinction between BinaryPath, Execfn, and Argv[0]. PiperOrigin-RevId: 952211288

Commit:986d752
Author:Xin Zhong
Committer:gVisor bot

seccheck: Add execfn to ExecveInfo seccheck point This change adds the execfn field to the ExecveInfo seccheck point. This field preserves the original, unresolved pathname passed to execve(2) (used for AT_EXECFN), distinguishing it from BinaryPath, which contains the fully resolved filesystem path after symlink and interpreter resolution. Tests have been updated to verify the distinction between BinaryPath, Execfn, and Argv[0]. PiperOrigin-RevId: 951652309

Commit:2e6b816
Author:Xin Zhong
Committer:gVisor bot

seccheck: Add trace point for the listen(2) syscall. This change implements the PointListen trace point to capture details of the listen syscall, including the file descriptor, backlog, socket family, socket type, and bound address. It also updates the seccheck metadata for amd64 and arm64, adds the Listen protobuf message, and includes test coverage. PiperOrigin-RevId: 951708245

Commit:0833ac2
Author:Zach Koopmans
Committer:gVisor bot

Implement custom TaskService (proto and ttrpc server) in task_server. PiperOrigin-RevId: 951698516

Commit:1369bbc
Author:Zach Koopmans
Committer:gVisor bot

Implement custom TaskService (proto and ttrpc server) in task_server. PiperOrigin-RevId: 923049687

Commit:562c835
Author:Xin Zhong
Committer:gVisor bot

seccheck: Trace sibling processes connected via pipes during execve. This change extends the execve trace point to identify and include information about sibling processes connected to the current process's stdin or stdout via a pipe. It exposes the underlying Pipe object from VFSPipe and VFSPipeFD to match pipe endpoints. When a pipe is detected on stdin/stdout, the sentry searches sibling processes to find the other end and populates the new pipe_input_proc and pipe_output_proc fields with the sibling's binary path, argv, and context data. Tests have been updated to verify this behavior. PiperOrigin-RevId: 950963084

Commit:cde30cd
Author:Xin Zhong
Committer:gVisor bot

Add seccheck field to indicate if a file is on an overlayfs lower layer. This change introduces a new field `binary_overlayfs_lower` in the `ExecveBinaryInfo` seccheck point. This field is set to true if the executed binary is found on one of the lower layers of an overlay filesystem. A helper function `overlay.IsOnLower` is added to determine this. The existing `binary_overlayfs_upper` field is also clarified to represent any file on the upper layer. PiperOrigin-RevId: 949711533

Commit:c62c973
Author:Xin Zhong
Committer:gVisor bot

Add seccheck field to indicate if a file is on an overlayfs lower layer. This change introduces a new field `binary_overlayfs_lower` in the `ExecveBinaryInfo` seccheck point. This field is set to true if the executed binary is found on one of the lower layers of an overlay filesystem. A helper function `overlay.IsOnLower` is added to determine this. The existing `binary_overlayfs_upper` field is also clarified to represent any file on the upper layer. PiperOrigin-RevId: 948608788

Commit:cd4bd6b
Author:Xin Zhong
Committer:gVisor bot

Add seccheck support for collecting stdin/stdout/stderr info on execve. This change introduces a new seccheck field, FieldSentryExecveFdInfo, for the Execve trace point. When enabled, this field collects information about file descriptors 0, 1, and 2 (stdin, stdout, stderr) and populates the new stdin, stdout, and stderr fields in the ExecveInfo proto. The collected FdInfo includes the file path, mode, inode, whether it's on an overlayfs upper layer, and socket details (local/remote addresses) if the FD is a socket. PiperOrigin-RevId: 948482163

Commit:6da17a7
Author:Xin Zhong
Committer:gVisor bot

Add executable ctime to ExecveInfo and MmapInfo. This change includes the creation time (ctime) of the executable binary in the seccheck ExecveInfo and MmapInfo. The Timespec proto message is moved to common.proto for reuse. PiperOrigin-RevId: 948385290

Commit:ab53b52
Author:Xin Zhong
Committer:gVisor bot

Add executable ctime to ExecveInfo and MmapInfo. This change includes the creation time (ctime) of the executable binary in the seccheck ExecveInfo and MmapInfo. The Timespec proto message is moved to common.proto for reuse. PiperOrigin-RevId: 947205599

Commit:3cc5535
Author:Xin Zhong
Committer:gVisor bot

seccheck: Add is_exec_session to context This change adds a new field `is_exec_session` to the seccheck Context. This field is set to true if the task originated from an exec session, such as those created by `runsc exec` or `kubectl exec`. PiperOrigin-RevId: 948071517

Commit:c7dad8f
Author:Xin Zhong
Committer:gVisor bot

Add seccheck support for collecting stdin/stdout/stderr info on execve. This change introduces a new seccheck field, FieldSentryExecveFdInfo, for the Execve trace point. When enabled, this field collects information about file descriptors 0, 1, and 2 (stdin, stdout, stderr) and populates the new stdin, stdout, and stderr fields in the ExecveInfo proto. The collected FdInfo includes the file path, mode, inode, whether it's on an overlayfs upper layer, and socket details (local/remote addresses) if the FD is a socket. PiperOrigin-RevId: 947808754

Commit:0e60aab
Author:Xin Zhong
Committer:gVisor bot

Add seccheck point for mmap(2). This change introduces a seccheck point for the mmap syscall on both amd64 and arm64. A new proto message `Mmap` is defined to capture the syscall arguments, including the file descriptor path when requested. The example seccheck server is updated to handle the new message type, and a basic test case is added to the trace tests. PiperOrigin-RevId: 947914706

Commit:98cfd78
Author:Xin Zhong
Committer:gVisor bot

Add seccheck point for mmap(2). This change introduces a seccheck point for the mmap syscall on both amd64 and arm64. A new proto message `Mmap` is defined to capture the syscall arguments, including the file descriptor path when requested. The example seccheck server is updated to handle the new message type, and a basic test case is added to the trace tests. PiperOrigin-RevId: 944817338

Commit:4248363
Author:Xin Zhong
Committer:gVisor bot

seccheck: Add is_exec_session to context This change adds a new field `is_exec_session` to the seccheck Context. This field is set to true if the task originated from an exec session, such as those created by `runsc exec` or `kubectl exec`. PiperOrigin-RevId: 947316637

Commit:a536d0e
Author:Xin Zhong
Committer:gVisor bot

Add executable ctime to ExecveBinaryInfo. This change includes the creation time (ctime) of the executable binary in the seccheck ExecveBinaryInfo and MmapInfo. The Timespec proto message is moved to common.proto for reuse. PiperOrigin-RevId: 947205599

Commit:2bfb74a
Author:gVisor bot
Committer:gVisor bot

Internal change. PiperOrigin-RevId: 944137567

Commit:9e9ef40
Author:Xin Zhong
Committer:gVisor bot

Add executable inode number to seccheck ExecveBinaryInfo. PiperOrigin-RevId: 945774987

Commit:f53f0e7
Author:Xin Zhong
Committer:gVisor bot

Add executable inode number to seccheck ExecveBinaryInfo. PiperOrigin-RevId: 944694866

Commit:f8e72ce
Author:Xin Zhong
Committer:gVisor bot

Add seccheck point for mmap(2). This change introduces a seccheck point for the mmap syscall on both amd64 and arm64. A new proto message `Mmap` is defined to capture the syscall arguments, including the file descriptor path when requested. The example seccheck server is updated to handle the new message type, and a basic test case is added to the trace tests. PiperOrigin-RevId: 944817338

Commit:00ece30
Author:Xin Zhong
Committer:gVisor bot

Add seccheck point for mmap(2). This change introduces a seccheck point for the mmap syscall on both amd64 and arm64. A new proto message `Mmap` is defined to capture the syscall arguments, including the file descriptor path when requested. The example seccheck server is updated to handle the new message type, and a basic test case is added to the trace tests. PiperOrigin-RevId: 944817338

Commit:578e583
Author:Xin Zhong
Committer:gVisor bot

Add executable inode number to seccheck ExecveBinaryInfo. PiperOrigin-RevId: 944694866

Commit:3ca8cd9
Author:Xin Zhong
Committer:gVisor bot

Add seccheck point for mmap. This change introduces a new seccheck point, "sentry/mmap", which is triggered when a memory mapping is created. The seccheck event includes information about the mapped file, such as its path, inode, mode, UID, and GID, as well as a timestamp. It also indicates if the mapping corresponds to the initial executable. This allows for monitoring of potential code injection or execution from unexpected sources. PiperOrigin-RevId: 944614086

Commit:31e3b7e
Author:Xin Zhong
Committer:gVisor bot

Add seccheck field to indicate if executed binary is on overlayfs upper layer. This change introduces a new field `binary_overlayfs_upper` to the `ExecveBinaryInfo` seccheck point. This field is set to true if the executable being run is located on the upper layer of an overlay filesystem. A new helper function `overlay.IsCopiedUp` is added to check this condition. PiperOrigin-RevId: 944568906

Commit:9f22445
Author:Xin Zhong
Committer:gVisor bot

Add seccheck field to indicate if executed binary is on overlayfs upper layer. This change introduces a new field `binary_overlayfs_upper` to the `ExecveBinaryInfo` seccheck point. This field is set to true if the executable being run is located on the upper layer of an overlay filesystem. A new helper function `overlay.IsCopiedUp` is added to check this condition. PiperOrigin-RevId: 913758999

Commit:1df8033
Author:Xin Zhong
Committer:gVisor bot

Add seccheck point for mmap. This change introduces a new seccheck point, "sentry/mmap", which is triggered when a memory mapping is created. The seccheck event includes information about the mapped file, such as its path, inode, mode, UID, and GID, as well as a timestamp. It also indicates if the mapping corresponds to the initial executable. This allows for monitoring of potential code injection or execution from unexpected sources. PiperOrigin-RevId: 915566174

Commit:93e1ea8
Author:Lucas Manning
Committer:gVisor bot

Add checkpoint/restore coordination with libtpu to runsc. PiperOrigin-RevId: 943469548

Commit:8c2db95
Author:Xin Zhong
Committer:gVisor bot

Add seccheck field to indicate if executed binary is on overlayfs upper layer. This change introduces a new field `binary_overlayfs_upper` to the `ExecveBinaryInfo` seccheck point. This field is set to true if the executable being run is located on the upper layer of an overlay filesystem. A new helper function `overlay.IsCopiedUp` is added to check this condition. PiperOrigin-RevId: 913758999

Commit:6b5bf02
Author:Xin Zhong
Committer:gVisor bot

Add seccheck point for mmap. This change introduces a new seccheck point, "sentry/mmap", which is triggered when a memory mapping is created. The seccheck event includes information about the mapped file, such as its path, inode, mode, UID, and GID, as well as a timestamp. It also indicates if the mapping corresponds to the initial executable. This allows for monitoring of potential code injection or execution from unexpected sources. PiperOrigin-RevId: 915566174

Commit:66017de
Author:Xin Zhong
Committer:gVisor bot

Add seccheck field to indicate if executed binary is on overlayfs upper layer. This change introduces a new field `binary_overlayfs_upper` to the `ExecveBinaryInfo` seccheck point. This field is set to true if the executable being run is located on the upper layer of an overlay filesystem. A new helper function `overlay.IsCopiedUp` is added to check this condition. PiperOrigin-RevId: 913758999

Commit:d89c902
Author:Lucas Manning
Committer:gVisor bot

Implement save/restore for TPU/VFIO devices to enable cross device C/R. This change enables save and restore for TPU/VFIO such that they can be saved on one device and restored on another. The change tracks open VFIO/TPU FDs and, during save, captures the PCI Bus:Device:Function (BDF) and IOMMU group numbers so they can be properly remapped. During restore, it remaps these old IDs to new IDs based on the restored container's device configuration and reopens the necessary host file descriptors. The remapping information is passed via the context to the afterLoad methods of the VFIO/TPU FD implementations. PiperOrigin-RevId: 938132005

Commit:edfe228
Author:Lucas Manning
Committer:gVisor bot

Add checkpoint/restore coordination with libtpu to runsc. PiperOrigin-RevId: 922310675

Commit:c3eae87
Author:gVisor bot
Committer:gVisor bot

Internal change. PiperOrigin-RevId: 927384056

Commit:b375621
Author:gVisor bot
Committer:gVisor bot

Internal change. PiperOrigin-RevId: 927390410

Commit:dcac645
Author:gVisor bot
Committer:gVisor bot

Internal change. PiperOrigin-RevId: 927399029

Commit:410de8b
Author:gVisor bot
Committer:gVisor bot

Internal change. PiperOrigin-RevId: 927390251

Commit:aac5c63
Author:gVisor bot
Committer:gVisor bot

Internal change. PiperOrigin-RevId: 927389828

Commit:ebde64c
Author:gVisor bot
Committer:gVisor bot

Internal change. PiperOrigin-RevId: 927390359

Commit:46c03e4
Author:Xin Zhong
Committer:gVisor bot

Add PPID to ContextData in gvisor seccheck PiperOrigin-RevId: 919895409

Commit:1e4ca67
Author:Zach Koopmans
Committer:gVisor bot

Internal change PiperOrigin-RevId: 919856743

Commit:f1b8190
Author:Etienne Perot
Committer:gVisor bot

Add support for customizing the default nodepool in GKE tester. PiperOrigin-RevId: 914077000

Commit:c53747f
Author:Etienne Perot
Committer:gVisor bot

Internal change PiperOrigin-RevId: 913914238

Commit:18785eb
Author:Etienne Perot
Committer:gVisor bot

Internal change PiperOrigin-RevId: 913914237

Commit:59090b0
Author:Etienne Perot
Committer:gVisor bot

Internal change PiperOrigin-RevId: 913914232

Commit:baad8b6
Author:Etienne Perot
Committer:gVisor bot

Internal change PiperOrigin-RevId: 913914231

Commit:9bc5f3f
Author:Jing Chen
Committer:gVisor bot

Internal change. PiperOrigin-RevId: 910311877

Commit:b92dfb7
Author:Jing Chen
Committer:gVisor bot

Internal change. PiperOrigin-RevId: 907764703

Commit:9042a16
Author:Lucas Manning
Committer:gVisor bot

Fix new sandbox_options proto build. PiperOrigin-RevId: 878013302

Commit:ec013ff
Author:Lucas Manning
Committer:gVisor bot

Create initial sandbox configuration spec. This configuration will serve as the base for various language-specific sandbox APIs. PiperOrigin-RevId: 877625759

Commit:44df3f8
Author:Zach Koopmans
Committer:gVisor bot

Fix cos_gpu_compatibility_test Update the proto for the cos_gpu_compatibility_test so that it passes PiperOrigin-RevId: 876426910

Commit:385d295
Author:Jing Chen
Committer:gVisor bot

Remove pkg/shim/v1/runtimeoptions/v14 that supports containerd before v1.4. gVisor now supports containerd 1.6 and later. PiperOrigin-RevId: 840429781

Commit:d5069fe
Author:Etienne Perot
Committer:gVisor bot

Kubernetes testcluster: Add "restore" nodepool. This is a nodepool configured identically to the test nodepool, and is meant to be a restore target for checkpoint/restore benchmarks. PiperOrigin-RevId: 766345186

Commit:3a06fd3
Author:gVisor bot
Committer:gVisor bot

Internal change. PiperOrigin-RevId: 761600409

Commit:86abc85
Author:gVisor bot

Merge pull request #11473 from Champ-Goblem:shim-add-cgroup-v2-metrics-support PiperOrigin-RevId: 730560110

Commit:7937c03
Author:Andrei Vagin
Committer:gVisor bot

netstack/packet: use lockdep mutexes FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/google/gvisor/pull/11473 from Champ-Goblem:shim-add-cgroup-v2-metrics-support b602afb7647546148cab820775aba3b57e767213 PiperOrigin-RevId: 730536578

Commit:386ce9f
Author:Jing Chen
Committer:gVisor bot

Relocate containerd-shim-runsc-v1 deps from shim/ to shim/v1. FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/google/gvisor/pull/11473 from Champ-Goblem:shim-add-cgroup-v2-metrics-support b602afb7647546148cab820775aba3b57e767213 PiperOrigin-RevId: 729612115

Commit:f010ae0
Author:Andrei Vagin
Committer:Andrei Vagin

Fix a few typos

Commit:4dbba85
Author:Etienne Perot
Committer:gVisor bot

Kubernetes benchmarks: Refactor kubectl context to allow sets of clusters. Also add sanity check to make sure each cluster works as part of initialization, by running a sample pod within. PiperOrigin-RevId: 710786751

Commit:da0e523
Author:Etienne Perot
Committer:gVisor bot

Internal change (diffbased). PiperOrigin-RevId: 709157384

Commit:23c8b4b
Author:Zach Koopmans
Committer:gVisor bot

Add test to check COS drivers as they are posted. Our current check of COS drivers often lags behind COS releases. This is due to needing to preload GPU docker images onto the images that run in our CI pipelines. In addition, COS can be a bit more complex than originally thought releasing driver versions both across GPU types and release branches. Thus, this test searches the latest COS images on each family for new drivers. It does this by looking at COS's published release notes which include a proto of LATEST/DEFAULT drivers selected for each device. This will flag new versions faster with more coverage than our CI pipeline currently. Due to this not actually needing a GPU to run, this can run on any VM. PiperOrigin-RevId: 693736100

Commit:d18a726
Author:Etienne Perot
Committer:gVisor bot

Unbreak build failures in Kubernetes benchmarks. This updates the Google Cloud APIs and their Go libraries to their latest versions, which adds some of the missing fields of the container cluster service v1 proto that didn't exist in the version defined in `WORKSPACE`. This also severs the proto import dependency of `test_range_config.proto` on the container cluster API proto, both because it shouldn't be GKE-specific but also because the Go genproto version of the container cluster API is different (from the Go linker's perspective) from the container cluster proto that is imported from `test_range_config.proto`. Instead, it is encoded as an "any" proto for both nodepools and clusters. Go repositories are re-arranged such that the genproto version imported is taken from the `WORKSPACE` file rather than the one embedded in other Go repositories earlier in the file. The version of this API in Go's genproto library is still missing some of the TPU node placement fields, so that part is filled in via reflection when available. That is hacky but that codepath only applies to TPU clusters so not applicable for most benchmarks. PiperOrigin-RevId: 688682505

Commit:4cff902
Author:Etienne Perot
Committer:gVisor bot

Add Kubernetes benchmarks suite. This is a large set of Kubernetes-based performance benchmarks that has been in use at Google for gVisor performance testing on GKE, and is now open-source. This set of benchmarks has been created and maintained by multiple contributors over the last 2 years: @zkoopmans, @EtiennePerot, @kevinGC, @ayushr2, @manninglucas, @konstantin-s-bogom. PiperOrigin-RevId: 686649688

Commit:e8ca88e
Author:Anthony Cui
Committer:gVisor bot

Add ioctl sniffing tool to run GPU workloads and report unsupported ioctl calls. PiperOrigin-RevId: 644197930

Commit:43bd258
Author:Andrei Vagin
Committer:Andrei Vagin

Fix a few typos It is an idea of running codespell as part of our presubmit checks. Before enabling it for new changes, let's fix what it has found. Signed-off-by: Andrei Vagin <avagin@gmail.com>

Commit:5f4abad
Author:Andrei Vagin
Committer:Andrei Vagin

Fix a few typos It is an idea of running codespell as part of our presubmit checks. Before enabling it for new changes, let's fix what it has found. Signed-off-by: Andrei Vagin <avagin@gmail.com>

Commit:fd8f39c
Author:Nicolas Lacasse
Committer:gVisor bot

Emit SentryTcpListenEvent when the application listens on a tcp port. PiperOrigin-RevId: 562957239

Commit:c227d18
Author:Nicolas Lacasse
Committer:gVisor bot

Emit SentryTcpListenEvent when the application listens on a tcp port. PiperOrigin-RevId: 562957239

Commit:82d3f31
Author:Lucas Manning
Committer:gVisor bot

Introduce SentryMountPromiseBlockEvent. PiperOrigin-RevId: 523233705

Commit:7de67eb
Author:Lucas Manning
Committer:gVisor bot

Introduce SentryMountPromiseBlockEvent. PiperOrigin-RevId: 523233705

Commit:0c33df1
Author:Etienne Perot
Committer:gVisor bot

gVisor: Add library for exporting instrumentation data in Prometheus format. This adds a new library, `//pkg/prometheus`, which contains just enough data structures such that we can encode instrumentation information in Prometheus information. These data structures are JSON-encodable, such that they can be used over the `runsc` control channel for export (implemented in a future CL). The existing `metric.go` library gains new functionality to export its own data using this new export format. This change is part of a series of changes to support Prometheus-style metrics in `runsc`. Doing so requires making several seemingly-odd design decisions, due to the following architectural constraints: - Prometheus requires an HTTP server serving the `/metrics` endpoint. - For performance reasons, the `runsc boot` process cannot run the `netpoller` goroutine. - Since we don't want to write our own HTTP server implementation, this means the HTTP endpoint has to be served by a separate process that remains running during the lifetime of the container. - The `runsc boot` process is untrusted. - This means we cannot trust metrics data that comes out of the Sentry. Therefore, there needs to be an elaborate dance where we pre-register metric metadata before starting any untrusted workload. Then, the server relaying the metric data must verify the validity of metric values against this metric metadata. This avoids leaking metrics, cardinality blow-ups, and other such DoS vectors. - This feature needs to be easy-to-use in a typical Docker setting. - This means having the ability to just say `--metrics-server=localhost:1337` in the `runsc` runtime entry in `/etc/docker/daemon.json` and have that Just Work(TM), even when multiple containers are running. - Since only one process may listen on a port at a given time, this means the metric server needs to be able to multiplex requests out to multiple running sandboxes, and remain alive for the entire duration of either of these sandboxes. However, it should also die when there are no sandboxes, so that we don't end up with leftover metric servers lying around. - For this reason, the metrics server runs *outside* of the usual per-container cgroups. - This also saves system resources by not running one server per sandbox. - The metrics server must be exposed to the outside world, and cannot assume that its clients are trustworthy. - For this reason, a metrics server is bound to a runtime root directory, and double-checks all that the sandboxes it is asked to follow actually exist in this root directory. PiperOrigin-RevId: 498039624

Commit:d04a8d3
Author:Etienne Perot
Committer:gVisor bot

gVisor: Add library for exporting instrumentation data in Prometheus format. This adds a new library, `//pkg/prometheus`, which contains just enough data structures such that we can encode instrumentation information in Prometheus information. These data structures are JSON-encodable, such that they can be used over the `runsc` control channel for export (implemented in a future CL). The existing `metric.go` library gains new functionality to export its own data using this new export format. This change is part of a series of changes to support Prometheus-style metrics in `runsc`. Doing so requires making several seemingly-odd design decisions, due to the following architectural constraints: - Prometheus requires an HTTP server serving the `/metrics` endpoint. - For performance reasons, the `runsc boot` process cannot run the `netpoller` goroutine. - Since we don't want to write our own HTTP server implementation, this means the HTTP endpoint has to be served by a separate process that remains running during the lifetime of the container. - The `runsc boot` process is untrusted. - This means we cannot trust metrics data that comes out of the Sentry. Therefore, there needs to be an elaborate dance where we pre-register metric metadata before starting any untrusted workload. Then, the server relaying the metric data must verify the validity of metric values against this metric metadata. This avoids leaking metrics, cardinality blow-ups, and other such DoS vectors. - This feature needs to be easy-to-use in a typical Docker setting. - This means having the ability to just say `--metrics-server=localhost:1337` in the `runsc` runtime entry in `/etc/docker/daemon.json` and have that Just Work(TM), even when multiple containers are running. - Since only one process may listen on a port at a given time, this means the metric server needs to be able to multiplex requests out to multiple running sandboxes, and remain alive for the entire duration of either of these sandboxes. However, it should also die when there are no sandboxes, so that we don't end up with leftover metric servers lying around. - For this reason, the metrics server runs *outside* of the usual per-container cgroups. - This also saves system resources by not running one server per sandbox. - The metrics server must be exposed to the outside world, and cannot assume that its clients are trustworthy. - For this reason, a metrics server is bound to a runtime root directory, and double-checks all that the sandboxes it is asked to follow actually exist in this root directory. PiperOrigin-RevId: 498039624

Commit:04b311d
Author:Shambhavi Srivastava
Committer:gVisor bot

Adding container_start_duration metric for container multi-container mode. Including the time when a container start request is received and the time it is completed in the ContainerStartedEvent proto message. PiperOrigin-RevId: 495390114

Commit:1f8c4cb
Author:Shambhavi Srivastava
Committer:gVisor bot

Adding container_start_duration metric for container multi-container mode. Including the time when a container start request is received and the time it is completed in the ContainerStartedEvent proto message. PiperOrigin-RevId: 495390114

Commit:63f4760
Author:Shambhavi Srivastava
Committer:gVisor bot

Adding metrics for start container in multi-container mode. PiperOrigin-RevId: 493655449

Commit:4a1a26f
Author:Shambhavi Srivastava
Committer:gVisor bot

Adding metrics for start container in multi-container mode. PiperOrigin-RevId: 493655449

Commit:874909b
Author:Shambhavi Srivastava
Committer:gVisor bot

Adding more trace point integration tests for the following syscalls: - Chdir - Fchdir - Setgid - Setuid - Setsid - Setresuid - Setresgid Updates #4805 PiperOrigin-RevId: 489076929

Commit:dec1aed
Author:Shambhavi Srivastava
Committer:gVisor bot

Adding more trace point integration tests for the following syscalls: - Chdir - Fchdir - Setgid - Setuid - Setsid - Setresuid - Setresgid Updates #4805 PiperOrigin-RevId: 489076929

Commit:22de242
Author:Fabricio Voznika
Committer:gVisor bot

Add read/write syscalls to trace points Closes #8092 PiperOrigin-RevId: 488719448

Commit:e6f0195
Author:Fabricio Voznika
Committer:gVisor bot

Add read/write syscalls to trace points Closes #8092 PiperOrigin-RevId: 488719448

Commit:126144d
Author:Rahat Mahmood
Committer:gVisor bot

Add container exit event. PiperOrigin-RevId: 479651998

Commit:10a1cad
Author:Rahat Mahmood
Committer:gVisor bot

Add container exit event. PiperOrigin-RevId: 479651998

Commit:d0c5abc
Author:Rahat Mahmood
Committer:gVisor bot

Implement sentry control commands for cgroupfs. Add sentry control commands to read and write cgroup control values. PiperOrigin-RevId: 474663678

Commit:fc0e4d0
Author:Rahat Mahmood
Committer:gVisor bot

Implement sentry control commands for cgroupfs. Add sentry control commands to read and write cgroup control values. PiperOrigin-RevId: 474663678

Commit:b160b2a
Author:Shambhavi Srivastava
Committer:gVisor bot

Add Points to some syscalls Added a raw syscall points to all syscalls. Added schematized syscall points to the following syscalls: - timerfd_create - timerfd_settime - timerfd_gettime - fork, vfork - inotify_init, inotify_init1 - inotify_add_watch - inotify_rm_watch - socketpair Updates #4805 PiperOrigin-RevId: 459596784

Commit:c8e98d9
Author:Shambhavi Srivastava
Committer:gVisor bot

Add Points to some syscalls Added a raw syscall points to all syscalls. Added schematized syscall points to the following syscalls: - timerfd_create - timerfd_settime - timerfd_gettime - fork, vfork - inotify_init, inotify_init1 - inotify_add_watch - inotify_rm_watch - socketpair Updates #4805 PiperOrigin-RevId: 459596784

Commit:6a89472
Author:Shambhavi Srivastava
Committer:gVisor bot

Add Points to some syscalls Added a raw syscall points to all syscalls. Added schematized syscall points to the following syscalls: - chroot - dup, dup2, dup3 - prlimit64 - eventfd, eventfd2 - signalfd, signalfd4 - bind - accept, accept4 - fcntl - pipe, pipe2 Updates #4805 PiperOrigin-RevId: 457139504

Commit:45b06bb
Author:Shambhavi Srivastava
Committer:gVisor bot

Add Points to some syscalls Added a raw syscall points to all syscalls. Added schematized syscall points to the following syscalls: - chroot - dup, dup2, dup3 - prlimit64 - eventfd, eventfd2 - signalfd, signalfd4 - bind - accept, accept4 - fcntl - pipe, pipe2 Updates #4805 PiperOrigin-RevId: 457139504

Commit:2adbcf7
Author:Shambhavi Srivastava
Committer:gVisor bot

Add Points to some syscalls Added a raw syscall points to all syscalls. Added schematized syscall points to the following syscalls: - Chdir - Fchdir - Setgid - Setuid - Setsid - Setresuid - Setresgid PiperOrigin-RevId: 451001973

Commit:f84e9a8
Author:Shambhavi Srivastava
Committer:gVisor bot

Add Points to some syscalls Added a raw syscall points to all syscalls. Added schematized syscall points to the following syscalls: - Chdir - Fchdir - Setgid - Setuid - Setsid - Setresuid - Setresgid PiperOrigin-RevId: 451001973

Commit:2fb14fd
Author:Fabricio Voznika
Committer:gVisor bot

Remove unused field from syscall.Read proto Updates #4805 PiperOrigin-RevId: 450802760