Commit Graph

3225 Commits

Author SHA1 Message Date
Adin Scannell 5f3a256425 Add support for kramdown TOC. 2020-05-06 14:15:19 -07:00
Adin Scannell a10d5ed969 Add atom feed (at previous URL). 2020-05-06 14:15:19 -07:00
Adin Scannell 7de6fb18f9 Clean-up documentation. 2020-05-06 14:15:19 -07:00
Adin Scannell cf86ec5e40 Add powered by gVisor logo. 2020-05-06 14:15:19 -07:00
Adin Scannell d3c43401a7 Fixup link in CODE_OF_CONDUCT.md. 2020-05-06 14:15:18 -07:00
Adin Scannell 73d7024510 Fixup transitions for navbar. 2020-05-06 14:15:18 -07:00
Adin Scannell 3cb00c97e9 Add note about AArch64 support. 2020-05-06 14:15:18 -07:00
Adin Scannell f126de6a28 Add resource model. 2020-05-06 14:15:18 -07:00
Adin Scannell b6ba247fa6 Update main landing page. 2020-05-06 14:15:18 -07:00
Adin Scannell 508e25b6d6 Adapt website to use g3doc sources and bazel.
This adapts the merged website repository to use the image and bazel
build framework. It explicitly avoids the container_image rules provided
by bazel, opting instead to build with direct docker commands when
necessary.

The relevant build commands are incorporated into the top-level
Makefile.
2020-05-06 14:15:18 -07:00
Adin Scannell 8cb33ce5de Fix cache permissions. 2020-05-06 14:15:18 -07:00
Adin Scannell 228c6ad7cc Move new post image. 2020-05-06 14:15:17 -07:00
Adin Scannell a79b3f4cdb Update minor formatting issues. 2020-05-06 14:15:17 -07:00
Adin Scannell 1e943dcc9e Add governance and security policies. 2020-05-06 14:15:17 -07:00
Adin Scannell e8bb5832b3 Merge gvisor-website 2020-05-06 14:15:15 -07:00
Adin Scannell 279f1eb7ab Fix runsc syscall documentation generation.
We can register any number of tables with any number of architectures, and
need not limit the definitions to the architecture in question. This allows
runsc to generate documentation for all architectures simultaneously.

Similarly, this simplifies the VFSv2 patching process.

PiperOrigin-RevId: 310224827
2020-05-06 14:13:48 -07:00
Kevin Krakauer b08222cf3a sniffer: fix accidental logging of good packets as bad
We need to check vv.Size() instead of len(tcp), as tcp will always be 20 bytes
long.

PiperOrigin-RevId: 310218351
2020-05-06 13:38:36 -07:00
gVisor bot 4631de620a Internal change.
PiperOrigin-RevId: 310213705
2020-05-06 13:13:48 -07:00
Nicolas Lacasse 591ff0e424 Add maximum memory limit.
PiperOrigin-RevId: 310179277
2020-05-06 10:30:18 -07:00
gVisor bot 8416da33d2 Internal change.
PiperOrigin-RevId: 310057834
2020-05-05 17:58:47 -07:00
Andrei Vagin 9509c0b388 gvisor/test: use RetryEINTR for connect()
connect() returns EINTR after S/R and usually we
use RetryEINTR to workaround this.

PiperOrigin-RevId: 310038525
2020-05-05 16:01:00 -07:00
Mithun Iyer e590314fec Support TCP zero window probes.
As per RFC 1122 4.2.2.17, when the remote advertizes zero receive window,
the sender needs to probe for the window-size to become non-zero starting
from the next retransmission interval. The TCP connection needs to be kept
open as long as the remote is acknowledging the zero window probes.
We reuse the retransmission timers to support this.

Fixes #1644

PiperOrigin-RevId: 310021575
2020-05-05 14:30:52 -07:00
gVisor bot e5d9e7c3b2 Internal change.
PiperOrigin-RevId: 310001058
2020-05-05 12:43:28 -07:00
Dean Deng faf89dd31a Update vfs2 socket TODOs.
Three updates:
- Mark all vfs2 socket syscalls as supported.
- Use the same dev number and ino number generator for all types of sockets,
  unlike in VFS1.
- Do not use host fd for hostinet metadata.

Fixes #1476, #1478, #1484, 1485, #2017.

PiperOrigin-RevId: 309994579
2020-05-05 12:11:14 -07:00
Dean Deng a6dbf9596d Update comments for synthetic gofer files in vfs2.
PiperOrigin-RevId: 309966538
2020-05-05 10:01:28 -07:00
Fabricio Voznika b3bd41434c Return correct name for imported host files
Implement PrependPath() in host.filesystem to correctly format
name for host files.

Updates #1672

PiperOrigin-RevId: 309959135
2020-05-05 09:21:14 -07:00
Jamie Liu 35951c3671 Translate p9.NoUID/GID to OverflowUID/GID.
p9.NoUID/GID (== uint32(-1) == auth.NoID) is not a valid auth.KUID/KGID; in
particular, using it for file ownership causes capabilities to be ineffective
since file capabilities require that the file's KUID and KGID are mapped into
the capability holder's user namespace [1], and auth.NoID is not mapped into
any user namespace. Map p9.NoUID/GID to a different, valid KUID/KGID; in the
unlikely case that an application actually using the overflow KUID/KGID
attempts an operation that is consequently permitted by client permission
checks, the remote operation will still fail with EPERM.

Since this changes the VFS2 gofer client to no longer ignore the invalid IDs
entirely, this CL both permits and requires that we change synthetic mount point
creation to use root credentials.

[1] See fs.Inode.CheckCapability or vfs.GenericCheckPermissions.

PiperOrigin-RevId: 309856455
2020-05-05 09:19:52 -07:00
Nicolas Lacasse da71dc7fdd Port eventfd to VFS2.
And move sys_timerfd.go to just timerfd.go for consistency.

Updates #1475.

PiperOrigin-RevId: 309835029
2020-05-04 16:02:07 -07:00
gVisor bot e7ed68d225 Internal change.
PiperOrigin-RevId: 309832671
2020-05-04 15:48:45 -07:00
Fabricio Voznika 57dbd7f362 Remove kernfs.Filesystem cast from GenericDirectoryFD
This allows for kerfs.Filesystem to be overridden by
different implementations.

Updates #1672

PiperOrigin-RevId: 309809321
2020-05-04 13:40:37 -07:00
Andrei Vagin 006f978829 Deflake //third_party/gvisor/test/syscalls:proc_test_native
There is the known issue of the linux procfs, that two consequent calls of
readdir can return the same entry twice if between these calls one or more
entries have been removed from this directory.

PiperOrigin-RevId: 309803066
2020-05-04 12:58:24 -07:00
gVisor bot 660a1a1028 Internal change.
PiperOrigin-RevId: 309801320
2020-05-04 12:49:29 -07:00
Fabricio Voznika e2b0e0e272 Enable TestRunNonRoot on VFS2
Also added back the default test dimension back which was
dropped in a previous refactor.

PiperOrigin-RevId: 309797327
2020-05-04 12:29:03 -07:00
Fabricio Voznika 0a307d0072 Mount VSFS2 filesystem using root credentials
PiperOrigin-RevId: 309787938
2020-05-04 11:48:00 -07:00
gVisor bot 711439b1c3 Merge pull request #2275 from nybidari:iptables
PiperOrigin-RevId: 309783486
2020-05-04 11:23:55 -07:00
Fabricio Voznika cbc5bef2a6 Add TTY support on VFS2 to runsc
Updates #1623, #1487

PiperOrigin-RevId: 309777922
2020-05-04 10:59:20 -07:00
Adin Scannell 2c986870e3 Fix flaky monotonic time.
This change ensures that even platforms with some TSC issues (e.g. KVM),
can get reliable monotonic time by applied a lower bound on each read.

PiperOrigin-RevId: 309773801
2020-05-04 10:40:51 -07:00
Adin Scannell 56c64e4bb9 Fix include type.
PiperOrigin-RevId: 309506957
2020-05-01 18:03:09 -07:00
Adin Scannell 89562b5b2b Run labeller only for non-forked pull requests.
Otherwise the labeller will generate an error each time.

PiperOrigin-RevId: 309505731
2020-05-01 17:50:07 -07:00
Nayana Bidari b660f16d18 Support for connection tracking of TCP packets.
Connection tracking is used to track packets in prerouting and
output hooks of iptables. The NAT rules modify the tuples in
connections. The connection tracking code modifies the packets by
looking at the modified tuples.
2020-05-01 16:59:40 -07:00
Ghanan Gowripalan 40d6aae122 Regenerate SLAAC address on conflicts with the NIC
If the NIC already has a generated SLAAC address, regenerate a new SLAAC
address until one is generated that does not conflict with the NIC's
existing addresses, up to a maximum of 10 attempts.

This applies to both stable and temporary SLAAC addresses.

Test: stack_test.TestMixedSLAACAddrConflictRegen
PiperOrigin-RevId: 309495628
2020-05-01 16:33:43 -07:00
Kevin Krakauer 5e1e61fbcb Automated rollback of changelist 308674219
PiperOrigin-RevId: 309491861
2020-05-01 16:09:53 -07:00
gVisor bot e7b8a71156 Internal change.
PiperOrigin-RevId: 309467878
2020-05-01 13:52:21 -07:00
Dean Deng 82bae30cee Port netstack, hostinet, and netlink sockets to VFS2.
All three follow the same pattern:
1. Refactor VFS1 sockets into socketOpsCommon, so that most of the methods can
   be shared with VFS2.
2. Create a FileDescriptionImpl with the corresponding socket operations,
   rewriting the few that cannot be shared with VFS1.
3. Set up a VFS2 socket provider that creates a socket by setting up a dentry
   in the global Kernel.socketMount and connecting it with a new
   FileDescription.

This mostly completes the work for porting sockets to VFS2, and many syscall
tests can be enabled as a result.
There are several networking-related syscall tests that are still not passing:
1. net gofer tests
2. socketpair gofer tests
2. sendfile tests (splice is not implemented in VFS2 yet)

Updates #1478, #1484, #1485

PiperOrigin-RevId: 309457331
2020-05-01 12:54:41 -07:00
Bhasker Hariharan 8962b7840f Enable FIFO QDisc by default in runsc.
Updates #231

PiperOrigin-RevId: 309339316
2020-04-30 18:29:57 -07:00
Bhasker Hariharan ae15d90436 FIFO QDisc implementation
Updates #231

PiperOrigin-RevId: 309323808
2020-04-30 16:41:00 -07:00
Jamie Liu 01beec3bb4 Add gofer.InternalFilesystemOptions.LeakConnection.
PiperOrigin-RevId: 309317605
2020-04-30 16:04:21 -07:00
Nicolas Lacasse bae30a0c69 Implement waiter.Waitable methods on VFS2 host inodes.
This fixes bash in Ubuntu.

Updates #1672.

PiperOrigin-RevId: 309298252
2020-04-30 14:19:45 -07:00
Andrei Vagin c01e103256 Allow to run kvm syscall tests on the RBE cluster
PiperOrigin-RevId: 309265978
2020-04-30 11:33:07 -07:00
Ghanan Gowripalan 043b7d83bd Prefer temporary addresses
Implement rule 7 of Source Address Selection RFC 6724 section 5. This
makes temporary (short-lived) addresses preferred over non-temporary
addresses when earlier rules are equal.

Test: stack_test.TestIPv6SourceAddressSelectionScopeAndSameAddress
PiperOrigin-RevId: 309250975
2020-04-30 10:23:17 -07:00