From man TIOCPKT:
"""
In packet mode, each subsequent read(2) will return a packet that either
contains a single nonzero control byte, or has a single byte containing zero
('\0') followed by data written on the slave side of the pseudoterminal."
"""
This CL implements only the data portion of packet mode, not the control bytes,
but that seems to be enough to get xfce4-terminal to work.
PiperOrigin-RevId: 737175092
Currently, the NoSigBusOnPagesBeforeEOF and NoSigBusOnPageContainingEOF
test cases are identical. This patch corrects the addr accessed in the
former test to match the corresponding comment.
Signed-off-by: Tianyu Zhou <albert.zty@antgroup.com>
This support is only needed when the gofer mount in question is writable.
By default, the rootfs has an overlayfs applied, so the gofer lower layer is
not writabled. But if you are using --overlay2=none, then this change should
allow you to save sandbox with open FDs to deleted files in rootfs.
Updates #11425
PiperOrigin-RevId: 733021267
From setpgid manpage,
EACCES - An attempt was made to change the process group ID of one
of the children of the calling process and the child had
already performed an execve(2) (setpgid(), setpgrp()).
This CL makes gVisor implement this rule and updates the exec test
suite accordingly.
TESTED: http://sponge2/7f364e8a-4f82-463e-ba62-79234c4d054d
PiperOrigin-RevId: 727095560
`fdBitmap.FirstZero()` could return `max` value; if it does, then
recompute the max value to avoid reusing the old max value twice.
The default bitmap size for file descriptors in gVisor is 65535.
Add a pipe test that attempts to create more than 65535 FDs to hit the edge
case where fdBitmap.FirstZero() returns the default bitmap max value of 65535.
TESTED:
http://sponge2/4c12ce75-3763-4773-ad62-87c6b8fe0446http://sponge2/9c9d6ea0-b69c-432c-a16b-9446214109ba
PiperOrigin-RevId: 724410846
AllSocketPairTest.SetAndGetBooleanSocketOptions fails on the upstream linux
kernel. The behaviour has been changed by 5b0af621c3f6 ("net: restrict
SO_REUSEPORT to inet sockets").
PiperOrigin-RevId: 722774180
This test case creates one connection, then it closes one end of it. After that
it waits for a linger timeout and tries to create the second connection with
the same client source port. The test is flaky if the second half of the fist
connection isn't closed before creating the second connection.
PiperOrigin-RevId: 715924851
Top-Byte-Ignore (TBI) is a feature on all ARMv8.0 CPUs that causes the top byte
of virtual addresses to be ignored on loads and stores. Instead, bit 55 is
extended over bits 56-63 before address translation. This feature allows use of
the (ignored) top byte as a tag or for other in-band metadata.
In Linux, brk()/mmap()/mremap() syscalls don't untag addresses. More details
are in dcde237319e6 ("mm: Avoid creating virtual address aliases in
brk()/mmap()/mremap()")
PiperOrigin-RevId: 715885990