Re: [PATCH] uprobes: change handle_swbp() to send SIGTRAP with si_code=SI_KERNEL

2020-07-24 Thread Srikar Dronamraju
* Oleg Nesterov [2020-07-23 17:44:20]: > If a tracee is uprobed and it hits int3 inserted by debugger, handle_swbp() > does send_sig(SIGTRAP, current, 0) which means si_code == SI_USER. This used > to work when this code was written, but then GDB started to validate si_code > and now it simply

[PATCH] uprobes: change handle_swbp() to send SIGTRAP with si_code=SI_KERNEL

2020-07-23 Thread Oleg Nesterov
If a tracee is uprobed and it hits int3 inserted by debugger, handle_swbp() does send_sig(SIGTRAP, current, 0) which means si_code == SI_USER. This used to work when this code was written, but then GDB started to validate si_code and now it simply can't use breakpoints if the tracee has an active