diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2014-02-05 16:17:02 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2014-02-05 16:17:02 +0000 |
commit | f67502e4045393fb46d73e876128dfd539a63b04 (patch) | |
tree | 330a087bdf6e04ae371979a08ee8de9709440ddd | |
parent | 2f332e937a549f7073a74ebeb66d0a4fe70040c9 (diff) | |
download | strace-f67502e4045393fb46d73e876128dfd539a63b04.tar.gz strace-f67502e4045393fb46d73e876128dfd539a63b04.tar.bz2 strace-f67502e4045393fb46d73e876128dfd539a63b04.tar.xz |
Implement finit_module decoding
* bjm.c (module_init_flags): New xlat structure.
(sys_finit_module): New function.
* linux/dummy.h (sys_finit_module): Remove.
* linux/syscall.h (sys_finit_module): New prototype.
-rw-r--r-- | bjm.c | 27 | ||||
-rw-r--r-- | linux/dummy.h | 1 | ||||
-rw-r--r-- | linux/syscall.h | 1 |
3 files changed, 28 insertions, 1 deletions
@@ -200,3 +200,30 @@ sys_init_module(struct tcb *tcp) } return 0; } + +#define MODULE_INIT_IGNORE_MODVERSIONS 1 +#define MODULE_INIT_IGNORE_VERMAGIC 2 + +static const struct xlat module_init_flags[] = { + XLAT(MODULE_INIT_IGNORE_MODVERSIONS), + XLAT(MODULE_INIT_IGNORE_VERMAGIC), + XLAT_END +}; + +int +sys_finit_module(struct tcb *tcp) +{ + if (exiting(tcp)) + return 0; + + /* file descriptor */ + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + /* param_values */ + printstr(tcp, tcp->u_arg[1], -1); + tprints(", "); + /* flags */ + printflags(module_init_flags, tcp->u_arg[2], "MODULE_INIT_???"); + + return 0; +} diff --git a/linux/dummy.h b/linux/dummy.h index 78d264f..b9cd91b 100644 --- a/linux/dummy.h +++ b/linux/dummy.h @@ -33,7 +33,6 @@ /* still unfinished */ #define sys_add_key printargs -#define sys_finit_module printargs #define sys_ioperm printargs #define sys_iopl printargs #define sys_ioprio_get printargs diff --git a/linux/syscall.h b/linux/syscall.h index d8ce91f..17b9431 100644 --- a/linux/syscall.h +++ b/linux/syscall.h @@ -74,6 +74,7 @@ int sys_fchown(); int sys_fchownat(); int sys_fcntl(); int sys_fgetxattr(); +int sys_finit_module(); int sys_flistxattr(); int sys_flock(); int sys_fork(); |