From: Dmitry V. Levin Date: Mon, 12 Jan 2015 18:53:32 +0000 (+0000) Subject: Wire up new syscalls X-Git-Tag: v4.10~205 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e78f02a16648554e87533eabb6c50f0a9a30ddf8;p=strace Wire up new syscalls * linux/dummy.h (sys_bpf, sys_execveat, sys_getrandom, sys_kexec_file_load, sys_memfd_create, sys_seccomp): New stub aliases. * linux/32/syscallent.h (seccomp, getrandom, memfd_create, bpf, execveat): New entries. * linux/64/syscallent.h: Likewise. * linux/arm/syscallent.h: Likewise. * linux/hppa/syscallent.h: Likewise. * linux/i386/syscallent.h: Likewise. * linux/microblaze/syscallent.h: Likewise. * linux/mips/syscallent-n32.h: Likewise. * linux/mips/syscallent-n64.h: Likewise. * linux/mips/syscallent-o32.h: Likewise. * linux/powerpc/syscallent.h: Likewise. * linux/sparc/syscallent.h: Likewise. * linux/ia64/syscallent.h (getrandom, memfd_create, bpf, execveat): New entries. * linux/m68k/syscallent.h: Likewise. * linux/s390/syscallent.h: (seccomp, getrandom, memfd_create, bpf, s390_pci_mmio_write, s390_pci_mmio_read, execveat): New entries. * linux/s390x/syscallent.h: Likewise. * linux/x86_64/syscallent.h (seccomp, getrandom, memfd_create, kexec_file_load, bpf, execveat): New entries. * linux/x32/syscallent.h: Likewise. * linux/xtensa/syscallent.h (seccomp, getrandom, memfd_create): New entries. --- diff --git a/linux/32/syscallent.h b/linux/32/syscallent.h index f37d8e1b..0820291b 100644 --- a/linux/32/syscallent.h +++ b/linux/32/syscallent.h @@ -267,5 +267,11 @@ [274] = { 3, 0, sys_sched_setattr, "sched_setattr" }, [275] = { 4, 0, sys_sched_getattr, "sched_getattr" }, [276] = { 5, TD|TF, sys_renameat2, "renameat2" }, +[277] = { 3, 0, sys_seccomp, "seccomp", }, +[278] = { 3, 0, sys_getrandom, "getrandom", }, +[279] = { 2, TD, sys_memfd_create, "memfd_create", }, +[280] = { 3, TD, sys_bpf, "bpf", }, +[281] = { 5, TD|TF|TP|SE|SI, sys_execveat, "execveat", }, + #undef ARCH_sys_mmap #undef ARCH_WANT_SYNC_FILE_RANGE2 diff --git a/linux/64/syscallent.h b/linux/64/syscallent.h index 2b0985f1..6c67c9c1 100644 --- a/linux/64/syscallent.h +++ b/linux/64/syscallent.h @@ -260,3 +260,8 @@ [274] = { 3, 0, sys_sched_setattr, "sched_setattr" }, [275] = { 4, 0, sys_sched_getattr, "sched_getattr" }, [276] = { 5, TD|TF, sys_renameat2, "renameat2" }, +[277] = { 3, 0, sys_seccomp, "seccomp", }, +[278] = { 3, 0, sys_getrandom, "getrandom", }, +[279] = { 2, TD, sys_memfd_create, "memfd_create", }, +[280] = { 3, TD, sys_bpf, "bpf", }, +[281] = { 5, TD|TF|TP|SE|SI, sys_execveat, "execveat", }, diff --git a/linux/arm/syscallent.h b/linux/arm/syscallent.h index 24919224..055a8aed 100644 --- a/linux/arm/syscallent.h +++ b/linux/arm/syscallent.h @@ -407,7 +407,12 @@ [380] = { 3, 0, sys_sched_setattr, "sched_setattr" }, [381] = { 4, 0, sys_sched_getattr, "sched_getattr" }, [382] = { 5, TD|TF, sys_renameat2, "renameat2" }, -[383 ... 399] = { }, +[383] = { 3, 0, sys_seccomp, "seccomp", }, +[384] = { 3, 0, sys_getrandom, "getrandom", }, +[385] = { 2, TD, sys_memfd_create, "memfd_create", }, +[386] = { 3, TD, sys_bpf, "bpf", }, +[387] = { 5, TD|TF|TP|SE|SI, sys_execveat, "execveat", }, +[388 ... 399] = { }, #ifdef __ARM_EABI__ # define ARM_FIRST_SHUFFLED_SYSCALL 400 diff --git a/linux/dummy.h b/linux/dummy.h index 30ee94c1..576fedeb 100644 --- a/linux/dummy.h +++ b/linux/dummy.h @@ -32,17 +32,23 @@ #endif /* still unfinished */ +#define sys_bpf printargs +#define sys_execveat printargs +#define sys_getrandom printargs #define sys_ioperm printargs #define sys_iopl printargs #define sys_kcmp printargs +#define sys_kexec_file_load printargs #define sys_lookup_dcookie printargs +#define sys_memfd_create printargs #define sys_name_to_handle_at printargs #define sys_open_by_handle_at printargs #define sys_sched_getattr printargs #define sys_sched_setattr printargs +#define sys_seccomp printargs #define sys_sysfs printargs -#define sys_vm86old printargs #define sys_vm86 printargs +#define sys_vm86old printargs /* machine-specific */ #if !(defined I386 || defined X86_64 || defined X32) diff --git a/linux/hppa/syscallent.h b/linux/hppa/syscallent.h index f7c35ebe..a170a8a8 100644 --- a/linux/hppa/syscallent.h +++ b/linux/hppa/syscallent.h @@ -340,3 +340,8 @@ [335] = { 4, 0, sys_sched_getattr, "sched_getattr" }, [336] = { 2, TF, sys_utimes, "utimes" }, [337] = { 5, TD|TF, sys_renameat2, "renameat2" }, +[338] = { 3, 0, sys_seccomp, "seccomp", }, +[339] = { 3, 0, sys_getrandom, "getrandom", }, +[340] = { 2, TD, sys_memfd_create, "memfd_create", }, +[341] = { 3, TD, sys_bpf, "bpf", }, +[342] = { 5, TD|TF|TP|SE|SI, sys_execveat, "execveat", }, diff --git a/linux/i386/syscallent.h b/linux/i386/syscallent.h index 0011a9dd..21f9a9e2 100644 --- a/linux/i386/syscallent.h +++ b/linux/i386/syscallent.h @@ -380,6 +380,12 @@ [351] = { 3, 0, sys_sched_setattr, "sched_setattr" }, [352] = { 4, 0, sys_sched_getattr, "sched_getattr" }, [353] = { 5, TD|TF, sys_renameat2, "renameat2" }, -[354 ... 399] = { }, +[354] = { 3, 0, sys_seccomp, "seccomp", }, +[355] = { 3, 0, sys_getrandom, "getrandom", }, +[356] = { 2, TD, sys_memfd_create, "memfd_create", }, +[357] = { 3, TD, sys_bpf, "bpf", }, +[358] = { 5, TD|TF|TP|SE|SI, sys_execveat, "execveat", }, +[359 ... 399] = { }, + #define SYS_socket_subcall 400 #include "subcall.h" diff --git a/linux/ia64/syscallent.h b/linux/ia64/syscallent.h index 1879378b..9b23fcd2 100644 --- a/linux/ia64/syscallent.h +++ b/linux/ia64/syscallent.h @@ -552,3 +552,7 @@ [1336] = { 3, 0, sys_sched_setattr, "sched_setattr" }, [1337] = { 4, 0, sys_sched_getattr, "sched_getattr" }, [1338] = { 5, TD|TF, sys_renameat2, "renameat2" }, +[1339] = { 3, 0, sys_getrandom, "getrandom", }, +[1340] = { 2, TD, sys_memfd_create, "memfd_create", }, +[1341] = { 3, TD, sys_bpf, "bpf", }, +[1342] = { 5, TD|TF|TP|SE|SI, sys_execveat, "execveat", }, diff --git a/linux/m68k/syscallent.h b/linux/m68k/syscallent.h index 4adbce8d..af9c3a27 100644 --- a/linux/m68k/syscallent.h +++ b/linux/m68k/syscallent.h @@ -377,6 +377,11 @@ [349] = { 3, 0, sys_sched_setattr, "sched_setattr" }, [350] = { 4, 0, sys_sched_getattr, "sched_getattr" }, [351] = { 5, TD|TF, sys_renameat2, "renameat2" }, -[352 ... 399] = { }, +[352] = { 3, 0, sys_getrandom, "getrandom", }, +[353] = { 2, TD, sys_memfd_create, "memfd_create", }, +[354] = { 3, TD, sys_bpf, "bpf", }, +[355] = { 5, TD|TF|TP|SE|SI, sys_execveat, "execveat", }, +[356 ... 399] = { }, + #define SYS_socket_subcall 400 #include "subcall.h" diff --git a/linux/microblaze/syscallent.h b/linux/microblaze/syscallent.h index 7cfc51a7..4cb6b4e9 100644 --- a/linux/microblaze/syscallent.h +++ b/linux/microblaze/syscallent.h @@ -409,3 +409,8 @@ [381] = { 3, 0, sys_sched_setattr, "sched_setattr" }, [382] = { 4, 0, sys_sched_getattr, "sched_getattr" }, [383] = { 5, TD|TF, sys_renameat2, "renameat2" }, +[384] = { 3, 0, sys_seccomp, "seccomp", }, +[385] = { 3, 0, sys_getrandom, "getrandom", }, +[386] = { 2, TD, sys_memfd_create, "memfd_create", }, +[387] = { 3, TD, sys_bpf, "bpf", }, +[388] = { 5, TD|TF|TP|SE|SI, sys_execveat, "execveat", }, diff --git a/linux/mips/syscallent-n32.h b/linux/mips/syscallent-n32.h index 2903fd23..d13f9e8e 100644 --- a/linux/mips/syscallent-n32.h +++ b/linux/mips/syscallent-n32.h @@ -316,6 +316,11 @@ [6313] = { 3, 0, sys_sched_setattr, "sched_setattr" }, [6314] = { 4, 0, sys_sched_getattr, "sched_getattr" }, [6315] = { 5, TD|TF, sys_renameat2, "renameat2" }, +[6316] = { 3, 0, sys_seccomp, "seccomp", }, +[6317] = { 3, 0, sys_getrandom, "getrandom", }, +[6318] = { 2, TD, sys_memfd_create, "memfd_create", }, +[6319] = { 3, TD, sys_bpf, "bpf", }, +[6320] = { 5, TD|TF|TP|SE|SI, sys_execveat, "execveat", }, #else @@ -635,5 +640,10 @@ [6313] = { 3, 0, printargs, "n32_sched_setattr" }, [6314] = { 4, 0, printargs, "n32_sched_getattr" }, [6315] = { 5, TD|TF, printargs, "n32_renameat2" }, +[6316] = { 3, 0, printargs, "n32_seccomp", }, +[6317] = { 3, 0, printargs, "n32_getrandom", }, +[6318] = { 2, TD, printargs, "n32_memfd_create", }, +[6319] = { 3, TD, printargs, "n32_bpf", }, +[6320] = { 5, TD|TF|TP|SE|SI, printargs, "n32_execveat", }, #endif diff --git a/linux/mips/syscallent-n64.h b/linux/mips/syscallent-n64.h index 73eef957..e4b9496c 100644 --- a/linux/mips/syscallent-n64.h +++ b/linux/mips/syscallent-n64.h @@ -312,6 +312,11 @@ [5309] = { 3, 0, sys_sched_setattr, "sched_setattr" }, [5310] = { 4, 0, sys_sched_getattr, "sched_getattr" }, [5311] = { 5, TD|TF, sys_renameat2, "renameat2" }, +[5312] = { 3, 0, sys_seccomp, "seccomp", }, +[5313] = { 3, 0, sys_getrandom, "getrandom", }, +[5314] = { 2, TD, sys_memfd_create, "memfd_create", }, +[5315] = { 3, TD, sys_bpf, "bpf", }, +[5316] = { 5, TD|TF|TP|SE|SI, sys_execveat, "execveat", }, #else @@ -627,7 +632,12 @@ [5309] = { 3, 0, printargs, "n64_sched_setattr" }, [5310] = { 4, 0, printargs, "n64_sched_getattr" }, [5311] = { 5, TD|TF, printargs, "n64_renameat2" }, +[5312] = { 3, 0, printargs, "n64_seccomp", }, +[5313] = { 3, 0, printargs, "n64_getrandom", }, +[5314] = { 2, TD, printargs, "n64_memfd_create", }, +[5315] = { 3, TD, printargs, "n64_bpf", }, +[5316] = { 5, TD|TF|TP|SE|SI, printargs, "n64_execveat", }, #endif -[5312 ... 5999] = { }, /* end of Linux N64 */ +[5317 ... 5999] = { }, /* end of Linux N64 */ diff --git a/linux/mips/syscallent-o32.h b/linux/mips/syscallent-o32.h index 423df4aa..7d2b8deb 100644 --- a/linux/mips/syscallent-o32.h +++ b/linux/mips/syscallent-o32.h @@ -352,6 +352,11 @@ [4349] = { 3, 0, sys_sched_setattr, "sched_setattr" }, [4350] = { 4, 0, sys_sched_getattr, "sched_getattr" }, [4351] = { 5, TD|TF, sys_renameat2, "renameat2" }, +[4352] = { 3, 0, sys_seccomp, "seccomp", }, +[4353] = { 3, 0, sys_getrandom, "getrandom", }, +[4354] = { 2, TD, sys_memfd_create, "memfd_create", }, +[4355] = { 3, TD, sys_bpf, "bpf", }, +[4356] = { 5, TD|TF|TP|SE|SI, sys_execveat, "execveat", }, #else @@ -707,7 +712,12 @@ [4349] = { 3, 0, printargs, "o32_sched_setattr" }, [4350] = { 4, 0, printargs, "o32_sched_getattr" }, [4351] = { 5, TD|TF, printargs, "o32_renameat2" }, +[4352] = { 3, 0, printargs, "o32_seccomp", }, +[4353] = { 3, 0, printargs, "o32_getrandom", }, +[4354] = { 2, TD, printargs, "o32_memfd_create", }, +[4355] = { 3, TD, printargs, "o32_bpf", }, +[4356] = { 5, TD|TF|TP|SE|SI, printargs, "o32_execveat", }, #endif -[4352 ... 4999] = { }, /* end of Linux o32 */ +[4357 ... 4999] = { }, /* end of Linux o32 */ diff --git a/linux/powerpc/syscallent.h b/linux/powerpc/syscallent.h index 4995214d..3e1208d9 100644 --- a/linux/powerpc/syscallent.h +++ b/linux/powerpc/syscallent.h @@ -384,6 +384,12 @@ [355] = { 3, 0, sys_sched_setattr, "sched_setattr" }, [356] = { 4, 0, sys_sched_getattr, "sched_getattr" }, [357] = { 5, TD|TF, sys_renameat2, "renameat2" }, -[358 ... 399] = { }, +[358] = { 3, 0, sys_seccomp, "seccomp", }, +[359] = { 3, 0, sys_getrandom, "getrandom", }, +[360] = { 2, TD, sys_memfd_create, "memfd_create", }, +[361] = { 3, TD, sys_bpf, "bpf", }, +[362] = { 5, TD|TF|TP|SE|SI, sys_execveat, "execveat", }, +[363 ... 399] = { }, + #define SYS_socket_subcall 400 #include "subcall.h" diff --git a/linux/s390/syscallent.h b/linux/s390/syscallent.h index 58be1e6f..d3c0c785 100644 --- a/linux/s390/syscallent.h +++ b/linux/s390/syscallent.h @@ -376,6 +376,14 @@ [345] = { 3, 0, sys_sched_setattr, "sched_setattr" }, [346] = { 4, 0, sys_sched_getattr, "sched_getattr" }, [347] = { 5, TD|TF, sys_renameat2, "renameat2" }, -[348 ... 399] = { }, +[348] = { 3, 0, sys_seccomp, "seccomp", }, +[349] = { 3, 0, sys_getrandom, "getrandom", }, +[350] = { 2, TD, sys_memfd_create, "memfd_create", }, +[351] = { 3, TD, sys_bpf, "bpf", }, +[352] = { 3, 0, printargs, "s390_pci_mmio_write", }, +[353] = { 3, 0, printargs, "s390_pci_mmio_read", }, +[354] = { 5, TD|TF|TP|SE|SI, sys_execveat, "execveat", }, +[355 ... 399] = { }, + #define SYS_socket_subcall 400 #include "subcall.h" diff --git a/linux/s390x/syscallent.h b/linux/s390x/syscallent.h index 934cdb0b..5c5e45b6 100644 --- a/linux/s390x/syscallent.h +++ b/linux/s390x/syscallent.h @@ -360,6 +360,14 @@ [345] = { 3, 0, sys_sched_setattr, "sched_setattr" }, [346] = { 4, 0, sys_sched_getattr, "sched_getattr" }, [347] = { 5, TD|TF, sys_renameat2, "renameat2" }, -[348 ... 399] = { }, +[348] = { 3, 0, sys_seccomp, "seccomp", }, +[349] = { 3, 0, sys_getrandom, "getrandom", }, +[350] = { 2, TD, sys_memfd_create, "memfd_create", }, +[351] = { 3, TD, sys_bpf, "bpf", }, +[352] = { 3, 0, printargs, "s390_pci_mmio_write", }, +[353] = { 3, 0, printargs, "s390_pci_mmio_read", }, +[354] = { 5, TD|TF|TP|SE|SI, sys_execveat, "execveat", }, +[355 ... 399] = { }, + #define SYS_socket_subcall 400 #include "subcall.h" diff --git a/linux/sparc/syscallent.h b/linux/sparc/syscallent.h index 1b3504e0..d8f7ec0a 100644 --- a/linux/sparc/syscallent.h +++ b/linux/sparc/syscallent.h @@ -344,6 +344,12 @@ [343] = { 3, 0, sys_sched_setattr, "sched_setattr" }, [344] = { 4, 0, sys_sched_getattr, "sched_getattr" }, [345] = { 5, TD|TF, sys_renameat2, "renameat2" }, -[346 ... 352] = { }, +[346] = { 3, 0, sys_seccomp, "seccomp", }, +[347] = { 3, 0, sys_getrandom, "getrandom", }, +[348] = { 2, TD, sys_memfd_create, "memfd_create", }, +[349] = { 3, TD, sys_bpf, "bpf", }, +[350] = { 5, TD|TF|TP|SE|SI, sys_execveat, "execveat", }, +[351 ... 352] = { }, + #define SYS_socket_subcall 353 #include "subcall.h" diff --git a/linux/x32/syscallent.h b/linux/x32/syscallent.h index 29a137a4..e9918071 100644 --- a/linux/x32/syscallent.h +++ b/linux/x32/syscallent.h @@ -315,7 +315,13 @@ [314] = { 3, 0, sys_sched_setattr, "sched_setattr" }, [315] = { 4, 0, sys_sched_getattr, "sched_getattr" }, [316] = { 5, TD|TF, sys_renameat2, "renameat2" }, -[317 ... 511] = { }, +[317] = { 3, 0, sys_seccomp, "seccomp", }, +[318] = { 3, 0, sys_getrandom, "getrandom", }, +[319] = { 2, TD, sys_memfd_create, "memfd_create", }, +[320] = { 5, TD, sys_kexec_file_load, "kexec_file_load", }, +[321] = { 3, TD, sys_bpf, "bpf", }, +[322] = { 5, TD|TF|TP|SE|SI, printargs, "64:execveat", }, +[323 ... 511] = { }, /* * x32-specific system call numbers start at 512 to avoid cache impact * for native 64-bit operation. @@ -353,3 +359,4 @@ [542] = { 5, TN, sys_getsockopt, "getsockopt" }, [543] = { 2, 0, sys_io_setup, "io_setup" }, [544] = { 3, 0, sys_io_submit, "io_submit" }, +[545] = { 5, TD|TF|TP|SE|SI, sys_execveat, "execveat", }, diff --git a/linux/x86_64/syscallent.h b/linux/x86_64/syscallent.h index 458f6c9e..c1fedea2 100644 --- a/linux/x86_64/syscallent.h +++ b/linux/x86_64/syscallent.h @@ -315,3 +315,9 @@ [314] = { 3, 0, sys_sched_setattr, "sched_setattr" }, [315] = { 4, 0, sys_sched_getattr, "sched_getattr" }, [316] = { 5, TD|TF, sys_renameat2, "renameat2" }, +[317] = { 3, 0, sys_seccomp, "seccomp", }, +[318] = { 3, 0, sys_getrandom, "getrandom", }, +[319] = { 2, TD, sys_memfd_create, "memfd_create", }, +[320] = { 5, TD, sys_kexec_file_load, "kexec_file_load", }, +[321] = { 3, TD, sys_bpf, "bpf", }, +[322] = { 5, TD|TF|TP|SE|SI, sys_execveat, "execveat", }, diff --git a/linux/xtensa/syscallent.h b/linux/xtensa/syscallent.h index 18e66f93..76c04396 100644 --- a/linux/xtensa/syscallent.h +++ b/linux/xtensa/syscallent.h @@ -325,3 +325,6 @@ [334] = { 3, 0, sys_sched_setattr, "sched_setattr" }, [335] = { 4, 0, sys_sched_getattr, "sched_getattr" }, [336] = { 5, TD|TF, sys_renameat2, "renameat2" }, +[337] = { 3, 0, sys_seccomp, "seccomp", }, +[338] = { 3, 0, sys_getrandom, "getrandom", }, +[339] = { 2, TD, sys_memfd_create, "memfd_create", },