From 07c388f17c039c0bb9a3fd0fd70bf5494aa7ee2c Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 7 Nov 2023 13:10:48 +0100 Subject: syscall: use fchmodat2 in Fchmodat The fchmodat2 syscall was added in Linux kernel 6.6. Mirror the implementation in golang.org/x/sys/unix.Fchmodat (CL 539635) and use fchmodat2 in Fchmodat if flags are given. It will return ENOSYS on older kernels (or EINVAL or any other bogus error in some container implementations). Also update ztypes_linux_$GOARCH.go for all linux platforms to add _AT_EMPTY_PATH. It was added to linux/types in CL 407694 but was only updated for linux/loong64 at that time. Updates #61636 Change-Id: I863d06e35cd366f1cf99052e9f77c22ab8168b3f Reviewed-on: https://go-review.googlesource.com/c/go/+/540435 Reviewed-by: Mauri de Souza Meneguzzo TryBot-Result: Gopher Robot Run-TryBot: Tobias Klauser LUCI-TryBot-Result: Go LUCI Reviewed-by: Heschi Kreinick Reviewed-by: Bryan Mills Auto-Submit: Tobias Klauser --- src/syscall/syscall_linux_mipsx.go | 1 + 1 file changed, 1 insertion(+) (limited to 'src/syscall/syscall_linux_mipsx.go') diff --git a/src/syscall/syscall_linux_mipsx.go b/src/syscall/syscall_linux_mipsx.go index 168148ab24..7253c648e7 100644 --- a/src/syscall/syscall_linux_mipsx.go +++ b/src/syscall/syscall_linux_mipsx.go @@ -13,6 +13,7 @@ const ( _SYS_clone3 = 4435 _SYS_faccessat2 = 4439 _SYS_pidfd_send_signal = 4424 + _SYS_fchmodat2 = 4452 ) func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) -- cgit v1.3-6-g1900