Commit Graph
17 Commits
Author SHA1 Message Date
Jamie LiuandgVisor bot 19f12e64c8 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
dongjinlong e6d7cba96c chore: remove repetitive words in comments
Signed-off-by: dongjinlong <[email protected]>
2024-03-26 19:57:40 +08:00
Andrei Vagin 43bd258fcf 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 <[email protected]>
2023-10-25 12:13:42 -07:00
Ayush RanjanandgVisor bot 1003ae8e93 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
Adin ScannellandgVisor bot 4967b16af9 Update Waitable API.
Instead of passing the event mask at registratrion time, pass the mask as part
of the waiter. This makes the mask immutable and simplifies the architecture of
waiters. This is also necessary for a future fix that will allow the fdnotifier
to keep persistent entries, as opposed to requiring constant updates.

This change is intended to be a no-op in terms of function. The only exception
is signalfd, where this mask was abused. To handle this case, the operation of
signalfd changed to allow one layer of indirection.

PiperOrigin-RevId: 409702998
2021-11-13 12:54:39 -08:00
Rahat MahmoodandgVisor bot 8a73bd1967 Fix race on msgrcv(MSG_COPY).
Previously, we weren't making a copy when a sysv message queue was
receiving a message with the MSG_COPY flag. This flag indicates the
message being received should be left in the queue and a copy of the
message should be returned to userspace. Without the copy, a racing
process can modify the original message while it's being marshalled to
user memory.

Reported-by: [email protected]
PiperOrigin-RevId: 396712856
2021-09-14 16:53:30 -07:00
gVisor bot d3db71d3b1 Merge pull request #6262 from sudo-sturbia:msgqueue/syscalls3
PiperOrigin-RevId: 391416650
2021-08-17 17:44:26 -07:00
Zyad A. Ali 612c68bfa2 Implement control operations on msgqueue.
For IPCInfo, update value of MSGSEG constant in abi to avoid overflow in
MsgInfo.MsgSeg. MSGSEG was originaly simplified in abi, and is unused
(by us and within the kernel), so updating it is okay.

Updates #135
2021-08-17 20:31:38 +02:00
Rahat MahmoodandgVisor bot 027fe3c892 Correctly handle interruptions in blocking msgqueue syscalls.
Reported-by: [email protected]
Reported-by: [email protected]
PiperOrigin-RevId: 389084629
2021-08-05 20:16:54 -07:00
Zyad A. Ali f517422db2 Implement MSG_COPY option for msgrcv(2).
Implement Queue.Copy and add more tests for it.

Updates #135
2021-08-03 18:13:24 +02:00
Zyad A. Ali 5eb71ba8ed Implement stubs for msgsnd(2) and msgrcv(2).
Add support for msgsnd and msgrcv and enable syscall tests.

Updates #135
2021-08-03 18:13:24 +02:00
Zyad A. Ali 0a71261f8a Implement Queue.Receive.
Receive implements the behaviour of msgrcv(2) without the MSG_COPY flag.

Updates #135
2021-08-03 18:13:24 +02:00
Zyad A. Ali 377586b788 Implement Queue.Send.
Send implements the functionality of msgsnd(2).

Updates #135
2021-08-03 18:13:24 +02:00
Zyad A. Ali 0683ff858f Implement stubs for msgget(2) and msgctl(IPC_RMID).
Add support for msgget, and msgctl(IPC_RMID), and enable msgqueue
syscall tests.

Updates #135
2021-07-13 22:12:02 +02:00
Zyad A. Ali a99ab46d05 Implement Registry.Remove.
Remove implements the behaviour or msgctl(IPC_RMID).

Updates #135
2021-07-13 22:12:02 +02:00
Zyad A. Ali 83ada5e517 Implement Registry.FindOrCreate.
FindOrCreate implements the behaviour of msgget(2).

Updates #135
2021-07-13 22:12:02 +02:00
Zyad A. Ali dc420a0d2f Create package msgqueue.
Create package msgqueue, define primitives to be used for message
queues, and add a msgqueue.Registry to IPCNamespace.

Updates #135
2021-07-13 22:12:02 +02:00