Skip to contentSkip to conversation

lap/syscalls: Update syscall numbers

PATCH New Petr Vorel 2 participants 6 messages Feb 26, 2020 – Feb 28, 2020

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

PATCH v2 1/1 lap/syscalls: Update syscall numbers

From: Viresh Kumar <[email protected]>

to sync with the kernel v5.6-rc3.

As this was performed in some sort of automated way, few extra changes may be noticed while converting from kernel files to LTP, like a different format of defining syscalls or removal of obsolete syscalls.

The diff generated against sh.in file is enormous and looks like someone did a mistake while adding the syscall numbers there as they look to be mostly incorrect from 220 to 393. They are fixed as a consequence of this exercise.

[ pvorel: various fixes for 32bit syscalls in 64bit arch and vice versa ]

---
Changes v1->v2:
* remove wrong umount in ia64
* fixed typo sched_rr_get_interval_ti (=> sched_rr_get_interval_time64)
* various fixes for 32bit syscalls in 64bit arch and vice versa

TODO: not sure about spu and nospu ABI in powerpc (whether they go to 32 bit or 64 bit or is ignored)

=== DIFF from v1 ===

lapi/syscalls/ia64.in +0 -1
index f5c437814..427b711b1 100644
@@ -18,7 +18,6 @@ lseek 1040
 getpid 1041
 getppid 1042
 mount 1043
-umount 1044
 umount2 1044
 setuid 1045
 getuid 1046
lapi/syscalls/s390.in +1 -24
index dfb7ee811..c3f249aed 100644
@@ -121,7 +121,6 @@ setfsgid 139
 _llseek 140
 getdents 141
 _newselect 142
-select 142
 flock 143
 msync 144
 readv 145
@@ -170,7 +169,6 @@ getpmsg 188
 putpmsg 189
 vfork 190
 ugetrlimit 191
-getrlimit 191
 mmap2 192
 truncate64 193
 ftruncate64 194
@@ -178,43 +176,24 @@ stat64 195
 lstat64 196
 fstat64 197
 lchown32 198
-lchown 198
 getuid32 199
-getuid 199
 getgid32 200
-getgid 200
 geteuid32 201
-geteuid 201
 getegid32 202
-getegid 202
 setreuid32 203
-setreuid 203
 setregid32 204
-setregid 204
 getgroups32 205
-getgroups 205
 setgroups32 206
-setgroups 206
 fchown32 207
-fchown 207
 setresuid32 208
-setresuid 208
 getresuid32 209
-getresuid 209
 setresgid32 210
-setresgid 210
 getresgid32 211
-getresgid 211
 chown32 212
-chown 212
 setuid32 213
-setuid 213
 setgid32 214
-setgid 214
 setfsuid32 215
-setfsuid 215
 setfsgid32 216
-setfsgid 216
 pivot_root 217
 mincore 218
 madvise 219
@@ -290,7 +269,6 @@ mknodat 290
 fchownat 291
 futimesat 292
 fstatat64 293
-newfstatat 293
 unlinkat 294
 renameat 295
 linkat 296
@@ -384,7 +362,6 @@ rseq 383
 pkey_mprotect 384
 pkey_alloc 385
 pkey_free 386
-semtimedop 392
 semget 393
 semctl 394
 shmget 395
@@ -414,7 +391,7 @@ mq_timedreceive_time64 419
 semtimedop_time64 420
 rt_sigtimedwait_time64 421
 futex_time64 422
-sched_rr_get_interval_ti 423
+sched_rr_get_interval_time64 423
 pidfd_send_signal 424
 io_uring_setup 425
 io_uring_enter 426
lapi/syscalls/s390x.in +0 -75

188 lines not on this page · raw message

lapi/syscalls/sparc.in +1 -9
index 9c4f5089b..522e3c997 100644
@@ -50,7 +50,6 @@ signal 48
 geteuid 49
 getegid 50
 acct 51
-memory_ordering 52
 getgid32 53
 ioctl 54
 reboot 55
@@ -111,11 +110,6 @@ getresuid32 109
 setresgid32 110
 getresgid32 111
 setregid32 112
-setresuid 108
-getresuid 109
-setresgid 110
-getresgid 111
-setregid 112
 recvmsg 113
 sendmsg 114
 getgroups32 115
@@ -167,7 +161,6 @@ sched_set_affinity 160
 sched_get_affinity 161
 getdomainname 162
 setdomainname 163
-utrap_install 164
 quotactl 165
 set_tid_address 166
 mount 167
@@ -369,7 +362,6 @@ pkey_mprotect 362
 pkey_alloc 363
 pkey_free 364
 rseq 365
-semtimedop 392
 semget 393
 semctl 394
 shmget 395
@@ -399,7 +391,7 @@ mq_timedreceive_time64 419
 semtimedop_time64 420
 rt_sigtimedwait_time64 421
 futex_time64 422
-sched_rr_get_interval_ti423
+sched_rr_get_interval_time64 423
 pidfd_send_signal 424
 io_uring_setup 425
 io_uring_enter 426
lapi/syscalls/sparc64.in +0 -38
index f654b1359..6f884a7bf 100644
@@ -33,7 +33,6 @@ lchown32 31
 fchown32 32
 access 33
 nice 34
-chown32 35
 sync 36
 kill 37
 stat 38
@@ -42,7 +41,6 @@ lstat 40
 dup 41
 pipe 42
 times 43
-getuid32 44
 umount2 45
 setgid 46
 getgid 47
@@ -51,10 +49,8 @@ geteuid 49
 getegid 50
 acct 51
 memory_ordering 52
-getgid32 53
 ioctl 54
 reboot 55
-mmap2 56
 symlink 57
 readlink 58
 execve 59
@@ -67,32 +63,22 @@ msync 65
 vfork 66
 pread64 67
 pwrite64 68
-geteuid32 69
-getegid32 70
 mmap 71
-setreuid32 72
 munmap 73
 mprotect 74
 madvise 75
 vhangup 76
-truncate64 77
 mincore 78
 getgroups 79
 setgroups 80
 getpgrp 81
-setgroups32 82
 setitimer 83
-ftruncate64 84
 swapon 85
 getitimer 86
-setuid32 87
 sethostname 88
-setgid32 89
 dup2 90
-setfsuid32 91
 fcntl 92
 select 93
-setfsgid32 94
 fsync 95
 setpriority 96
 socket 97
@@ -110,10 +96,8 @@ setresuid 108
 getresuid 109
 setresgid 110
 getresgid 111
-setregid32 112
 recvmsg 113
 sendmsg 114
-getgroups32 115
 gettimeofday 116
 getrusage 117
 getsockopt 118
@@ -153,7 +137,6 @@ inotify_init 151
 inotify_add_watch 152
 poll 153
 getdents64 154
-fcntl64 155
 inotify_rm_watch 156
 statfs 157
 fstatfs 158
@@ -229,7 +212,6 @@ afs_syscall 227
 setfsuid 228
 setfsgid 229
 _newselect 230
-time 231
 splice 232
 stime 233
 statfs64 234
@@ -375,26 +357,6 @@ msgget 399
 msgsnd 400
 msgrcv 401
 msgctl 402
-clock_gettime64 403
-clock_settime64 404
-clock_adjtime64 405
-clock_getres_time64 406
-clock_nanosleep_time64 407
-timer_gettime64 408
-timer_settime64 409
-timerfd_gettime64 410
-timerfd_settime64 411
-utimensat_time64 412
-pselect6_time64 413
-ppoll_time64 414
-io_pgetevents_time64 416
-recvmmsg_time64 417
-mq_timedsend_time64 418
-mq_timedreceive_time64 419
-semtimedop_time64 420
-rt_sigtimedwait_time64 421
-futex_time64 422
-sched_rr_get_interval_ti423
 pidfd_send_signal 424
 io_uring_setup 425
 io_uring_enter 426
 include/lapi/syscalls/aarch64.in   |  33 ++-
 include/lapi/syscalls/arm.in       |  48 +++-
 include/lapi/syscalls/i386.in      |  89 +++++--
 include/lapi/syscalls/ia64.in      |  22 +-
 include/lapi/syscalls/mips_n32.in  |   3 +
 include/lapi/syscalls/mips_n64.in  |   3 +
 include/lapi/syscalls/mips_o32.in  |   3 +
 include/lapi/syscalls/powerpc.in   |  62 ++++-
 include/lapi/syscalls/powerpc64.in |  60 ++++-
 include/lapi/syscalls/s390.in      | 219 ++++++++++-------
 include/lapi/syscalls/s390x.in     | 167 ++++++-------
 include/lapi/syscalls/sh.in        | 371 +++++++++++++++--------------
 include/lapi/syscalls/sparc.in     |  61 ++++-
 include/lapi/syscalls/sparc64.in   |  39 ++-
 include/lapi/syscalls/x86_64.in    |  51 ++++
 15 files changed, 836 insertions(+), 395 deletions(-)
include/lapi/syscalls/aarch64.in +32 -1
index 4a3b4981d..07556933f 100644
@@ -256,12 +256,17 @@ sendmmsg 269
 process_vm_readv 270
 process_vm_writev 271
 kcmp 272
+finit_module 273
+sched_setattr 274
+sched_getattr 275
+renameat2 276
+seccomp 277
 getrandom 278
 memfd_create 279
 bpf 280
+execveat 281
 userfaultfd 282
 membarrier 283
-execveat 281
 mlock2 284
 copy_file_range 285
 preadv2 286
@@ -269,7 +274,30 @@ pwritev2 287
 pkey_mprotect 288
 pkey_alloc 289
 pkey_free 290
+statx 291
 io_pgetevents 292
+rseq 293
+kexec_file_load 294
+clock_gettime64 403
+clock_settime64 404
+clock_adjtime64 405
+clock_getres_time64 406
+clock_nanosleep_time64 407
+timer_gettime64 408
+timer_settime64 409
+timerfd_gettime64 410
+timerfd_settime64 411
+utimensat_time64 412
+pselect6_time64 413
+ppoll_time64 414
+io_pgetevents_time64 416
+recvmmsg_time64 417
+mq_timedsend_time64 418
+mq_timedreceive_time64 419
+semtimedop_time64 420
+rt_sigtimedwait_time64 421
+futex_time64 422
+sched_rr_get_interval_time64 423
 pidfd_send_signal 424
 io_uring_setup 425
 io_uring_enter 426
@@ -281,4 +309,7 @@ fsconfig 431
 fsmount 432
 fspick 433
 pidfd_open 434
+clone3 435
+openat2 437
+pidfd_getfd 438
 _sysctl 1078
include/lapi/syscalls/arm.in +36 -12

127 lines not on this page · raw message

include/lapi/syscalls/i386.in +75 -14

146 lines not on this page · raw message

include/lapi/syscalls/ia64.in +20 -2
index 9e491b54b..427b711b1 100644
@@ -18,7 +18,7 @@ lseek 1040
 getpid 1041
 getppid 1042
 mount 1043
-umount 1044
+umount2 1044
 setuid 1045
 getuid 1046
 geteuid 1047
@@ -139,6 +139,7 @@ sched_rr_get_interval 1167
 nanosleep 1168
 nfsservctl 1169
 prctl 1170
+old_getpagesize 1171
 mmap2 1172
 pciconfig_read 1173
 pciconfig_write 1174
@@ -293,23 +294,38 @@ recvmmsg 1322
 fanotify_init 1323
 fanotify_mark 1324
 prlimit64 1325
+name_to_handle_at 1326
+open_by_handle_at 1327
+clock_adjtime 1328
 syncfs 1329
+setns 1330
+sendmmsg 1331
 process_vm_readv 1332
 process_vm_writev 1333
+accept4 1334
+finit_module 1335
+sched_setattr 1336
+sched_getattr 1337
 renameat2 1338
 getrandom 1339
 memfd_create 1340
+bpf 1341
+execveat 1342
 userfaultfd 1343
 membarrier 1344
-execveat 1342
+kcmp 1345
 mlock2 1346
 copy_file_range 1347
 preadv2 1348
 pwritev2 1349
+statx 1350
 io_pgetevents 1351
+perf_event_open 1352
+seccomp 1353
 pkey_mprotect 1354
 pkey_alloc 1355
 pkey_free 1356
+rseq 1357
 pidfd_send_signal 1448
 io_uring_setup 1449
 io_uring_enter 1450
@@ -321,3 +337,5 @@ fsconfig 1455
 fsmount 1456
 fspick 1457
 pidfd_open 1458
+openat2 1461
+pidfd_getfd 1462
include/lapi/syscalls/mips_n32.in +3 -0
index 25dc020d1..eb6140ebc 100644
@@ -361,3 +361,6 @@ fsconfig 431
 fsmount 432
 fspick 433
 pidfd_open 434
+clone3 435
+openat2 437
+pidfd_getfd 438
include/lapi/syscalls/mips_n64.in +3 -0
index 68ba6f1a0..5480aa3c9 100644
@@ -337,3 +337,6 @@ fsconfig 431
 fsmount 432
 fspick 433
 pidfd_open 434
+clone3 435
+openat2 437
+pidfd_getfd 438
include/lapi/syscalls/mips_o32.in +3 -0
index 505bfd8db..feee8fbf3 100644
@@ -407,3 +407,6 @@ fsconfig 431
 fsmount 432
 fspick 433
 pidfd_open 434
+clone3 435
+openat2 437
+pidfd_getfd 438
include/lapi/syscalls/powerpc.in +55 -7

107 lines not on this page · raw message

include/lapi/syscalls/powerpc64.in +54 -6

104 lines not on this page · raw message

include/lapi/syscalls/s390.in +135 -84

354 lines not on this page · raw message

include/lapi/syscalls/s390x.in +84 -83

245 lines not on this page · raw message

include/lapi/syscalls/sh.in +195 -176

457 lines not on this page · raw message

include/lapi/syscalls/sparc.in +53 -8

135 lines not on this page · raw message

include/lapi/syscalls/sparc64.in +37 -2
index efdaa76a1..6f884a7bf 100644
@@ -29,6 +29,8 @@ alarm 27
 sigaltstack 28
 pause 29
 utime 30
+lchown32 31
+fchown32 32
 access 33
 nice 34
 sync 36
@@ -49,7 +51,6 @@ acct 51
 memory_ordering 52
 ioctl 54
 reboot 55
-mmap2 56
 symlink 57
 readlink 58
 execve 59
@@ -164,6 +165,7 @@ flistxattr 180
 removexattr 181
 lremovexattr 182
 sigpending 183
+query_module 184
 setpgid 185
 fremovexattr 186
 tkill 187
@@ -200,6 +202,7 @@ clone 217
 ioprio_get 218
 adjtimex 219
 sigprocmask 220
+create_module 221
 delete_module 222
 get_kernel_syms 223
 getpgid 224
@@ -208,10 +211,12 @@ sysfs 226
 afs_syscall 227
 setfsuid 228
 setfsgid 229
+_newselect 230
 splice 232
 stime 233
 statfs64 234
 fstatfs64 235
+_llseek 236
 mlock 237
 munlock 238
 mlockall 239
@@ -242,6 +247,7 @@ timer_gettime 263
 timer_getoverrun 264
 timer_delete 265
 timer_create 266
+vserver 267
 io_setup 268
 io_destroy 269
 io_submit 270
@@ -306,24 +312,51 @@ recvmmsg 328
 fanotify_init 329
 fanotify_mark 330
 prlimit64 331
+name_to_handle_at 332
+open_by_handle_at 333
+clock_adjtime 334
 syncfs 335
+sendmmsg 336
+setns 337
 process_vm_readv 338
 process_vm_writev 339
+kern_features 340
 kcmp 341
+finit_module 342
+sched_setattr 343
+sched_getattr 344
 renameat2 345
+seccomp 346
 getrandom 347
 memfd_create 348
+bpf 349
+execveat 350
 membarrier 351
 userfaultfd 352
-execveat 350
+bind 353
+listen 354
+setsockopt 355
 mlock2 356
 copy_file_range 357
 preadv2 358
 pwritev2 359
+statx 360
 io_pgetevents 361
 pkey_mprotect 362
 pkey_alloc 363
 pkey_free 364
+rseq 365
+semtimedop 392
+semget 393
+semctl 394
+shmget 395
+shmctl 396
+shmat 397
+shmdt 398
+msgget 399
+msgsnd 400
+msgrcv 401
+msgctl 402
 pidfd_send_signal 424
 io_uring_setup 425
 io_uring_enter 426
@@ -335,3 +368,5 @@ fsconfig 431
 fsmount 432
 fspick 433
 pidfd_open 434
+openat2 437
+pidfd_getfd 438
include/lapi/syscalls/x86_64.in +51 -0

84 lines not on this page · raw message

Signature · 1 line
2.25.1
#1 lore raw

PATCH v2 1/1 lap/syscalls: Update syscall numbers

Quoted 3 lines · Petr Vorel

From: Viresh Kumar <[email protected]>

to sync with the kernel v5.6-rc3.

This doesn't look right, you missed some text here ?

Quoted 11 lines

As this was performed in some sort of automated way, few extra changes may be noticed while converting from kernel files to LTP, like a different format of defining syscalls or removal of obsolete syscalls.

The diff generated against sh.in file is enormous and looks like someone did a mistake while adding the syscall numbers there as they look to be mostly incorrect from 220 to 393. They are fixed as a consequence of this exercise.

[ pvorel: various fixes for 32bit syscalls in 64bit arch and vice versa ]

Sorry about making these mistakes :(

Quoted 12 lines

---
Changes v1->v2:
* remove wrong umount in ia64
* fixed typo sched_rr_get_interval_ti (=> sched_rr_get_interval_time64)
* various fixes for 32bit syscalls in 64bit arch and vice versa

TODO: not sure about spu and nospu ABI in powerpc (whether they go to 32 bit or 64 bit or is ignored)

=== DIFF from v1 ===

include/lapi/syscalls/s390.in

Quoted 2 lines
include/lapi/syscalls/s390.in +0 -1
 pkey_free 386
-semtimedop 392

Why is this removed ?

lapi/syscalls/s390x.in link 9 · line 13

Quoted 9 lines
lapi/syscalls/s390x.in +0 -1
index dfb7ee811..88cc9b86b 100644
@@ -10,17 +10,12 @@ link 9
 unlink 10
 execve 11
 chdir 12
-time 13

And the ones like these..

Because they are only for 32 bit arch and not 64 ?

include/lapi/syscalls/sparc.in

Quoted 3 lines
include/lapi/syscalls/sparc.in +1 -1
-sched_rr_get_interval_ti423
+sched_rr_get_interval_time64 423

Really bad that I made these mistakes with my vim tricks.

Signature · 1 line
viresh
author
#2 lore raw

PATCH v2 1/1 lap/syscalls: Update syscall numbers

Hi Viresh,

Quoted 3 lines
Quoted 1 line

to sync with the kernel v5.6-rc3.

This doesn't look right, you missed some text here ?

I dared to change this

Get Syscall numbers in sync with latest Linux kernel source

This gets the Syscall numbers in sync with latest kernel source.

to this:
lap/syscalls: Update syscall numbers

to sync with the kernel v5.6-rc3.

=> typo: s/lap/lapi/
Hope you don't mind.

Quoted 9 lines
Quoted 8 lines

As this was performed in some sort of automated way, few extra changes may be noticed while converting from kernel files to LTP, like a different format of defining syscalls or removal of obsolete syscalls.

The diff generated against sh.in file is enormous and looks like someone did a mistake while adding the syscall numbers there as they look to be mostly incorrect from 220 to 393. They are fixed as a consequence of this exercise.

Quoted 4 lines
Quoted 2 lines
[ pvorel: various fixes for 32bit syscalls in 64bit arch and vice versa ]

Sorry about making these mistakes :(

No problem and thanks for your work.
I sent fixes as a new patch as it might be easier to review for others (off course, you're the author).
I can be wrong as well, other review is welcome :).

Quoted 10 lines
Quoted 9 lines

---
Changes v1->v2:
* remove wrong umount in ia64
* fixed typo sched_rr_get_interval_ti (=> sched_rr_get_interval_time64)
* various fixes for 32bit syscalls in 64bit arch and vice versa

TODO: not sure about spu and nospu ABI in powerpc (whether they go to 32 bit or 64 bit or is ignored)

Quoted 6 lines

include/lapi/syscalls/s390.in

Quoted 4 lines

=== DIFF from v1 ===

include/lapi/syscalls/s390.in +0 -1
 pkey_free 386
-semtimedop 392

Why is this removed ?

arch/s390/kernel/syscalls/syscall.tbl
392 64 semtimedop sys_semtimedop -
=> only for 64 bit ABI. s390.in is for 32 bit.

Quoted 9 lines

lapi/syscalls/s390x.in link 9 · line 13

Quoted 9 lines
lapi/syscalls/s390x.in +0 -1
index dfb7ee811..88cc9b86b 100644
@@ -10,17 +10,12 @@ link 9
 unlink 10
 execve 11
 chdir 12
-time 13

arch/s390/kernel/syscalls/syscall.tbl
13 32 time - sys_time32
=> only for 32 bit ABI. s390x.in is for 64 bit.

Quoted 9 lines

And the ones like these..

Because they are only for 32 bit arch and not 64 ?

include/lapi/syscalls/sparc.in

Quoted 3 lines
include/lapi/syscalls/sparc.in +1 -1
-sched_rr_get_interval_ti423
+sched_rr_get_interval_time64 423

Really bad that I made these mistakes with my vim tricks.

Kind regards,
Petr

#3 lore raw

PATCH v2 1/1 lap/syscalls: Update syscall numbers

Quoted 7 lines · Petr Vorel

Hi Viresh,

Quoted 3 lines
Quoted 1 line

to sync with the kernel v5.6-rc3.

This doesn't look right, you missed some text here ?

I dared to change this

Quoted 8 lines

Get Syscall numbers in sync with latest Linux kernel source

This gets the Syscall numbers in sync with latest kernel source.

to this:
lap/syscalls: Update syscall numbers

to sync with the kernel v5.6-rc3.

Ah, so subject and body must be read together, I missed that :)

Quoted 2 lines

=> typo: s/lap/lapi/
Hope you don't mind.

Surely not.

Signature · 1 line
viresh
author
#4 lore raw

PATCH v2 1/1 lap/syscalls: Update syscall numbers

In reply to Petr Vorel

Hi,

Quoted 2 lines

TODO: not sure about spu and nospu ABI in powerpc (whether they go to 32 bit or 64 bit or is ignored)

OK: 32bit uses "common,nospu,32" and 64bit uses "common,nospu,64" spu can be ignored for both.
=> patch is correct.

Kind regards,
Petr