On 20-May-12, at 5:04 AM, Al Viro wrote:
Actually, looks like I am missing something, but it's not
particulary subtle.
SYSCALL_TRACE is needed for do_syscall_trace_enter() to do anything;
any of SYSCALL_TRACE/SINGLESTEP/BLOCKSTEP is makes
do_syscall_trace_leave()
do things. So checking one bit in flags is not enough - any of
those 3 is
a reason for taking the slow path. The point still stands, though -
mfctl %cr30, %r1
LDREG TI_FLAGS(%r1),%r1
ldi (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | _TIF_BLOCKSTEP), %r19
and,COND(=) %r19, %r1, %r0
b,n .Ltracesys
would still be no worse on the fast path and would not hit the slow
path in
a lot of cases when the current code does it for no apparent reason.
Comments?
This looks good to me. There is similar code in entry.S.
I added the above change to my patch set for stable 3.3.6. System still
boots. I singled stepped /bin/ls through a directory listing and it
seemed
to work.
Dave
--
John David Anglin dave.anglin@xxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html