Commit Graph
24 Commits
Author SHA1 Message Date
Lucas ManningandgVisor bot 46263053c6 Implement OFD POSIX locks.
This change also switches lock EOF to be MaxInt instead of MaxUint,
since the lock length can be a negative value.

Fixes #5264

PiperOrigin-RevId: 513571374
2023-03-02 10:14:34 -08:00
Andrei VaginandgVisor bot ce2a4e4792 Don't register async handlers for signalfd descriptors
This is a missing part of cl/483861398.

PiperOrigin-RevId: 501636729
2023-01-12 12:32:59 -08:00
Andrei VaginandgVisor bot 4a53d87377 Disable fasync for signalfd descriptors
In Linux, signalfd doesn't support fasync events.

Reported-by: [email protected]
PiperOrigin-RevId: 483861398
2022-10-25 21:46:13 -07:00
gVisor bot 8d23ad6481 Internal change.
PiperOrigin-RevId: 470223256
2022-08-26 05:30:18 -07:00
Ayush RanjanandgVisor bot f6263c38df Remove VFS1 special handling in tests.
Also clean up usage of GVISOR_VFS environment variable.
Updates #1624

PiperOrigin-RevId: 429100450
2022-02-16 11:41:51 -08:00
Andrei VaginandgVisor bot badafede09 Deflake the fcntl test
Wait when a child process will start to measure a blocking time more precise.

PiperOrigin-RevId: 405478376
2021-10-25 13:32:08 -07:00
Ghanan GowripalanandgVisor bot 129cc47c63 Move socket_test_util to //test/util
...and rename the library to socket_util.

PiperOrigin-RevId: 386348306
2021-07-22 16:37:15 -07:00
Dean DengandgVisor bot 025d055287 Resolve remaining O_PATH TODOs.
O_PATH is now implemented in vfs2.

Fixes #2782.

PiperOrigin-RevId: 373861410
2021-05-14 14:04:46 -07:00
gVisor bot 4f82319e45 Add O_PATH support in vfs2
PiperOrigin-RevId: 354367665
2021-01-28 12:24:37 -08:00
Dean DengandgVisor bot 8bf4473090 Implement F_GETLK fcntl.
Fixes #5113.

PiperOrigin-RevId: 353313374
2021-01-22 13:58:16 -08:00
Etienne PerotandgVisor bot c4cee5ea31 Implement fcntl options F_GETSIG and F_SETSIG.
These options allow overriding the signal that gets sent to the process when
I/O operations are available on the file descriptor, rather than the default
`SIGIO` signal. Doing so also populates `siginfo` to contain extra information
about which file descriptor caused the event (`si_fd`) and what events happened
on it (`si_band`). The logic around which FD is populated within `si_fd`
matches Linux's, which means it has some weird edge cases where that value may
not actually refer to a file descriptor that is still valid.

This CL also ports extra S/R logic regarding async handler in VFS2.
Without this, async I/O handlers aren't properly re-registered after S/R.

PiperOrigin-RevId: 345436598
2020-12-03 06:20:29 -08:00
Dean DengandgVisor bot 5f0805aea6 Fix SETOWN_EX return value.
Return on success should be 0, not size of the struct copied out.

PiperOrigin-RevId: 324029193
2020-07-30 10:27:44 -07:00
Dean DengandgVisor bot ba799c1a75 Complete async signal delivery support in vfs2.
- Support FIOASYNC, FIO{SET,GET}OWN, SIOC{G,S}PGRP (refactor getting/setting
  owner in the process).
- Unset signal recipient when setting owner with pid == 0 and
  valid owner type.

Updates #2923.

PiperOrigin-RevId: 319231420
2020-07-01 08:42:12 -07:00
Dean DengandgVisor bot 8e9f749e70 Add build target for the provisional style guide.
This includes the provisional style guide in the website and fixes the broken
link from CONTRIBUTING.md. The style guide will be located under the "Community"
category as it's related to contributing to the project.

Also, add missing includes that were causing some presubmits to fail.

PiperOrigin-RevId: 319061410
2020-06-30 11:25:55 -07:00
Dean DengandgVisor bot 4eceb0c442 Port GETOWN, SETOWN fcntls to vfs2.
Also make some fixes to vfs1's F_SETOWN. The fcntl test now entirely passes
on vfs2.

Fixes #2920.

PiperOrigin-RevId: 318669529
2020-06-27 21:33:37 -07:00
Fabricio VoznikaandgVisor bot ed5436e082 Implement POSIX locks
- Change FileDescriptionImpl Lock/UnlockPOSIX signature to
  take {start,length,whence}, so the correct offset can be
  calculated in the implementations.
- Create PosixLocker interface to make it possible to share
  the same locking code from different implementations.

Closes #1480

PiperOrigin-RevId: 316910286
2020-06-17 10:04:26 -07:00
Andrei VaginandgVisor bot adfe745d70 vfs2: implement fcntl(fd, F_SETFL, flags)
PiperOrigin-RevId: 316148074
2020-06-12 11:58:15 -07:00
Adin ScannellandCopybara-Service 412a92112f Add basic microbenchmarks.
PiperOrigin-RevId: 296104390
2020-02-19 18:21:54 -08:00
Haibo Xu 3718b509ea Unify the kOLargeFile definition in syscall tests.
Signed-off-by: Haibo Xu <[email protected]>
Change-Id: Id9d6ae98305a4057d55d622ea4c3ac2228fea212
2020-01-23 01:04:02 +00:00
Ian GudgerandgVisor bot 41609aad9e Implement F_GETOWN_EX and F_SETOWN_EX.
Some versions of glibc will convert F_GETOWN fcntl(2) calls into F_GETOWN_EX in
some cases.

PiperOrigin-RevId: 284089373
2019-12-05 17:28:52 -08:00
Michael PrattandgVisor bot d355134f10 Migrate from gflags to absl flags
absl flags are more modern and we can easily depend on them directly.

The repo now successfully builds with --incompatible_load_cc_rules_from_bzl.

PiperOrigin-RevId: 269387081
2019-09-16 11:58:27 -07:00
Michael PrattandShentubot 4d52a55201 Change copyright notice to "The gVisor Authors"
Based on the guidelines at
https://opensource.google.com/docs/releasing/authors/.

1. $ rg -l "Google LLC" | xargs sed -i 's/Google LLC.*/The gVisor Authors./'
2. Manual fixup of "Google Inc" references.
3. Add AUTHORS file. Authors may request to be added to this file.
4. Point netstack AUTHORS to gVisor AUTHORS. Drop CONTRIBUTORS.

Fixes #209

PiperOrigin-RevId: 245823212
Change-Id: I64530b24ad021a7d683137459cafc510f5ee1de9
2019-04-29 14:26:23 -07:00
Jamie LiuandShentubot 57c202ead2 Refactor out NewEventFD to a test utility.
PiperOrigin-RevId: 231404512
Change-Id: I31efcc23a0c4a48ef6fbba3ca07415d79290f55c
2019-01-29 08:01:48 -08:00
Brian GeffonandShentubot d3bc79bc84 Open source system call tests.
PiperOrigin-RevId: 224886231
Change-Id: I0fccb4d994601739d8b16b1d4e6b31f40297fb22
2018-12-10 14:42:34 -08:00