Skip to contentSkip to conversation

linux-user: update syscall_nr headers to Linux 5.9-rc7

PATCH Applied Laurent Vivier 4 participants 9 messages Sep 30, 2020 – Oct 26, 2020 RISC-V

lore
Share & tools
lore
#0 lore raw

cover linux-user: update syscall_nr headers to Linux 5.9-rc7

All the changes have been done using:

scripts/gensyscalls.sh, scripts/update-mips-syscall-args.sh and scripts/update-syscalltbl.sh

I've checked syscall_nr.h generated from syscall.tbl are always correctly generated (there have been massive changes in x86 targets).

The series also removes _sysctl from syscall.c as it has been removed from the kernel (and we didn't emulate it correctly)

Laurent Vivier (4):
linux-user: update syscall_nr.h to Linux 5.9-rc7
linux-user: update mips/syscall-args-o32.c.inc to Linux 5.9-rc7
linux-user: update syscall.tbl to Linux 5.9-rc7
linux-user: remove _sysctl

 linux-user/aarch64/syscall_nr.h        |   7 +-
 linux-user/alpha/syscall.tbl           |   4 +-
 linux-user/arm/syscall.tbl             |   4 +-
 linux-user/hppa/syscall.tbl            |   8 +-
 linux-user/i386/syscall_32.tbl         | 820 +++++++++++++------------
 linux-user/m68k/syscall.tbl            |   4 +-
 linux-user/microblaze/syscall.tbl      |   4 +-
 linux-user/mips/syscall-args-o32.c.inc |   4 +
 linux-user/mips/syscall_o32.tbl        |   8 +-
 linux-user/mips64/syscall_n32.tbl      |   8 +-
 linux-user/mips64/syscall_n64.tbl      |   4 +-
 linux-user/nios2/syscall_nr.h          |   7 +-
 linux-user/openrisc/syscall_nr.h       |   8 +-
 linux-user/ppc/syscall.tbl             |  30 +-
 linux-user/riscv/syscall32_nr.h        |   8 +-
 linux-user/riscv/syscall64_nr.h        |   8 +-
 linux-user/s390x/syscall.tbl           |   8 +-
 linux-user/sh4/syscall.tbl             |   4 +-
 linux-user/sparc/syscall.tbl           |   8 +-
 linux-user/sparc64/syscall.tbl         |   8 +-
 linux-user/syscall.c                   |   6 -
 linux-user/x86_64/syscall_64.tbl       | 742 +++++++++++-----------
 linux-user/xtensa/syscall.tbl          |   4 +-
 scripts/gensyscalls.sh                 |   3 +-
 24 files changed, 889 insertions(+), 830 deletions(-)
Signature · 1 line
2.26.2
#1 lore raw

PATCH 1/4 linux-user: update syscall_nr.h to Linux 5.9-rc7

Update gensyscalls.sh not to generate an empty line at the end of the file

And then automatically update syscall_nr.h running scripts/gensyscalls.sh

---
 linux-user/aarch64/syscall_nr.h  | 7 +++++--
 linux-user/nios2/syscall_nr.h    | 7 +++++--
 linux-user/openrisc/syscall_nr.h | 8 ++++++--
 linux-user/riscv/syscall32_nr.h  | 8 +++++++-
 linux-user/riscv/syscall64_nr.h  | 8 +++++++-
 scripts/gensyscalls.sh           | 3 +--
 6 files changed, 31 insertions(+), 10 deletions(-)
linux-user/aarch64/syscall_nr.h +5 -2
index 85de000b2490..6fd5b331e780 100644
@@ -298,7 +298,10 @@
 #define TARGET_NR_fspick 433
 #define TARGET_NR_pidfd_open 434
 #define TARGET_NR_clone3 435
-#define TARGET_NR_syscalls 436
+#define TARGET_NR_close_range 436
+#define TARGET_NR_openat2 437
+#define TARGET_NR_pidfd_getfd 438
+#define TARGET_NR_faccessat2 439
+#define TARGET_NR_syscalls 440
 
 #endif /* LINUX_USER_AARCH64_SYSCALL_NR_H */
-
linux-user/nios2/syscall_nr.h +5 -2
index 32d485dc9ae8..e37f40179bf3 100644
@@ -318,7 +318,10 @@
 #define TARGET_NR_fsmount 432
 #define TARGET_NR_fspick 433
 #define TARGET_NR_pidfd_open 434
-#define TARGET_NR_syscalls 436
+#define TARGET_NR_close_range 436
+#define TARGET_NR_openat2 437
+#define TARGET_NR_pidfd_getfd 438
+#define TARGET_NR_faccessat2 439
+#define TARGET_NR_syscalls 440
 
 #endif /* LINUX_USER_NIOS2_SYSCALL_NR_H */
-
linux-user/openrisc/syscall_nr.h +6 -2
index 340383beb2c6..a8fc0295109a 100644
@@ -318,7 +318,11 @@
 #define TARGET_NR_fsmount 432
 #define TARGET_NR_fspick 433
 #define TARGET_NR_pidfd_open 434
-#define TARGET_NR_syscalls 436
+#define TARGET_NR_clone3 435
+#define TARGET_NR_close_range 436
+#define TARGET_NR_openat2 437
+#define TARGET_NR_pidfd_getfd 438
+#define TARGET_NR_faccessat2 439
+#define TARGET_NR_syscalls 440
 
 #endif /* LINUX_USER_OPENRISC_SYSCALL_NR_H */
-
linux-user/riscv/syscall32_nr.h +7 -1
index 4fef73e954da..079b804daef5 100644
@@ -1,5 +1,7 @@
 /*
  * This file contains the system call numbers.
+ * Do not modify.
+ * This file is generated by scripts/gensyscalls.sh
  */
 #ifndef LINUX_USER_RISCV_SYSCALL32_NR_H
 #define LINUX_USER_RISCV_SYSCALL32_NR_H
@@ -290,6 +292,10 @@
 #define TARGET_NR_fspick 433
 #define TARGET_NR_pidfd_open 434
 #define TARGET_NR_clone3 435
-#define TARGET_NR_syscalls 436
+#define TARGET_NR_close_range 436
+#define TARGET_NR_openat2 437
+#define TARGET_NR_pidfd_getfd 438
+#define TARGET_NR_faccessat2 439
+#define TARGET_NR_syscalls 440
 
 #endif /* LINUX_USER_RISCV_SYSCALL32_NR_H */
linux-user/riscv/syscall64_nr.h +7 -1
index cc82f3244f55..d54224ccec64 100644
@@ -1,5 +1,7 @@
 /*
  * This file contains the system call numbers.
+ * Do not modify.
+ * This file is generated by scripts/gensyscalls.sh
  */
 #ifndef LINUX_USER_RISCV_SYSCALL64_NR_H
 #define LINUX_USER_RISCV_SYSCALL64_NR_H
@@ -296,6 +298,10 @@
 #define TARGET_NR_fspick 433
 #define TARGET_NR_pidfd_open 434
 #define TARGET_NR_clone3 435
-#define TARGET_NR_syscalls 436
+#define TARGET_NR_close_range 436
+#define TARGET_NR_openat2 437
+#define TARGET_NR_pidfd_getfd 438
+#define TARGET_NR_faccessat2 439
+#define TARGET_NR_syscalls 440
 
 #endif /* LINUX_USER_RISCV_SYSCALL64_NR_H */
scripts/gensyscalls.sh +1 -2
index b7b8456f6312..bba9fb052c47 100755
@@ -86,8 +86,7 @@ generate_syscall_nr()
     read_includes $arch $bits | filter_defines | rename_defines | \
                                 evaluate_values | sort -n -k 3
     echo
-    echo "#endif /* ${guard} */"
-    echo) > "$file"
+    echo "#endif /* ${guard} */") > "$file"
 }
 
 mkdir "$TMP/asm"
Signature · 1 line
2.26.2
Reviewed-by on v1 1/4
#2 lore raw

Re: [PATCH 1/4] linux-user: update syscall_nr.h to Linux 5.9-rc7

Quoted 6 lines · Laurent Vivier

Update gensyscalls.sh not to generate an empty line at the end of the file

And then automatically update syscall_nr.h running scripts/gensyscalls.sh

For the RISC-V part:

Alistair

Quoted 127 lines
---
 linux-user/aarch64/syscall_nr.h  | 7 +++++--
 linux-user/nios2/syscall_nr.h    | 7 +++++--
 linux-user/openrisc/syscall_nr.h | 8 ++++++--
 linux-user/riscv/syscall32_nr.h  | 8 +++++++-
 linux-user/riscv/syscall64_nr.h  | 8 +++++++-
 scripts/gensyscalls.sh           | 3 +--
 6 files changed, 31 insertions(+), 10 deletions(-)
linux-user/aarch64/syscall_nr.h +5 -2
index 85de000b2490..6fd5b331e780 100644
@@ -298,7 +298,10 @@
 #define TARGET_NR_fspick 433
 #define TARGET_NR_pidfd_open 434
 #define TARGET_NR_clone3 435
-#define TARGET_NR_syscalls 436
+#define TARGET_NR_close_range 436
+#define TARGET_NR_openat2 437
+#define TARGET_NR_pidfd_getfd 438
+#define TARGET_NR_faccessat2 439
+#define TARGET_NR_syscalls 440
 
 #endif /* LINUX_USER_AARCH64_SYSCALL_NR_H */
-
linux-user/nios2/syscall_nr.h +5 -2
index 32d485dc9ae8..e37f40179bf3 100644
@@ -318,7 +318,10 @@
 #define TARGET_NR_fsmount 432
 #define TARGET_NR_fspick 433
 #define TARGET_NR_pidfd_open 434
-#define TARGET_NR_syscalls 436
+#define TARGET_NR_close_range 436
+#define TARGET_NR_openat2 437
+#define TARGET_NR_pidfd_getfd 438
+#define TARGET_NR_faccessat2 439
+#define TARGET_NR_syscalls 440
 
 #endif /* LINUX_USER_NIOS2_SYSCALL_NR_H */
-
linux-user/openrisc/syscall_nr.h +6 -2
index 340383beb2c6..a8fc0295109a 100644
@@ -318,7 +318,11 @@
 #define TARGET_NR_fsmount 432
 #define TARGET_NR_fspick 433
 #define TARGET_NR_pidfd_open 434
-#define TARGET_NR_syscalls 436
+#define TARGET_NR_clone3 435
+#define TARGET_NR_close_range 436
+#define TARGET_NR_openat2 437
+#define TARGET_NR_pidfd_getfd 438
+#define TARGET_NR_faccessat2 439
+#define TARGET_NR_syscalls 440
 
 #endif /* LINUX_USER_OPENRISC_SYSCALL_NR_H */
-
linux-user/riscv/syscall32_nr.h +7 -1
index 4fef73e954da..079b804daef5 100644
@@ -1,5 +1,7 @@
 /*
  * This file contains the system call numbers.
+ * Do not modify.
+ * This file is generated by scripts/gensyscalls.sh
  */
 #ifndef LINUX_USER_RISCV_SYSCALL32_NR_H
 #define LINUX_USER_RISCV_SYSCALL32_NR_H
@@ -290,6 +292,10 @@
 #define TARGET_NR_fspick 433
 #define TARGET_NR_pidfd_open 434
 #define TARGET_NR_clone3 435
-#define TARGET_NR_syscalls 436
+#define TARGET_NR_close_range 436
+#define TARGET_NR_openat2 437
+#define TARGET_NR_pidfd_getfd 438
+#define TARGET_NR_faccessat2 439
+#define TARGET_NR_syscalls 440
 
 #endif /* LINUX_USER_RISCV_SYSCALL32_NR_H */
linux-user/riscv/syscall64_nr.h +7 -1
index cc82f3244f55..d54224ccec64 100644
@@ -1,5 +1,7 @@
 /*
  * This file contains the system call numbers.
+ * Do not modify.
+ * This file is generated by scripts/gensyscalls.sh
  */
 #ifndef LINUX_USER_RISCV_SYSCALL64_NR_H
 #define LINUX_USER_RISCV_SYSCALL64_NR_H
@@ -296,6 +298,10 @@
 #define TARGET_NR_fspick 433
 #define TARGET_NR_pidfd_open 434
 #define TARGET_NR_clone3 435
-#define TARGET_NR_syscalls 436
+#define TARGET_NR_close_range 436
+#define TARGET_NR_openat2 437
+#define TARGET_NR_pidfd_getfd 438
+#define TARGET_NR_faccessat2 439
+#define TARGET_NR_syscalls 440
 
 #endif /* LINUX_USER_RISCV_SYSCALL64_NR_H */
scripts/gensyscalls.sh +1 -3
index b7b8456f6312..bba9fb052c47 100755
@@ -86,8 +86,7 @@ generate_syscall_nr()
     read_includes $arch $bits | filter_defines | rename_defines | \
                                 evaluate_values | sort -n -k 3
     echo
-    echo "#endif /* ${guard} */"
-    echo) > "$file"
+    echo "#endif /* ${guard} */") > "$file"
 }
 
 mkdir "$TMP/asm"
--

2.26.2

#3 lore raw

PATCH 2/4 linux-user: update mips/syscall-args-o32.c.inc to Linux 5.9-rc7

In reply to Laurent Vivier

Updated running scripts/update-mips-syscall-args.sh

---
 linux-user/mips/syscall-args-o32.c.inc | 4 ++++
 1 file changed, 4 insertions(+)
linux-user/mips/syscall-args-o32.c.inc +4 -0
index 0ad35857b4e4..92ee4f921ec7 100644
@@ -434,3 +434,7 @@
     [ 433] = 3, /* fspick */
     [ 434] = 2, /* pidfd_open */
     [ 435] = 2, /* clone3 */
+    [ 436] = 3, /* close_range */
+    [ 437] = 4, /* openat2 */
+    [ 438] = 3, /* pidfd_getfd */
+    [ 439] = 4, /* faccessat2 */
Signature · 1 line
2.26.2
Reviewed-by on v1 2/4
#4 lore raw

Re: [PATCH 2/4] linux-user: update mips/syscall-args-o32.c.inc to Linux 5.9-rc7

Quoted 13 lines · Laurent Vivier

Updated running scripts/update-mips-syscall-args.sh

---
  linux-user/mips/syscall-args-o32.c.inc | 4 ++++
  1 file changed, 4 insertions(+)
linux-user/mips/syscall-args-o32.c.inc +0 -0
index 0ad35857b4e4..92ee4f921ec7 100644

linux-user/mips/syscall-args-o32.c.inc line 440

Quoted 7 lines
linux-user/mips/syscall-args-o32.c.inc +4 -0
@@ -434,3 +434,7 @@
      [ 433] = 3, /* fspick */
      [ 434] = 2, /* pidfd_open */
      [ 435] = 2, /* clone3 */
+    [ 436] = 3, /* close_range */
+    [ 437] = 4, /* openat2 */
+    [ 438] = 3, /* pidfd_getfd */
+    [ 439] = 4, /* faccessat2 */
#5 lore raw

PATCH 3/4 linux-user: update syscall.tbl to Linux 5.9-rc7

In reply to Laurent Vivier

Updated running scripts/update-syscalltbl.sh

---
 linux-user/alpha/syscall.tbl      |   4 +-
 linux-user/arm/syscall.tbl        |   4 +-
 linux-user/hppa/syscall.tbl       |   8 +-
 linux-user/i386/syscall_32.tbl    | 820 +++++++++++++++---------------
 linux-user/m68k/syscall.tbl       |   4 +-
 linux-user/microblaze/syscall.tbl |   4 +-
 linux-user/mips/syscall_o32.tbl   |   8 +-
 linux-user/mips64/syscall_n32.tbl |   8 +-
 linux-user/mips64/syscall_n64.tbl |   4 +-
 linux-user/ppc/syscall.tbl        |  30 +-
 linux-user/s390x/syscall.tbl      |   8 +-
 linux-user/sh4/syscall.tbl        |   4 +-
 linux-user/sparc/syscall.tbl      |   8 +-
 linux-user/sparc64/syscall.tbl    |   8 +-
 linux-user/x86_64/syscall_64.tbl  | 742 +++++++++++++--------------
 linux-user/xtensa/syscall.tbl     |   4 +-
 16 files changed, 854 insertions(+), 814 deletions(-)
linux-user/alpha/syscall.tbl +3 -1
index 36d42da7466a..ec8bed9e7b75 100644
@@ -249,7 +249,7 @@
 316	common	mlockall			sys_mlockall
 317	common	munlockall			sys_munlockall
 318	common	sysinfo				sys_sysinfo
-319	common	_sysctl				sys_sysctl
+319	common	_sysctl				sys_ni_syscall
 # 320 was sys_idle
 321	common	oldumount			sys_oldumount
 322	common	swapon				sys_swapon
@@ -475,5 +475,7 @@
 543	common	fspick				sys_fspick
 544	common	pidfd_open			sys_pidfd_open
 # 545 reserved for clone3
+546	common	close_range			sys_close_range
 547	common	openat2				sys_openat2
 548	common	pidfd_getfd			sys_pidfd_getfd
+549	common	faccessat2			sys_faccessat2
linux-user/arm/syscall.tbl +3 -1
index 4d1cf74a2caa..171077cbf419 100644
@@ -162,7 +162,7 @@
 146	common	writev			sys_writev
 147	common	getsid			sys_getsid
 148	common	fdatasync		sys_fdatasync
-149	common	_sysctl			sys_sysctl
+149	common	_sysctl			sys_ni_syscall
 150	common	mlock			sys_mlock
 151	common	munlock			sys_munlock
 152	common	mlockall		sys_mlockall
@@ -449,5 +449,7 @@
 433	common	fspick				sys_fspick
 434	common	pidfd_open			sys_pidfd_open
 435	common	clone3				sys_clone3
+436	common	close_range			sys_close_range
 437	common	openat2				sys_openat2
 438	common	pidfd_getfd			sys_pidfd_getfd
+439	common	faccessat2			sys_faccessat2
linux-user/hppa/syscall.tbl +5 -3
index 52a15f5cd130..def64d221cd4 100644
@@ -163,7 +163,7 @@
 146	common	writev			sys_writev			compat_sys_writev
 147	common	getsid			sys_getsid
 148	common	fdatasync		sys_fdatasync
-149	common	_sysctl			sys_sysctl			compat_sys_sysctl
+149	common	_sysctl			sys_ni_syscall
 150	common	mlock			sys_mlock
 151	common	munlock			sys_munlock
 152	common	mlockall		sys_mlockall
@@ -198,8 +198,8 @@
 178	common	rt_sigqueueinfo		sys_rt_sigqueueinfo		compat_sys_rt_sigqueueinfo
 179	common	rt_sigsuspend		sys_rt_sigsuspend		compat_sys_rt_sigsuspend
 180	common	chown			sys_chown
-181	common	setsockopt		sys_setsockopt			compat_sys_setsockopt
-182	common	getsockopt		sys_getsockopt			compat_sys_getsockopt
+181	common	setsockopt		sys_setsockopt			sys_setsockopt
+182	common	getsockopt		sys_getsockopt			sys_getsockopt
 183	common	sendmsg			sys_sendmsg			compat_sys_sendmsg
 184	common	recvmsg			sys_recvmsg			compat_sys_recvmsg
 185	common	semop			sys_semop
@@ -433,5 +433,7 @@
 433	common	fspick				sys_fspick
 434	common	pidfd_open			sys_pidfd_open
 435	common	clone3				sys_clone3_wrapper
+436	common	close_range			sys_close_range
 437	common	openat2				sys_openat2
 438	common	pidfd_getfd			sys_pidfd_getfd
+439	common	faccessat2			sys_faccessat2
linux-user/i386/syscall_32.tbl +411 -409

845 lines not on this page · raw message

linux-user/m68k/syscall.tbl +3 -1
index f4f49fcb76d0..81fc799d8392 100644
@@ -156,7 +156,7 @@
 146	common	writev				sys_writev
 147	common	getsid				sys_getsid
 148	common	fdatasync			sys_fdatasync
-149	common	_sysctl				sys_sysctl
+149	common	_sysctl				sys_ni_syscall
 150	common	mlock				sys_mlock
 151	common	munlock				sys_munlock
 152	common	mlockall			sys_mlockall
@@ -435,5 +435,7 @@
 433	common	fspick				sys_fspick
 434	common	pidfd_open			sys_pidfd_open
 435	common	clone3				__sys_clone3
+436	common	close_range			sys_close_range
 437	common	openat2				sys_openat2
 438	common	pidfd_getfd			sys_pidfd_getfd
+439	common	faccessat2			sys_faccessat2
linux-user/microblaze/syscall.tbl +3 -1
index 4c67b11f9c9e..b4e263916f41 100644
@@ -156,7 +156,7 @@
 146	common	writev				sys_writev
 147	common	getsid				sys_getsid
 148	common	fdatasync			sys_fdatasync
-149	common	_sysctl				sys_sysctl
+149	common	_sysctl				sys_ni_syscall
 150	common	mlock				sys_mlock
 151	common	munlock				sys_munlock
 152	common	mlockall			sys_mlockall
@@ -441,5 +441,7 @@
 433	common	fspick				sys_fspick
 434	common	pidfd_open			sys_pidfd_open
 435	common	clone3				sys_clone3
+436	common	close_range			sys_close_range
 437	common	openat2				sys_openat2
 438	common	pidfd_getfd			sys_pidfd_getfd
+439	common	faccessat2			sys_faccessat2
linux-user/mips/syscall_o32.tbl +5 -3
index ac586774c980..195b43cf27c8 100644
@@ -164,7 +164,7 @@
 150	o32	unused150			sys_ni_syscall
 151	o32	getsid				sys_getsid
 152	o32	fdatasync			sys_fdatasync
-153	o32	_sysctl				sys_sysctl			compat_sys_sysctl
+153	o32	_sysctl				sys_ni_syscall
 154	o32	mlock				sys_mlock
 155	o32	munlock				sys_munlock
 156	o32	mlockall			sys_mlockall
@@ -184,7 +184,7 @@
 170	o32	connect				sys_connect
 171	o32	getpeername			sys_getpeername
 172	o32	getsockname			sys_getsockname
-173	o32	getsockopt			sys_getsockopt			compat_sys_getsockopt
+173	o32	getsockopt			sys_getsockopt			sys_getsockopt
 174	o32	listen				sys_listen
 175	o32	recv				sys_recv			compat_sys_recv
 176	o32	recvfrom			sys_recvfrom			compat_sys_recvfrom
@@ -192,7 +192,7 @@
 178	o32	send				sys_send
 179	o32	sendmsg				sys_sendmsg			compat_sys_sendmsg
 180	o32	sendto				sys_sendto
-181	o32	setsockopt			sys_setsockopt			compat_sys_setsockopt
+181	o32	setsockopt			sys_setsockopt			sys_setsockopt
 182	o32	shutdown			sys_shutdown
 183	o32	socket				sys_socket
 184	o32	socketpair			sys_socketpair
@@ -423,5 +423,7 @@
 433	o32	fspick				sys_fspick
 434	o32	pidfd_open			sys_pidfd_open
 435	o32	clone3				__sys_clone3
+436	o32	close_range			sys_close_range
 437	o32	openat2				sys_openat2
 438	o32	pidfd_getfd			sys_pidfd_getfd
+439	o32	faccessat2			sys_faccessat2
linux-user/mips64/syscall_n32.tbl +5 -3
index 1f9e8ad636cc..f9df9edb67a4 100644
@@ -60,8 +60,8 @@
 50	n32	getsockname			sys_getsockname
 51	n32	getpeername			sys_getpeername
 52	n32	socketpair			sys_socketpair
-53	n32	setsockopt			compat_sys_setsockopt
-54	n32	getsockopt			compat_sys_getsockopt
+53	n32	setsockopt			sys_setsockopt
+54	n32	getsockopt			sys_getsockopt
 55	n32	clone				__sys_clone
 56	n32	fork				__sys_fork
 57	n32	execve				compat_sys_execve
@@ -159,7 +159,7 @@
 149	n32	munlockall			sys_munlockall
 150	n32	vhangup				sys_vhangup
 151	n32	pivot_root			sys_pivot_root
-152	n32	_sysctl				compat_sys_sysctl
+152	n32	_sysctl				sys_ni_syscall
 153	n32	prctl				sys_prctl
 154	n32	adjtimex			sys_adjtimex_time32
 155	n32	setrlimit			compat_sys_setrlimit
@@ -374,5 +374,7 @@
 433	n32	fspick				sys_fspick
 434	n32	pidfd_open			sys_pidfd_open
 435	n32	clone3				__sys_clone3
+436	n32	close_range			sys_close_range
 437	n32	openat2				sys_openat2
 438	n32	pidfd_getfd			sys_pidfd_getfd
+439	n32	faccessat2			sys_faccessat2
linux-user/mips64/syscall_n64.tbl +3 -1
index c0b9d802dbf6..557f9954a2b9 100644
@@ -159,7 +159,7 @@
 149	n64	munlockall			sys_munlockall
 150	n64	vhangup				sys_vhangup
 151	n64	pivot_root			sys_pivot_root
-152	n64	_sysctl				sys_sysctl
+152	n64	_sysctl				sys_ni_syscall
 153	n64	prctl				sys_prctl
 154	n64	adjtimex			sys_adjtimex
 155	n64	setrlimit			sys_setrlimit
@@ -350,5 +350,7 @@
 433	n64	fspick				sys_fspick
 434	n64	pidfd_open			sys_pidfd_open
 435	n64	clone3				__sys_clone3
+436	n64	close_range			sys_close_range
 437	n64	openat2				sys_openat2
 438	n64	pidfd_getfd			sys_pidfd_getfd
+439	n64	faccessat2			sys_faccessat2
linux-user/ppc/syscall.tbl +20 -10
index 35b61bfc1b1a..c2d737ff2e7b 100644
@@ -9,7 +9,9 @@
 #
 0	nospu	restart_syscall			sys_restart_syscall
 1	nospu	exit				sys_exit
-2	nospu	fork				ppc_fork
+2	32	fork				ppc_fork			sys_fork
+2	64	fork				sys_fork
+2	spu	fork				sys_ni_syscall
 3	common	read				sys_read
 4	common	write				sys_write
 5	common	open				sys_open			compat_sys_open
@@ -158,7 +160,9 @@
 119	32	sigreturn			sys_sigreturn			compat_sys_sigreturn
 119	64	sigreturn			sys_ni_syscall
 119	spu	sigreturn			sys_ni_syscall
-120	nospu	clone				ppc_clone
+120	32	clone				ppc_clone			sys_clone
+120	64	clone				sys_clone
+120	spu	clone				sys_ni_syscall
 121	common	setdomainname			sys_setdomainname
 122	common	uname				sys_newuname
 123	common	modify_ldt			sys_ni_syscall
@@ -193,7 +197,7 @@
 146	common	writev				sys_writev			compat_sys_writev
 147	common	getsid				sys_getsid
 148	common	fdatasync			sys_fdatasync
-149	nospu	_sysctl				sys_sysctl			compat_sys_sysctl
+149	nospu	_sysctl				sys_ni_syscall
 150	common	mlock				sys_mlock
 151	common	munlock				sys_munlock
 152	common	mlockall			sys_mlockall
@@ -240,7 +244,9 @@
 186	spu	sendfile			sys_sendfile64
 187	common	getpmsg				sys_ni_syscall
 188	common 	putpmsg				sys_ni_syscall
-189	nospu	vfork				ppc_vfork
+189	32	vfork				ppc_vfork			sys_vfork
+189	64	vfork				sys_vfork
+189	spu	vfork				sys_ni_syscall
 190	common	ugetrlimit			sys_getrlimit			compat_sys_getrlimit
 191	common	readahead			sys_readahead			compat_sys_readahead
 192	32	mmap2				sys_mmap2			compat_sys_mmap2
@@ -316,8 +322,8 @@
 248	32	clock_nanosleep			sys_clock_nanosleep_time32
 248	64	clock_nanosleep			sys_clock_nanosleep
 248	spu	clock_nanosleep			sys_clock_nanosleep
-249	32	swapcontext			ppc_swapcontext			ppc32_swapcontext
-249	64	swapcontext			ppc64_swapcontext
+249	32	swapcontext			ppc_swapcontext			compat_sys_swapcontext
+249	64	swapcontext			sys_swapcontext
 249	spu	swapcontext			sys_ni_syscall
 250	common	tgkill				sys_tgkill
 251	32	utimes				sys_utimes_time32
@@ -427,8 +433,8 @@
 336	common	recv				sys_recv			compat_sys_recv
 337	common	recvfrom			sys_recvfrom			compat_sys_recvfrom
 338	common	shutdown			sys_shutdown
-339	common	setsockopt			sys_setsockopt			compat_sys_setsockopt
-340	common	getsockopt			sys_getsockopt			compat_sys_getsockopt
+339	common	setsockopt			sys_setsockopt			sys_setsockopt
+340	common	getsockopt			sys_getsockopt			sys_getsockopt
 341	common	sendmsg				sys_sendmsg			compat_sys_sendmsg
 342	common	recvmsg				sys_recvmsg			compat_sys_recvmsg
 343	32	recvmmsg			sys_recvmmsg_time32		compat_sys_recvmmsg_time32
@@ -456,7 +462,7 @@
 361	common	bpf				sys_bpf
 362	nospu	execveat			sys_execveat			compat_sys_execveat
 363	32	switch_endian			sys_ni_syscall
-363	64	switch_endian			ppc_switch_endian
+363	64	switch_endian			sys_switch_endian
 363	spu	switch_endian			sys_ni_syscall
 364	common	userfaultfd			sys_userfaultfd
 365	common	membarrier			sys_membarrier
@@ -516,6 +522,10 @@
 432	common	fsmount				sys_fsmount
 433	common	fspick				sys_fspick
 434	common	pidfd_open			sys_pidfd_open
-435	nospu	clone3				ppc_clone3
+435	32	clone3				ppc_clone3			sys_clone3
+435	64	clone3				sys_clone3
+435	spu	clone3				sys_ni_syscall
+436	common	close_range			sys_close_range
 437	common	openat2				sys_openat2
 438	common	pidfd_getfd			sys_pidfd_getfd
+439	common	faccessat2			sys_faccessat2
linux-user/s390x/syscall.tbl +5 -3
index bd7bd3581a0f..10456bc936fb 100644
@@ -138,7 +138,7 @@
 146  common	writev			sys_writev			compat_sys_writev
 147  common	getsid			sys_getsid			sys_getsid
 148  common	fdatasync		sys_fdatasync			sys_fdatasync
-149  common	_sysctl			sys_sysctl			compat_sys_sysctl
+149  common	_sysctl			-				-
 150  common	mlock			sys_mlock			sys_mlock
 151  common	munlock			sys_munlock			sys_munlock
 152  common	mlockall		sys_mlockall			sys_mlockall
@@ -372,8 +372,8 @@
 362  common	connect			sys_connect			sys_connect
 363  common	listen			sys_listen			sys_listen
 364  common	accept4			sys_accept4			sys_accept4
-365  common	getsockopt		sys_getsockopt			compat_sys_getsockopt
-366  common	setsockopt		sys_setsockopt			compat_sys_setsockopt
+365  common	getsockopt		sys_getsockopt			sys_getsockopt
+366  common	setsockopt		sys_setsockopt			sys_setsockopt
 367  common	getsockname		sys_getsockname			sys_getsockname
 368  common	getpeername		sys_getpeername			sys_getpeername
 369  common	sendto			sys_sendto			sys_sendto
@@ -438,5 +438,7 @@
 433  common	fspick			sys_fspick			sys_fspick
 434  common	pidfd_open		sys_pidfd_open			sys_pidfd_open
 435  common	clone3			sys_clone3			sys_clone3
+436  common	close_range		sys_close_range			sys_close_range
 437  common	openat2			sys_openat2			sys_openat2
 438  common	pidfd_getfd		sys_pidfd_getfd			sys_pidfd_getfd
+439  common	faccessat2		sys_faccessat2			sys_faccessat2
linux-user/sh4/syscall.tbl +3 -1
index c7a30fcd135f..ae0a00beea5f 100644
@@ -156,7 +156,7 @@
 146	common	writev				sys_writev
 147	common	getsid				sys_getsid
 148	common	fdatasync			sys_fdatasync
-149	common	_sysctl				sys_sysctl
+149	common	_sysctl				sys_ni_syscall
 150	common	mlock				sys_mlock
 151	common	munlock				sys_munlock
 152	common	mlockall			sys_mlockall
@@ -438,5 +438,7 @@
 433	common	fspick				sys_fspick
 434	common	pidfd_open			sys_pidfd_open
 # 435 reserved for clone3
+436	common	close_range			sys_close_range
 437	common	openat2				sys_openat2
 438	common	pidfd_getfd			sys_pidfd_getfd
+439	common	faccessat2			sys_faccessat2
linux-user/sparc/syscall.tbl +5 -3
index f13615ecdecc..4af114e84f20 100644
@@ -147,7 +147,7 @@
 115	32	getgroups32		sys_getgroups
 116	common	gettimeofday		sys_gettimeofday		compat_sys_gettimeofday
 117	common	getrusage		sys_getrusage			compat_sys_getrusage
-118	common	getsockopt		sys_getsockopt			compat_sys_getsockopt
+118	common	getsockopt		sys_getsockopt			sys_getsockopt
 119	common	getcwd			sys_getcwd
 120	common	readv			sys_readv			compat_sys_readv
 121	common	writev			sys_writev			compat_sys_writev
@@ -300,7 +300,7 @@
 249	64	nanosleep		sys_nanosleep
 250	32	mremap			sys_mremap
 250	64	mremap			sys_64_mremap
-251	common	_sysctl			sys_sysctl			compat_sys_sysctl
+251	common	_sysctl			sys_ni_syscall
 252	common	getsid			sys_getsid
 253	common	fdatasync		sys_fdatasync
 254	32	nfsservctl		sys_ni_syscall			sys_nis_syscall
@@ -425,7 +425,7 @@
 352	common	userfaultfd		sys_userfaultfd
 353	common	bind			sys_bind
 354	common	listen			sys_listen
-355	common	setsockopt		sys_setsockopt			compat_sys_setsockopt
+355	common	setsockopt		sys_setsockopt			sys_setsockopt
 356	common	mlock2			sys_mlock2
 357	common	copy_file_range		sys_copy_file_range
 358	common	preadv2			sys_preadv2			compat_sys_preadv2
@@ -481,5 +481,7 @@
 433	common	fspick				sys_fspick
 434	common	pidfd_open			sys_pidfd_open
 # 435 reserved for clone3
+436	common	close_range			sys_close_range
 437	common	openat2			sys_openat2
 438	common	pidfd_getfd			sys_pidfd_getfd
+439	common	faccessat2			sys_faccessat2
linux-user/sparc64/syscall.tbl +5 -3
index f13615ecdecc..4af114e84f20 100644
@@ -147,7 +147,7 @@
 115	32	getgroups32		sys_getgroups
 116	common	gettimeofday		sys_gettimeofday		compat_sys_gettimeofday
 117	common	getrusage		sys_getrusage			compat_sys_getrusage
-118	common	getsockopt		sys_getsockopt			compat_sys_getsockopt
+118	common	getsockopt		sys_getsockopt			sys_getsockopt
 119	common	getcwd			sys_getcwd
 120	common	readv			sys_readv			compat_sys_readv
 121	common	writev			sys_writev			compat_sys_writev
@@ -300,7 +300,7 @@
 249	64	nanosleep		sys_nanosleep
 250	32	mremap			sys_mremap
 250	64	mremap			sys_64_mremap
-251	common	_sysctl			sys_sysctl			compat_sys_sysctl
+251	common	_sysctl			sys_ni_syscall
 252	common	getsid			sys_getsid
 253	common	fdatasync		sys_fdatasync
 254	32	nfsservctl		sys_ni_syscall			sys_nis_syscall
@@ -425,7 +425,7 @@
 352	common	userfaultfd		sys_userfaultfd
 353	common	bind			sys_bind
 354	common	listen			sys_listen
-355	common	setsockopt		sys_setsockopt			compat_sys_setsockopt
+355	common	setsockopt		sys_setsockopt			sys_setsockopt
 356	common	mlock2			sys_mlock2
 357	common	copy_file_range		sys_copy_file_range
 358	common	preadv2			sys_preadv2			compat_sys_preadv2
@@ -481,5 +481,7 @@
 433	common	fspick				sys_fspick
 434	common	pidfd_open			sys_pidfd_open
 # 435 reserved for clone3
+436	common	close_range			sys_close_range
 437	common	openat2			sys_openat2
 438	common	pidfd_getfd			sys_pidfd_getfd
+439	common	faccessat2			sys_faccessat2
linux-user/x86_64/syscall_64.tbl +372 -370

768 lines not on this page · raw message

linux-user/xtensa/syscall.tbl +3 -1
index 85a9ab1bc04d..6276e3c2d3fc 100644
@@ -222,7 +222,7 @@
 204	common	quotactl			sys_quotactl
 # 205 was old nfsservctl
 205	common	nfsservctl			sys_ni_syscall
-206	common	_sysctl				sys_sysctl
+206	common	_sysctl				sys_ni_syscall
 207	common	bdflush				sys_bdflush
 208	common	uname				sys_newuname
 209	common	sysinfo				sys_sysinfo
@@ -406,5 +406,7 @@
 433	common	fspick				sys_fspick
 434	common	pidfd_open			sys_pidfd_open
 435	common	clone3				sys_clone3
+436	common	close_range			sys_close_range
 437	common	openat2				sys_openat2
 438	common	pidfd_getfd			sys_pidfd_getfd
+439	common	faccessat2			sys_faccessat2
Signature · 1 line
2.26.2
#6 lore raw

PATCH 4/4 linux-user: remove _sysctl

In reply to Laurent Vivier

It has been removed from linux since

61a47c1ad3a4 ("sysctl: Remove the sysctl system call")

It's a good news because it was not really supported by qemu.

---
 linux-user/syscall.c | 6 ------
 1 file changed, 6 deletions(-)
linux-user/syscall.c +0 -6
index 897d20c076ce..0cfc95088fa4 100644
@@ -10524,12 +10524,6 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
 #if defined(TARGET_NR_fdatasync) /* Not on alpha (osf_datasync ?) */
     case TARGET_NR_fdatasync:
         return get_errno(fdatasync(arg1));
-#endif
-#ifdef TARGET_NR__sysctl
-    case TARGET_NR__sysctl:
-        /* We don't implement this, but ENOTDIR is always a safe
-           return value. */
-        return -TARGET_ENOTDIR;
 #endif
     case TARGET_NR_sched_getaffinity:
         {
Signature · 1 line
2.26.2
author Applied
#8 lore raw
In reply to Laurent Vivier

Le 30/09/2020 à 02:30, Laurent Vivier a écrit :

Quoted 35 lines

All the changes have been done using:

scripts/gensyscalls.sh, scripts/update-mips-syscall-args.sh and scripts/update-syscalltbl.sh

I've checked syscall_nr.h generated from syscall.tbl are always correctly generated (there have been massive changes in x86 targets).

The series also removes _sysctl from syscall.c as it has been removed from the kernel (and we didn't emulate it correctly)

Laurent Vivier (4):
linux-user: update syscall_nr.h to Linux 5.9-rc7
linux-user: update mips/syscall-args-o32.c.inc to Linux 5.9-rc7
linux-user: update syscall.tbl to Linux 5.9-rc7
linux-user: remove _sysctl

 linux-user/aarch64/syscall_nr.h        |   7 +-
 linux-user/alpha/syscall.tbl           |   4 +-
 linux-user/arm/syscall.tbl             |   4 +-
 linux-user/hppa/syscall.tbl            |   8 +-
 linux-user/i386/syscall_32.tbl         | 820 +++++++++++++------------
 linux-user/m68k/syscall.tbl            |   4 +-
 linux-user/microblaze/syscall.tbl      |   4 +-
 linux-user/mips/syscall-args-o32.c.inc |   4 +
 linux-user/mips/syscall_o32.tbl        |   8 +-
 linux-user/mips64/syscall_n32.tbl      |   8 +-
 linux-user/mips64/syscall_n64.tbl      |   4 +-
 linux-user/nios2/syscall_nr.h          |   7 +-
 linux-user/openrisc/syscall_nr.h       |   8 +-
 linux-user/ppc/syscall.tbl             |  30 +-
 linux-user/riscv/syscall32_nr.h        |   8 +-
 linux-user/riscv/syscall64_nr.h        |   8 +-
 linux-user/s390x/syscall.tbl           |   8 +-
Quoted 9 lines
 linux-user/sh4/syscall.tbl             |   4 +-
 linux-user/sparc/syscall.tbl           |   8 +-
 linux-user/sparc64/syscall.tbl         |   8 +-
 linux-user/syscall.c                   |   6 -
 linux-user/x86_64/syscall_64.tbl       | 742 +++++++++++-----------
 linux-user/xtensa/syscall.tbl          |   4 +-
 scripts/gensyscalls.sh                 |   3 +-
 24 files changed, 889 insertions(+), 830 deletions(-)

Applied the series to my linux-user-for-5.2 branch.

Thanks,
Laurent