ntpsec 1.1.8 on ARM: SIGSYS/seccomp bad syscall - missing SCMP_SYS for newfstatat faccessat
Happened on a Raspberry Pi 4 64-bit ARM and an Excito B3 (Marvell Kirkwood) 32-bit softfloat ARM running Gentoo bleeding edge.
early-droproot and seccomp enabled
Strace extract from Raspberry Pi 4:
newfstatat(AT_FDCWD, "/etc/ntp.d", 0x7feb1ce4a8, 0) = -1 ENETDOWN (Network is down)
--- SIGSYS {si_signo=SIGSYS, si_code=SYS_SECCOMP, si_call_addr=0x7f8610e800, si_syscall=__NR_newfstatat, si_arch=AUDIT_ARCH_AARCH64} ---
getpid() = 156220
sendto(3, "<27>Jan 10 21:16:37 ntpd[156220]"..., 59, MSG_NOSIGNAL, NULL, 0) = 59
getpid() = 156220
write(2, "2020-01-10T21:16:37 ", 202020-01-10T21:16:37 ) = 20
write(2, "ntpd[156220]: ", 14ntpd[156220]: ) = 14
write(2, "ERR: SIGSYS: got a trap.\n", 25ERR: SIGSYS: got a trap.
) = 25
getpid() = 156220
sendto(3, "<27>Jan 10 21:16:37 ntpd[156220]"..., 80, MSG_NOSIGNAL, NULL, 0) = 80
getpid() = 156220
write(2, "2020-01-10T21:16:37 ", 202020-01-10T21:16:37 ) = 20
write(2, "ntpd[156220]: ", 14ntpd[156220]: ) = 14
write(2, "ERR: SIGSYS/seccomp bad syscall "..., 46ERR: SIGSYS/seccomp bad syscall 79/0xc00000b7
) = 46
When this was fixed, it subsequently complained about faccessat.
Attached patch fixes it but I think it may only be needed on ARM, since my x86_64 install doesn't complain.seccomp.patchntpsecstrace.txtconfigure.log