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

utrace/ptrace mutual exclusion



I've added a change (only in git) so that with CONFIG_UTRACE=y and
CONFIG_UTRACE_PTRACE=n, ptrace and utrace are mutually exclusive on each
task.  The utrace_attach or PTRACE_ATTACH call fails with a characteristic
EBUSY so that the failure looks new and unusual in an obvious way.

It would be useful if people could try that configuration and see how
annoying it is when e.g. using systemtap with utrace/uprobes stuff.
It will make any "trace everything for a while" kinds of uses annoying,
since they will cause you to be unable to use strace or gdb while the stap
script is running (unless the debugging session is already going first).

It's occurred to me that since the CONFIG_UTRACE_PTRACE code is so abysmal,
it might be easier and better to merge utrace upstream alone, with the
mutual exclusion safety feature, and whatever pure-utrace things we have to
merge.  The proper ptrace cooperation is important, but the mutual
exclusion makes it a safe limitation rather than a destabilizer to work on
utrace things without it.

Anyway, it's worth figuring out how annoying this configuration is now
before trying to decide about that.


Thanks,
Roland


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