20 Commits

Author SHA1 Message Date
gVisor bot e4efc8d074 Internal change.
PiperOrigin-RevId: 709861006
2024-12-26 12:45:32 -08:00
gVisor bot 47e1c24f38 Internal change.
PiperOrigin-RevId: 663801589
2024-08-16 11:44:31 -07:00
gVisor bot 1cccd35dcf Internal change.
PiperOrigin-RevId: 595450791
2024-01-03 11:10:14 -08:00
gVisor bot 4bda0e5af3 Redacting sensitive fields in debug logs.
PiperOrigin-RevId: 537407555
2023-06-02 14:20:21 -07:00
Andrei Vagin 6e719b44ce Fix all c++ compile time warnings 2023-03-09 19:01:00 -08:00
Adin Scannell 1ceb814544 Add default_applicable_licenses rules to packages.
PiperOrigin-RevId: 513581243
2023-03-02 10:50:04 -08:00
Fabricio Voznika e6f019594e Add read/write syscalls to trace points
Closes #8092

PiperOrigin-RevId: 488719448
2022-11-15 11:54:23 -08:00
Fabricio Voznika 919a20f179 Add documentation and tutorials for Runtime Monitoring
Updates #4805

PiperOrigin-RevId: 467993824
2022-08-16 12:29:59 -07:00
Shambhavi Srivastava c8e98d9f5e 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
2022-07-07 14:10:36 -07:00
Shambhavi Srivastava 45b06bbb76 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
2022-06-24 19:37:41 -07:00
Fabricio Voznika 0ae98218be Add async write to remote checker
When writing a trace point fails, the remote checker can retry with
configurable exponential backoff. After the number of retries is
exceeded, the point is dropped. The number of dropped events are
reported in the message header and also in `runsc trace list`
command.

Updates #4805

PiperOrigin-RevId: 456662539
2022-06-22 19:23:48 -07:00
Fabricio Voznika d25fe0538a Drain all messages before closing socket
Updates #4805

PiperOrigin-RevId: 452812458
2022-06-03 11:56:09 -07:00
Shambhavi Srivastava f84e9a85d1 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
2022-05-25 13:34:03 -07:00
Fabricio Voznika e189fb6886 Add version handshake before communication is stablished
Details on how it works is in wire.Handshake.

Updates #4805

PiperOrigin-RevId: 448552448
2022-05-13 12:33:43 -07:00
Fabricio Voznika 2d6e64019b Faster proto serialization
The use of protobuf.Any is convenient, but adds to proto serialization
time and number of memory allocations required to send a message.
Instead, we now use an enum to indentify the message and use it to
determine how to unmarshall the message on the receiveing end. It
also speeds up event consuption by not requiring a map from string
(proto names) to callbacks.

BenchmarkProtoAny-6   115.9 ns/op        210 B/op       4 allocs/op
BenchmarkProtoEnum-6   58.3 ns/op          2 B/op       1 allocs/op

Updates #4805

PiperOrigin-RevId: 446879057
2022-05-05 19:29:49 -07:00
Fabricio Voznika f2b6fbb47e Add Points to some syscalls
Added a raw syscall points to all syscalls. Added schematized syscall
points to the following syscalls:

  - read
  - close
  - socket
  - connect
  - execve
  - creat
  - openat
  - execveat

Updates #4805

PiperOrigin-RevId: 446008358
2022-05-02 13:03:04 -07:00
Fabricio Voznika e1c4bbccf9 Add sentry/task_exit point
Updates #4805

PiperOrigin-RevId: 445222912
2022-04-28 12:45:48 -07:00
Fabricio Voznika 93185b4eec Add container/start Point
Updates #4805

PiperOrigin-RevId: 444983390
2022-04-27 15:30:31 -07:00
Fabricio Voznika a4cb72d1d8 Plumb seccheck configuration in runsc
Added new flag `--pod-init-config` that allows custom configuration
steps to be specified when a pod is being created. For now, the only
step supported is to configure a seccheck session, but more can be
added in the future, e.g. startup hook.

In seccheck, metadata was added for all Points and sinks (aka Checkers)
so that an external configuration files can reference them. In addition,
infrastructure to read and configure sessions from a file has been
added. Only a single session ("Default") is supported for now.

Updates #4805

PiperOrigin-RevId: 444705708
2022-04-26 17:08:08 -07:00
Fabricio Voznika 2a238b23e7 Remote checker
Add a generic checker that serializes Points protos to a remote process.

More details here: https://docs.google.com/document/d/1RQQKzeFpO-zOoBHZLA-tr5Ed_bvAOLDqgGgKhqUff2A/

Updates #4805

PiperOrigin-RevId: 443690622
2022-04-22 09:54:21 -07:00