[PATCH 00/22] Fixes for non-x86_64, older kernels/glibc, and some more
This series carries fixes for issues that emerged from testing on
architectures other than x86_64, older kernels and older versions of
gcc and glibc (1/22 to 7/22, 9/22, 11/22 to 12/22), some logic bugs
that appeared during further testing (8/22, 10/22, 20/22) and
fixes for tests, scripts and documentation (remaining patches).
passt and pasta should now work on multiple architectures, build
starting from gcc 4.7 and glibc 2.19, and actually work on kernel
versions >= 4.4 with glibc >= 2.25. Tests checking this are
introduced in the next series.
Note to package maintainers: ausyscall(8) is not used anymore to
generate seccomp profiles.
Stefano Brivio (22):
tcp: Cover all usages of tcpi_snd_wnd with HAS_SND_WND
tap, tcp: Fix two comparisons with different signedness reported by
gcc 7
passt: Drop
...I forgot two of them.
Signed-off-by: Stefano Brivio
For some reason, those are not reported by recent versions of gcc.
Signed-off-by: Stefano Brivio
This is the only remaining Linux-specific include -- drop it to avoid
clang-tidy warnings and to make code more portable.
Signed-off-by: Stefano Brivio
On some distributions, on ppc64, ulimit -s returns 'unlimited': add a
reasonable default, and also make sure ulimit is invoked using the
default shell, which should ensure ulimit is actually implemented.
Also note that AUDIT_ARCH doesn't follow closely the naming reported
by 'uname -m': convert for i386 and ppc as needed.
While at it, move inclusion of seccomp.h after util.h, the former is
less generic (cosmetic/clang-tidy only).
Older kernel headers might lack a definition for AUDIT_ARCH_PPC64LE:
define that explicitly if it's not available.
Signed-off-by: Stefano Brivio
They're not available on some older toolchains.
Signed-off-by: Stefano Brivio
Some C library functions are commonly implemented by different syscalls
on different architectures. Add a mechanism to allow selected syscalls
for a single architecture, syntax in #syscalls comment is:
#syscalls <arch>:<name>
e.g. s390x:socketcall, given that socketcall() is commonly used there
instead of socket().
This is now implemented by a compiler probe for syscall numbers,
auditd tools (ausyscall) are not required anymore as a result.
Signed-off-by: Stefano Brivio
tcpi_bytes_acked and tcpi_min_rtt are only available on recent
kernel versions: provide fall-back paths (incurring some grade of
performance penalty).
Support for getrandom() was introduced in Linux 3.17 and glibc 2.25:
provide an alternate mechanism for that as well, reading from
/dev/random.
Also check if NETLINK_GET_STRICT_CHK is defined before using it:
it's not strictly needed, we'll filter out irrelevant results from
netlink anyway.
Signed-off-by: Stefano Brivio
Only allow the intended types of namespaces to be joined via setns()
as a defensive measure.
Signed-off-by: Stefano Brivio
Bitmap manipulating functions would otherwise refer to inconsistent
sets of bits on big-endian architectures. While at it, fix up a
couple of casts.
Signed-off-by: Stefano Brivio
The effect of this typo became visible in an IPv6-only environment,
where passt wouldn't work at all.
Signed-off-by: Stefano Brivio
Seen on PPC with some older kernel versions: we seemingly have bytes
left to read from the returned array of dirent structs, but d_reclen
is zero: this, and all the subsequent entries, are not valid.
Signed-off-by: Stefano Brivio
On some architectures, the page size is bigger than the maximum size
of an Ethernet frame.
Signed-off-by: Stefano Brivio
Depending on the C library, but not necessarily in all the
functions we use, statx() might be used instead of stat(),
getdents() instead of getdents64(), readlinkat() instead of
readlink(), openat() instead of open().
On aarch64, it's clone() and not fork(), and dup3() instead of
dup2() -- just allow the existing alternative instead of dealing
with per-arch selections.
Since glibc commit 9a7565403758 ("posix: Consolidate fork
implementation"), we need to allow set_robust_list() for
fork()/clone(), even in a single-threaded context.
On some architectures, epoll_pwait() is provided instead of
epoll_wait(), but never both. Same with newfstat() and
fstat(), sigreturn() and rt_sigreturn(), getdents64() and
getdents(), readlink() and readlinkat(), unlink() and
unlinkat(), whereas pipe() might not be available, but
pipe2() always is, exclusively or not.
Seen on Fedora 34: newfstatat() is used on top of fstat().
syslog() is an actual system call on some glibc/arch combinations,
instead of a connect()/send() implementation.
On ppc64 and ppc64le, _llseek(), recv(), send() and getuid()
are used. For ppc64 only: ugetrlimit() for the getrlimit()
implementation, plus sigreturn() and fcntl64().
On s390x, additionally, we need to allow socketcall() (on top
of socket()), and sigreturn() also for passt (not just for
pasta).
Signed-off-by: Stefano Brivio
Debug information might be printed after a prompt is seen,
just wait those 3 seconds and be done with it.
Signed-off-by: Stefano Brivio
Signed-off-by: Stefano Brivio
The throughput results in this test look quite variable, slightly
lower figures look reasonable anyway.
Signed-off-by: Stefano Brivio
...this gets needlessly annoying while playing with test cases.
Signed-off-by: Stefano Brivio
It's not really needed on a reasonably powered CPU, and makes the
video contents way less readable.
Signed-off-by: Stefano Brivio
Signed-off-by: Stefano Brivio
I forgot --stderr could also be -e, fix handling.
Signed-off-by: Stefano Brivio
It shouldn't refer to the subsection under "Features".
Signed-off-by: Stefano Brivio
Signed-off-by: Stefano Brivio
participants (1)
-
Stefano Brivio