Introduce s390_runtime_instr system call decoder
PATCH 8/12 Introduce s390_runtime_instr system call decoder
* linux/s390/syscallent.h ([342]): Change decoder to s390_runtime_instr.
* linux/s390x/syscallent.h: Likewise.
* s390.c (SYS_FUNC(s390_runtime_instr)): New function.
* xlat/s390_runtime_instr_commands.in: New file.
--- linux/s390/syscallent.h | 2 +- linux/s390x/syscallent.h | 2 +- s390.c | 31 +++++++++++++++++++++++++++++++ xlat/s390_runtime_instr_commands.in | 2 ++ 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 xlat/s390_runtime_instr_commands.in
linux/s390/syscallent.h +1 -1
@@ -371,7 +371,7 @@ [339] = { 2, TD, SEN(setns), "setns" }, [340] = { 6, 0, SEN(process_vm_readv), "process_vm_readv" }, [341] = { 6, 0, SEN(process_vm_writev), "process_vm_writev" }, -[342] = { 2, 0, SEN(printargs), "s390_runtime_instr" }, +[342] = { 2, 0, SEN(s390_runtime_instr), "s390_runtime_instr" }, [343] = { 5, 0, SEN(kcmp), "kcmp" }, [344] = { 3, TD, SEN(finit_module), "finit_module" }, [345] = { 3, 0, SEN(sched_setattr), "sched_setattr" },
linux/s390x/syscallent.h +1 -1
@@ -355,7 +355,7 @@ [339] = { 2, TD, SEN(setns), "setns" }, [340] = { 6, 0, SEN(process_vm_readv), "process_vm_readv" }, [341] = { 6, 0, SEN(process_vm_writev), "process_vm_writev" }, -[342] = { 2, 0, SEN(printargs), "s390_runtime_instr" }, +[342] = { 2, 0, SEN(s390_runtime_instr), "s390_runtime_instr" }, [343] = { 5, 0, SEN(kcmp), "kcmp" }, [344] = { 3, TD, SEN(finit_module), "finit_module" }, [345] = { 3, 0, SEN(sched_setattr), "sched_setattr" },
s390.c +31 -0
@@ -36,6 +36,7 @@#include "print_fields.h" #include "xlat/s390_guarded_storage_commands.h" +#include "xlat/s390_runtime_instr_commands.h" #include "xlat/s390_sthyi_function_codes.h" /*
@@ -1210,4 +1211,34 @@ SYS_FUNC(s390_guarded_storage) return RVAL_DECODED; } +SYS_FUNC (s390_runtime_instr) +{ +int command = (int ) tcp->u_arg[0 ]; +int signum = (int ) tcp->u_arg[1 ]; + +const char *command_descr = +xlookup (s390_runtime_instr_commands, command); + +tprintf ("%d" , command); +tprints_comment (command_descr ? command_descr : +"S390_RUNTIME_INSTR_???" ); + +/* +* signum is ignored since Linux 4.4, but let's print it for start +* command anyway. +*/ +switch (command) { +case S390_RUNTIME_INSTR_START : +tprints (", " ); +tprints (signame (signum )); +break ; + +case S390_RUNTIME_INSTR_STOP : +default : +break ; + } + +return RVAL_DECODED ; +} +#endif /* defined S390 || defined S390X */
xlat/s390_runtime_instr_commands.in new file +2 -0
@@ -0,0 +1,2 @@ +S390_RUNTIME_INSTR_START 0x1 +S390_RUNTIME_INSTR_STOP 0x2
Signature · 1 line
2.1.4