D11236: [KCrash] Establish socket to allow change of ptrace scope

Christoph Roick noreply at phabricator.kde.org
Sun Mar 11 15:11:14 UTC 2018


croick created this revision.
croick added a reviewer: Frameworks.
Restricted Application added a project: Frameworks.
croick requested review of this revision.

REVISION SUMMARY
  - In Linux recent kernels only allow attaching of processes to a debugger, if
    - the right to attach to processes is enabled system-wide
    - the debugger is a child process of the debuggee
    - or the debuggee grants access by a call to prctl(PR_SET_PTRACER, debugger_pid, 0, 0, 0);
  - also see bug 245529
  - If DrKonqi suggests debugging the crashed application with an external debugger, this right should be transferred to the debugger.
  - The patch opens a socket connection which allows DrKonqi to request a transfer of this right to the debugger.

TEST PLAN
  - try to attach the debugged process to gdb or KDevelop by using the debug button: operation will not be permitted
  - apply corresponding patches to KCrash and DrKonqi D11235 <https://phabricator.kde.org/D11235>
  - the process can now be debugged
  - after detaching the process again, a backtrace can be created using the DrKonqi dialog as usual

REPOSITORY
  R285 KCrash

BRANCH
  ptracer

REVISION DETAIL
  https://phabricator.kde.org/D11236

AFFECTED FILES
  src/kcrash.cpp

To: croick, #frameworks
Cc: michaelh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180311/faccdb36/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list