Skip to content

Commit

Permalink
privsep: allow __NR_clock_gettime32 syscall (#254)
Browse files Browse the repository at this point in the history
musl libc doesn't have __NR_clock_gettime definition,
but has __NR_clock_gettime32. clock_gettime implementation
fallbacks to 32-bit version if 64-bit is not supported by the kernel.

Signed-off-by: Oleg Lyovin <[email protected]>
  • Loading branch information
olegartys authored Oct 16, 2023
1 parent 6ada94b commit 52f1b73
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/privsep-linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,9 @@ static struct sock_filter ps_seccomp_filter[] = {
#if defined(__x86_64__) && defined(__ILP32__) && defined(__X32_SYSCALL_BIT)
SECCOMP_ALLOW(__NR_clock_gettime & ~__X32_SYSCALL_BIT),
#endif
#ifdef __NR_clock_gettime32
SECCOMP_ALLOW(__NR_clock_gettime32),
#endif
#ifdef __NR_clock_gettime64
SECCOMP_ALLOW(__NR_clock_gettime64),
#endif
Expand Down

0 comments on commit 52f1b73

Please sign in to comment.