50 Commits
Author SHA1 Message Date
Jamie LiuandgVisor bot e23347e5b5 Move //pkg/sentry/kernel/time to //pkg/sentry/ktime.
This avoids needing to rename it everywhere it's imported.

PiperOrigin-RevId: 693930089
2024-11-06 18:13:51 -08:00
Adin ScannellandgVisor bot 1ceb814544 Add default_applicable_licenses rules to packages.
PiperOrigin-RevId: 513581243
2023-03-02 10:50:04 -08:00
Ayush RanjanandgVisor bot 1fa3c06f1e Delete VFS1 completely.
- Delete pkg/sentry/fs/*.
- Move pkg/sentry/fs/fsutil out of VFS1 directory and remove VFS1 components.
- Remove remaining unused references to VFS1 from remaining codebase.
- Rename/refactor code to avoid even referencing VFS2, unless necessary.
- Rewrite VFS1-only tests to VFS2.

Updates #1624

PiperOrigin-RevId: 490064269
2022-11-21 13:57:52 -08:00
gVisor bot b495ae599a Merge pull request #6262 from sudo-sturbia:msgqueue/syscalls3
PiperOrigin-RevId: 391416650
2021-08-17 17:44:26 -07:00
Zyad A. Ali 2cf61eab4a Implement ipc.Object.Set and use it in ipc mechanisms.
Set provides functionality of {sem,shm,msg}ctl(IPC_SET).
2021-08-17 20:31:38 +02:00
Zach KoopmansandgVisor bot ce58d71fd5 [syserror] Remove pkg syserror.
Removes package syserror and moves still relevant code to either linuxerr
or to syserr (to be later removed).

Internal errors are converted from random types to *errors.Error types used
in linuxerr. Internal errors are in linuxerr/internal.go.

PiperOrigin-RevId: 390724202
2021-08-13 17:16:52 -07:00
Zach KoopmansandgVisor bot 02370bbd31 [syserror] Convert remaining syserror definitions to linuxerr.
Convert remaining public errors (e.g. EINTR) from syserror to linuxerr.

PiperOrigin-RevId: 390471763
2021-08-12 15:19:12 -07:00
Rahat MahmoodandgVisor bot 3d0a930005 Don't panic on user-controlled state in semaphore syscalls.
Reported-by: syzbot+beb099a67f670386a367@syzkaller.appspotmail.com
PiperOrigin-RevId: 386521361
2021-07-23 13:37:33 -07:00
Zyad A. Ali 35a1ff8d39 Create ipc.Registry.
Create ipc.Registry to hold fields, and define functionality common to
all SysV registries, and have registries use it.
2021-07-13 22:12:02 +02:00
Zyad A. Ali 7a73169229 Create ipc package and ipc.Object.
Create ipc.Object to define fields and functionality used in SysV
mechanisms, and have them use it.
2021-07-13 22:09:41 +02:00
Zach KoopmansandgVisor bot e3fdd15932 [syserror] Update syserror to linuxerr for more errors.
Update the following from syserror to the linuxerr equivalent:
EEXIST
EFAULT
ENOTDIR
ENOTTY
EOPNOTSUPP
ERANGE
ESRCH

PiperOrigin-RevId: 384329869
2021-07-12 15:26:20 -07:00
Zach KoopmansandgVisor bot 590b8d3e99 [syserror] Update several syserror errors to linuxerr equivalents.
Update/remove most syserror errors to linuxerr equivalents. For list
of removed errors, see //pkg/syserror/syserror.go.

PiperOrigin-RevId: 382574582
2021-07-01 12:05:19 -07:00
Zach KoopmansandgVisor bot 6ef2684096 [syserror] Update syserror to linuxerr for EACCES, EBADF, and EPERM.
Update all instances of the above errors to the faster linuxerr implementation.
With the temporary linuxerr.Equals(), no logical changes are made.

PiperOrigin-RevId: 382306655
2021-06-30 08:18:59 -07:00
Zach KoopmansandgVisor bot 54b71221c0 [syserror] Change syserror to linuxerr for E2BIG, EADDRINUSE, and EINVAL
Remove three syserror entries duplicated in linuxerr. Because of the
linuxerr.Equals method, this is a mere change of return values from
syserror to linuxerr definitions.

Done with only these three errnos as CLs removing all grow to a significantly
large size.

PiperOrigin-RevId: 382173835
2021-06-29 15:08:46 -07:00
Zyad A. Ali 16d25c972c Use syserror.ENOSPC for system-wide semaphore limits.
semget(2) man page specifies that ENOSPC should be used if "the system
limit for the maximum number of semaphore sets (SEMMNI), or the system
wide maximum number of semaphores (SEMMNS), would be exceeded."
2021-05-31 21:15:28 +02:00
Zyad A. Ali ca2ae6cb53 Fix misspellings. 2021-05-24 18:43:20 +02:00
Zyad A. Ali 06d6dc3602 Format precondition to match style guide. 2021-05-20 21:15:56 +02:00
Jing ChenandgVisor bot e50ee26207 Implement SEM_STAT_ANY cmd of semctl.
PiperOrigin-RevId: 359591577
2021-02-25 12:57:01 -08:00
Jing ChenandgVisor bot 1e56a2f9a2 Implement command SEM_INFO and SEM_STAT for semctl.
PiperOrigin-RevId: 347711998
2020-12-15 16:06:06 -08:00
Jing ChenandgVisor bot 73eccab91e Make semctl IPC_INFO cmd return the index of highest used entry.
PiperOrigin-RevId: 346973338
2020-12-11 04:22:04 -08:00
Jing ChenandgVisor bot a78cef0ed7 Implement command IPC_INFO for semctl.
PiperOrigin-RevId: 345589628
2020-12-03 19:57:51 -08:00
Jing ChenandgVisor bot b26dd6d9b7 Add /proc/sys/kernel/sem.
PiperOrigin-RevId: 345178956
2020-12-02 00:13:24 -08:00
Jing ChenandgVisor bot 3ac00fe9c3 Implement command GETNCNT for semctl.
PiperOrigin-RevId: 341154192
2020-11-06 18:38:13 -08:00
Jing ChenandgVisor bot 1a3f417f4a Implement command GETZCNT for semctl.
PiperOrigin-RevId: 340389884
2020-11-02 23:58:45 -08:00
Jing ChenandgVisor bot facb2fb9c3 Implement command IPC_STAT for semctl.
PiperOrigin-RevId: 339166854
2020-10-26 19:26:42 -07:00