summaryrefslogtreecommitdiff
path: root/Kernel/Arch
diff options
context:
space:
mode:
authorItamar <itamar8910@gmail.com>2020-08-15 10:57:53 +0300
committerAndreas Kling <kling@serenityos.org>2020-08-15 15:06:35 +0200
commit3b422564f3a3283e0c7f5fdf7cadbcd8b86a8878 (patch)
tree0e20742c09d0ec369b25bcb989617cf1f5a7201c /Kernel/Arch
parent47d7faa998b933e669747824baa35c908c9c3144 (diff)
downloadserenity-3b422564f3a3283e0c7f5fdf7cadbcd8b86a8878.zip
Kernel: Fix behaviour of PT_TRACEME in ptrace
The behaviour of the PT_TRACEME feature has been broken for some time, this change fixes it. When this ptrace flag is used, the traced process should be paused before exiting execve. We previously were sending the SIGSTOP signal at a stage where interrupts are disabled, and the traced process continued executing normally, without pausing and waiting for the tracer. This change fixes it.
Diffstat (limited to 'Kernel/Arch')
-rw-r--r--Kernel/Arch/i386/CPU.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/Kernel/Arch/i386/CPU.cpp b/Kernel/Arch/i386/CPU.cpp
index 7a3a4f5159..99ff67a368 100644
--- a/Kernel/Arch/i386/CPU.cpp
+++ b/Kernel/Arch/i386/CPU.cpp
@@ -1190,10 +1190,6 @@ extern "C" void context_first_init(Thread* from_thread, Thread* to_thread, TrapF
Scheduler::enter_current(*from_thread);
- if (to_thread->process().wait_for_tracer_at_next_execve()) {
- to_thread->send_urgent_signal_to_self(SIGSTOP);
- }
-
// Since we got here and don't have Scheduler::context_switch in the
// call stack (because this is the first time we switched into this
// context), we need to notify the scheduler so that it can release