strace/retval.h
Dmitry V. Levin 33c725f817 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.
2018-03-28 04:29:22 +00:00

9 lines
205 B
C

/* retval to index and visa versa. */
#ifndef STRACE_RETVAL_H
#define STRACE_RETVAL_H
uint16_t retval_new(kernel_long_t rval);
kernel_long_t retval_get(uint16_t rval_idx);
#endif /* !STRACE_RETVAL_H */