Skip to content

generate/seccomp: allow the time64 variants of allowed syscalls - #819

Open
dangowrt wants to merge 1 commit into
opencontainers:masterfrom
dangowrt:seccomp-time64
Open

dangowrt wants to merge 1 commit into
opencontainers:masterfrom
dangowrt:seccomp-time64

Conversation

@dangowrt

Copy link
Copy Markdown
Contributor

On 32-bit architectures Linux 5.1 added *_time64 variants of every syscall that takes a time_t, and libc and the Go runtime switch to them on such kernels. Go uses futex_time64 once the kernel is 5.1 or newer (runtime/os_linux32.go). The default seccomp profile only lists the old names, so its default SCMP_ACT_ERRNO action denies futex_time64; runtimetest aborts inside the container (futexwakeup ... returned -1, then a deliberate SIGSEGV) and every test that runs it reports nothing on i386, arm and mips.

This adds the time64 variant of every syscall the profile already allows: clock_gettime64, clock_getres_time64, clock_nanosleep_time64, futex_time64, mq_timedreceive_time64, mq_timedsend_time64, ppoll_time64, pselect6_time64, recvmmsg_time64, rt_sigtimedwait_time64, sched_rr_get_interval_time64, semtimedop_time64, timer_gettime64, timer_settime64, timerfd_gettime64, timerfd_settime64 and utimensat_time64. clock_settime, clock_adjtime and io_pgetevents are not in the profile, so their variants are not added either.

Tested with an i386 OpenWrt image (kernel 6.18) running the validation suite against a runtime that enforces the profile: the suite goes from 388 to 3497 passing assertions; amd64 is unaffected.

On 32-bit architectures with a 64-bit time_t ABI (Linux 5.1 and later)
libc and the Go runtime call the *_time64 syscalls instead of the
32-bit time ones; Go uses futex_time64 once the kernel is new enough.
The default profile only lists the old names, so its default errno
action denies futex_time64 and the runtimetest binary aborts inside
the container on i386, arm and mips. Allow the time64 variant of every
syscall the profile already allows.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
@dangowrt
dangowrt marked this pull request as ready for review October 20, 2026 19:04
@dangowrt
dangowrt requested a review from a team as a code owner October 20, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant