Comment 3 for bug 636278

Revision history for this message
In , Eric-pouech (eric-pouech) wrote :

I don't think setting /proc/sys/kernel/yama/ptrace_scope is a viable workaround

let's consider three regular cases of wine usage:
A/ a program crashes, and default fault handler starts winedbg on this process
B/ a program sets its own stack unwinder (likely in a fault handler)
C/ a programmer fires winedbg foo

in all three cases above, the calls to ptrace are made inside wineserver, so, in all the cases, the unix process (wineserver) which does the calls to ptrace is the (grand*)-parent of the process being ptraced
as a conclusion, installing Wine on ubuntu should reset ptrace_scope to 0, which is not acceptable IMO to cover the cases A, B and C (setting ptrace_scope to 0 could be acceptable in usecase C, for developpers)

so we need a better (finer grain) solution:
- either rearchitecture Wine process management so that wineserver is always a (grand*)-parent of any wine process (oouch)
- rework the kernel evolution so that an exec can get the ptrace_scope capability (I assume gdb is likely to ask for the same stuff), and set it to wineserver

A+