commit 142d1560cb5d65b66a4c0c6f427fa2f04150245f
Author: Jed Davis <jld@mozilla.com>
Date:   Wed Apr 17 13:52:26 2024 -0700

    Bug 1889045 - Update Linux sandbox syscall defs to v6.8

diff --git a/sandbox/linux/system_headers/arm64_linux_syscalls.h b/sandbox/linux/system_headers/arm64_linux_syscalls.h
--- a/sandbox/linux/system_headers/arm64_linux_syscalls.h
+++ b/sandbox/linux/system_headers/arm64_linux_syscalls.h
@@ -1,21 +1,32 @@
 // Copyright 2014 The Chromium Authors
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+/* Constructed by running:
+ * curl -vsSL https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/include/uapi/asm-generic/unistd.h?h=v6.8
+ *   | gcc -D__BITS_PER_LONG=64 -D__ARCH_WANT_STAT64 -D__ARCH_WANT_SET_GET_RLIMIT -D__ARCH_WANT_SYS_CLONE3 -D__ARCH_WANT_RENAMEAT -E -dD -
+ *   | grep __NR | grep -vE '__NR_arch_specific_syscall|__NR_syscalls' | sort -n -k 3 | sed -e 's/__NR3264/__NR/g'
+ *   | awk '{ if ($2 != $3) { print "#if !defined(" $2 ")\n#define " $2 " " $3 "\n#endif\n"; } }
+ * */
+
 #ifndef SANDBOX_LINUX_SYSTEM_HEADERS_ARM64_LINUX_SYSCALLS_H_
 #define SANDBOX_LINUX_SYSTEM_HEADERS_ARM64_LINUX_SYSCALLS_H_
 
 #include <asm-generic/unistd.h>
 
 #if !defined(__NR_io_setup)
 #define __NR_io_setup 0
 #endif
 
+#if !defined(__NR_newfstatat)
+#define __NR_newfstatat __NR_fstatat
+#endif
+
 #if !defined(__NR_io_destroy)
 #define __NR_io_destroy 1
 #endif
 
 #if !defined(__NR_io_submit)
 #define __NR_io_submit 2
 #endif
 
@@ -318,18 +329,18 @@
 #if !defined(__NR_tee)
 #define __NR_tee 77
 #endif
 
 #if !defined(__NR_readlinkat)
 #define __NR_readlinkat 78
 #endif
 
-#if !defined(__NR_newfstatat)
-#define __NR_newfstatat 79
+#if !defined(__NR_fstatat)
+#define __NR_fstatat 79
 #endif
 
 #if !defined(__NR_fstat)
 #define __NR_fstat 80
 #endif
 
 #if !defined(__NR_sync)
 #define __NR_sync 81
diff --git a/sandbox/linux/system_headers/arm_linux_syscalls.h b/sandbox/linux/system_headers/arm_linux_syscalls.h
--- a/sandbox/linux/system_headers/arm_linux_syscalls.h
+++ b/sandbox/linux/system_headers/arm_linux_syscalls.h
@@ -1,13 +1,18 @@
 // Copyright 2012 The Chromium Authors
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Generated from the Linux kernel's calls.S.
+/* Constructed by running:
+ * curl -vsSL https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/arch/arm/tools/syscall.tbl?h=v6.8
+ *   | grep -vE '^#|^$'
+ *   | awk '{ if ($2 != "oabi") { print "#if !defined(__NR_" $3 ")\n#define __NR_" $3 " (__NR_SYSCALL_BASE+" $1 ")\n#endif\n"; } }'
+ * */
+
 #ifndef SANDBOX_LINUX_SYSTEM_HEADERS_ARM_LINUX_SYSCALLS_H_
 #define SANDBOX_LINUX_SYSTEM_HEADERS_ARM_LINUX_SYSCALLS_H_
 
 #if !defined(__arm__) || !defined(__ARM_EABI__)
 #error "Including header on wrong architecture"
 #endif
 
 #if !defined(__NR_SYSCALL_BASE)
@@ -1200,20 +1205,16 @@
 #if !defined(__NR_splice)
 #define __NR_splice (__NR_SYSCALL_BASE+340)
 #endif
 
 #if !defined(__NR_arm_sync_file_range)
 #define __NR_arm_sync_file_range (__NR_SYSCALL_BASE+341)
 #endif
 
-#if !defined(__NR_sync_file_range2)
-#define __NR_sync_file_range2 (__NR_SYSCALL_BASE+341)
-#endif
-
 #if !defined(__NR_tee)
 #define __NR_tee (__NR_SYSCALL_BASE+342)
 #endif
 
 #if !defined(__NR_vmsplice)
 #define __NR_vmsplice (__NR_SYSCALL_BASE+343)
 #endif
 
diff --git a/sandbox/linux/system_headers/x86_32_linux_syscalls.h b/sandbox/linux/system_headers/x86_32_linux_syscalls.h
--- a/sandbox/linux/system_headers/x86_32_linux_syscalls.h
+++ b/sandbox/linux/system_headers/x86_32_linux_syscalls.h
@@ -1,13 +1,18 @@
 // Copyright 2012 The Chromium Authors
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Generated from the Linux kernel's syscall_32.tbl.
+/* Constructed by running:
+ * curl -vsSL https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/arch/x86/entry/syscalls/syscall_32.tbl?h=v6.8
+ *   | grep -vE '^#|^$'
+ *   | awk '{ if ($2 == "i386") { print "#if !defined(__NR_" $3 ")\n#define __NR_" $3 " " $1 "\n#endif\n"; } }'
+ * */
+
 #ifndef SANDBOX_LINUX_SYSTEM_HEADERS_X86_32_LINUX_SYSCALLS_H_
 #define SANDBOX_LINUX_SYSTEM_HEADERS_X86_32_LINUX_SYSCALLS_H_
 
 #if !defined(__i386__)
 #error "Including header on wrong architecture"
 #endif
 
 #if !defined(__NR_restart_syscall)
diff --git a/sandbox/linux/system_headers/x86_64_linux_syscalls.h b/sandbox/linux/system_headers/x86_64_linux_syscalls.h
--- a/sandbox/linux/system_headers/x86_64_linux_syscalls.h
+++ b/sandbox/linux/system_headers/x86_64_linux_syscalls.h
@@ -1,13 +1,18 @@
 // Copyright 2012 The Chromium Authors
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Generated from the Linux kernel's syscall_64.tbl.
+/* Constructed by running:
+ * curl -vsSL https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/arch/x86/entry/syscalls/syscall_64.tbl?h=v6.8
+ *   | grep -vE '^#|^$'
+ *   | awk '{ if ($2 != "x32") { print "#if !defined(__NR_" $3 ")\n#define __NR_" $3 " " $1 "\n#endif\n"; } }'
+ * */
+
 #ifndef SANDBOX_LINUX_SYSTEM_HEADERS_X86_64_LINUX_SYSCALLS_H_
 #define SANDBOX_LINUX_SYSTEM_HEADERS_X86_64_LINUX_SYSCALLS_H_
 
 #if !defined(__x86_64__)
 #error "Including header on wrong architecture"
 #endif
 
 #if !defined(__NR_read)
