On Tue, 2011-08-23 at 23:18 +0400, Dmitry V. Levin wrote: > On Mon, Aug 22, 2011 at 12:28:59PM +0200, Denys Vlasenko wrote: > > On Mon, 2011-08-22 at 12:21 +0200, Denys Vlasenko wrote: > > > 4. Another speedup: on x86, EAX read on syscall entry is also not > > > necessary if we know that post-execve SIGTRAP is disabled by > > > PTRACE_O_TRACEEXEC ptrace option. This patch (a) moves EAX retrieval > > > from syscall_fixup to get_scno_on_sysexit, and (b) perform EAX retrieval > > > in syscall_fixup only if we are in syscall entry and PTRACE_O_TRACEEXEC > > > option is not on. > > If the sysexit part of this EAX retrieval code goes to > get_scno_on_sysexit(), why the sysenter part of it doesn't go to > get_scno_on_sysenter() as well?
EAX retrieval has nothing to do with getting syscall no, so it should not be in get_scno_on_sysenter(). get_scno_on_sysexit() is a total misnomer, and should be renamed, something like get_retval_on_sysexit(). As opposed to get_scno_on_sysenter(), it makes a lot of sense to retrieve EAX there. Therefore there should be no symmetry between get_scno_on_sysenter() and get_scno_on_sysexit(). This is a false impression caused by their names being similar. -- vda ------------------------------------------------------------------------------ EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev _______________________________________________ Strace-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/strace-devel
