Hi -

> > The alternative I considered is the nonexistence of global tracing
> > support, thus no utrace_global_flags test in the syscall fast path.
> 
> It will never be in the fast path.  It will always require
> TIF_SYSCALL_TRACE to bet set on each thread, which means the slow path.
> [...]

OK, I must have misunderstood your original posting:

# [...]
# d. Kernel already has checks here, so "almost free".
# 
#    The utrace event hooks are at places where the kernel has had old
#    ptrace checks forever.  The old code has fast paths that do:
#       if (current->ptrace & mask) slow path;
#    Now in those same places there is:
#       if (current->utrace_flags & mask) slow path;
#    So the cost of the checks is identical to what's already there.  [...]
#    For global tracing, those checks would be:
#       if ((current->utrace_flags | utrace_global_flags) & mask) slow path;
# [...]


- FChE

Reply via email to