[PATCH v1 1/2] syscall.c: split trace_syscall() into 5 functions

Dmitry V. Levin ldv at altlinux.org
Mon Jun 5 11:35:23 UTC 2017


On Mon, Jun 05, 2017 at 02:23:40PM +0300, Victor Krapivensky wrote:
> On Mon, Jun 05, 2017 at 02:47:41AM +0300, Dmitry V. Levin wrote:
> > Why "static inline"?  Is it important whether the function is actually
> > inlined or not?  If not, no need to insist on inlining.
> 
> OK, removed "inline".
> 
> > Why syscall_entering_decode was given this name?  It does get_scno,
> > get_syscall_args, decode_mips_subcall, decode_socket_subcall,
> > decode_ipc_subcall - in other words, it fetches syscall number
> > and arguments.
> 
> 
> > This split is not the only one possible, what was the rationale for this
> > one?  For example, get_scno and get_syscall_args are not invoked by
> > syscall_entering_trace, but get_regs and get_syscall_result are invoked by
> > syscall_exiting_trace - why?
> 
> The intent is that the entering Lua hook will be run after
> syscall_entering_decode (if it returns 1), and the exiting one after
> syscall_exiting_measure. This way, the entering hook will be able to
> inject return value/signal and affect the way the syscall is traced.

Where are you going to call the exiting hook from?  Is it going to happen
before get_regs/get_syscall_result calls or after them?


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20170605/31ecf25a/attachment.bin>


More information about the Strace-devel mailing list