Re: Adding TIF_TRACE_KERNEL to x86_64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 26, 2007 at 03:37:38PM -0400, Mathieu Desnoyers wrote:
> 
> 1 - process A enters in a syscall, TIF_KERNEL_TRACE is cleared
> 2 - we activate TIF_KERNEL_TRACE
> 3 - process A returns from syscall (with wrong top of stack ?) -> segfault.
> 
> Am I on the right track ?

Yes. The code was not designed to allow that. The syscall path
has been optimized to go as fast as possible.

> 
> Can this be a concern with TIF_SYSCALL_TRACE also ? (potential race in
> ptrace ?)

ptrace only changes state in stopped processes; and those are not hanging
in syscalls. So no there is no race in a standard kernel.

If you wanted to change it the right way would be probably to test
for SYSCALL_TRACE too in the work flags and handle it there

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux