7 Commits
Author SHA1 Message Date
Jamie LiuandgVisor bot 255e4bf6b0 msgqueue: various fixes
- Fix msgrcv(MSG_COPY) ignoring maxSize, by merging Queue.Copy() into
  Queue.Receive().

- Fix msgrcv(MSG_NOERROR) of truncated messages overwriting the first byte
  after the end of the received message.

- Fix msgrcv(MSG_NOERROR) of truncated messages incorrectly updating
  Queue.byteCount.

- Remove Message.Size, which is completely redundant with len(Message.Text).

- Remove msgqueue.Blocker, which is redundant with context.Blocker and
  context.Context after cl/415189675.

PiperOrigin-RevId: 853322832
2026-01-07 10:40:09 -08:00
Jamie LiuandgVisor bot d523d841e4 msgqueue: check permissions in Queue.Copy()
PiperOrigin-RevId: 852992055
2026-01-06 17:09:13 -08:00
Etienne PerotandgVisor bot da6948a692 gVisor: Refactor SyscallFn to take in the syscall number as argument.
This will be used to plumb the syscall number through to a counter metric that
exports the number of times an unimplemented syscall has been called.

Plenty of syscall implementations call `EmitUnimplementedEvent` for flags and
settings that are not implemented. With `sysno` available, they will be able
to plumb that bit of information through.

PiperOrigin-RevId: 518635831
2023-03-22 12:06:26 -07:00
Zyad A. Ali 4ba2317532 Implement stub for msgctl(2).
Add support for msgctl and enable tests.

Fixes #135
2021-08-17 20:34:51 +02: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 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