]> granicus.if.org Git - strace/commit
Turn struct inject_data.rval into an index
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 28 Mar 2018 04:29:22 +0000 (04:29 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 28 Mar 2018 04:29:22 +0000 (04:29 +0000)
commit33c725f817c263009a8a52570b79c83d3e3d4ded
treeb799a6db27619fccfaaad4b90a0fbb47109e63b7
parent8c15ed29681519ef51e37fe0502949403229ab9b
Turn struct inject_data.rval into an index

Add one level of indirection to decrease the size of struct inject_data
as hundreds of these structures are created for each process when
injection mechanism is activated.

* retval.h: New file.
* retval.c: Likewise.
* Makefile.am (strace_SOURCES): Add them.
* defs.h (struct inject_data): Replace rval field with rval_idx.
* filter_qualify.c: Include "retval.h".
(parse_inject_token, qualify_inject_common): Initialize
struct inject_data.rval_idx using retval_new.
* syscall.c: Include "retval.h".
(tamper_with_syscall_exiting): Obtain the value that has to be injected
using retval_get.
Makefile.am
defs.h
filter_qualify.c
retval.c [new file with mode: 0644]
retval.h [new file with mode: 0644]
syscall.c