From 0e5d0cc13abce38832634d508cbd620b89364ac0 Mon Sep 17 00:00:00 2001 From: Fabricio Voznika Date: Thu, 19 Jan 2023 16:35:59 -0800 Subject: [PATCH] Rename pselect to pselect6 The actual syscall name is pselect6. This name is used in Docker's default seccomp profile. PiperOrigin-RevId: 503297316 --- pkg/sentry/syscalls/linux/linux64.go | 4 ++-- pkg/sentry/syscalls/linux/sys_poll.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/sentry/syscalls/linux/linux64.go b/pkg/sentry/syscalls/linux/linux64.go index b53db566d..00a591e02 100644 --- a/pkg/sentry/syscalls/linux/linux64.go +++ b/pkg/sentry/syscalls/linux/linux64.go @@ -322,7 +322,7 @@ var AMD64 = &kernel.SyscallTable{ 267: syscalls.Supported("readlinkat", Readlinkat), 268: syscalls.Supported("fchmodat", Fchmodat), 269: syscalls.Supported("faccessat", Faccessat), - 270: syscalls.Supported("pselect", Pselect), + 270: syscalls.Supported("pselect6", Pselect6), 271: syscalls.Supported("ppoll", Ppoll), 272: syscalls.PartiallySupported("unshare", Unshare, "Mount, cgroup namespaces not supported. Network namespaces supported but must be empty.", nil), 273: syscalls.Supported("set_robust_list", SetRobustList), @@ -503,7 +503,7 @@ var ARM64 = &kernel.SyscallTable{ 69: syscalls.SupportedPoint("preadv", Preadv, PointPreadv), 70: syscalls.SupportedPoint("pwritev", Pwritev, PointPwritev), 71: syscalls.Supported("sendfile", Sendfile), - 72: syscalls.Supported("pselect", Pselect), + 72: syscalls.Supported("pselect6", Pselect6), 73: syscalls.Supported("ppoll", Ppoll), 74: syscalls.SupportedPoint("signalfd4", Signalfd4, PointSignalfd4), 75: syscalls.ErrorWithEvent("vmsplice", linuxerr.ENOSYS, "", []string{"gvisor.dev/issue/138"}), // TODO(b/29354098) diff --git a/pkg/sentry/syscalls/linux/sys_poll.go b/pkg/sentry/syscalls/linux/sys_poll.go index 0ae9d4ef0..7f3662fdd 100644 --- a/pkg/sentry/syscalls/linux/sys_poll.go +++ b/pkg/sentry/syscalls/linux/sys_poll.go @@ -508,8 +508,8 @@ type sigSetWithSize struct { sizeofSigset uint64 } -// Pselect implements linux syscall pselect(2). -func Pselect(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error) { +// Pselect6 implements linux syscall pselect6(2). +func Pselect6(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error) { nfds := int(args[0].Int()) // select(2) uses an int. readFDs := args[1].Pointer() writeFDs := args[2].Pointer()