ladybird/Kernel
Itamar 6b74d38aab Kernel: Add 'ptrace' syscall
This commit adds a basic implementation of
the ptrace syscall, which allows one process
(the tracer) to control another process (the tracee).

While a process is being traced, it is stopped whenever a signal is
received (other than SIGCONT).

The tracer can start tracing another thread with PT_ATTACH,
which causes the tracee to stop.

From there, the tracer can use PT_CONTINUE
to continue the execution of the tracee,
or use other request codes (which haven't been implemented yet)
to modify the state of the tracee.

Additional request codes are PT_SYSCALL, which causes the tracee to
continue exection but stop at the next entry or exit from a syscall,
and PT_GETREGS which fethces the last saved register set of the tracee
(can be used to inspect syscall arguments and return value).

A special request code is PT_TRACE_ME, which is issued by the tracee
and causes it to stop when it calls execve and wait for the
tracer to attach.
2020-03-28 18:27:18 +01:00
..
ACPI AK: Reduce header dependency graph of String.h 2020-03-23 13:48:44 +01:00
Arch/i386 CPU: Move EOI call to the end of handle_interrupt() 2020-03-24 16:15:33 +01:00
Devices Kernel: Remove the floppy driver 2020-03-28 10:09:48 +01:00
FileSystem AK: Reduce header dependency graph of String.h 2020-03-23 13:48:44 +01:00
Heap Kernel: Add missing #includes now that <AK/StdLibExtras.h> is smaller 2020-03-08 13:06:51 +01:00
Interrupts Interrupts: Handle spurious IRQs from eoi() method 2020-03-24 16:15:33 +01:00
Net Kernel: Limit IRQ rate within E1000 network adapter 2020-03-24 16:15:33 +01:00
PCI AK: Reduce header dependency graph of String.h 2020-03-23 13:48:44 +01:00
Time AK: Reduce header dependency graph of String.h 2020-03-23 13:48:44 +01:00
TTY Kernel: Make ^W and ^U actually erase characters 2020-03-26 08:18:47 +01:00
VM AK: Reduce header dependency graph of String.h 2020-03-23 13:48:44 +01:00
.bochsrc Meta: Make Serenity run on Bochs once again 2019-08-06 21:09:24 +02:00
.gitignore Meta: Removed all gitignore in the source tree only keeping the root one 2019-06-30 10:41:26 +02:00
Assertions.h Kernel: Remove more <LibBareMetal/Output/kstdio.h> includes 2020-02-10 12:07:48 +01:00
build-image-grub.sh Partition Table: Change Script files 2020-02-02 00:20:41 +01:00
build-image-qemu.sh Build: Add FreeBSD support (#1492) 2020-03-21 09:46:30 +01:00
build-root-filesystem.sh Build: Oops, LibJS tests were meant to go in /home/anon/js-tests 2020-03-25 16:16:04 +01:00
CMOS.cpp Kernel: Apply changes to use LibBareMetal definitions 2020-02-09 19:38:17 +01:00
CMOS.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
debug-kernel Debugging: Add kernel debugging support 2020-01-13 11:06:42 +01:00
DoubleBuffer.cpp AK: Reduce header dependency graph of String.h 2020-03-23 13:48:44 +01:00
DoubleBuffer.h Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
FB.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Forward.h Kernel: Add 'ptrace' syscall 2020-03-28 18:27:18 +01:00
grub-ebr.cfg Kernel: Change noacpi GRUB entry to use the right boot argument 2020-03-24 16:15:33 +01:00
grub-gpt.cfg Kernel: Change noacpi GRUB entry to use the right boot argument 2020-03-24 16:15:33 +01:00
grub-mbr.cfg Kernel: Change noacpi GRUB entry to use the right boot argument 2020-03-24 16:15:33 +01:00
init.cpp Kernel: Remove the floppy driver 2020-03-28 10:09:48 +01:00
KBuffer.h AK: Reduce header dependency graph of String.h 2020-03-23 13:48:44 +01:00
KBufferBuilder.cpp Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
KBufferBuilder.h Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
KernelInfoPage.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
KeyCode.h Kernel: Add key_code_count 2020-01-31 13:13:04 +01:00
KParams.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
KParams.h Kernel: Run clang-format on files 2020-03-22 01:22:32 +01:00
KResult.h Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
KSyms.cpp Kernel: Use klog() instead of kprintf() 2020-03-02 22:23:39 +01:00
KSyms.h Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
linker.ld Kernel: Move kernel above the 3GB virtual address mark 2020-01-17 22:34:26 +01:00
Lock.cpp Kernel: Use klog() instead of kprintf() 2020-03-02 22:23:39 +01:00
Lock.h Kernel: Allow process with multiple threads to call exec and exit 2020-02-26 13:06:40 +01:00
makeall.sh Build: Add FreeBSD support (#1492) 2020-03-21 09:46:30 +01:00
Makefile Kernel: Add 'ptrace' syscall 2020-03-28 18:27:18 +01:00
mkmap.sh Meta: Fix shellcheck warnings in various scripts 2020-02-10 10:46:25 +01:00
Module.h Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
MousePacket.h Kernel: Add support for vmmouse 2020-02-04 19:11:52 +01:00
Multiboot.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
PerformanceEventBuffer.cpp Kernel: Run clang-format on files 2020-03-22 01:22:32 +01:00
PerformanceEventBuffer.h AK: Add global FlatPtr typedef. It's u32 or u64, based on sizeof(void*) 2020-03-08 13:06:51 +01:00
Process.cpp Kernel: Add 'ptrace' syscall 2020-03-28 18:27:18 +01:00
Process.h Kernel: Add 'ptrace' syscall 2020-03-28 18:27:18 +01:00
Profiling.cpp Kernel: Don't blindly dereference Process::executable() 2020-02-27 10:41:32 +01:00
Profiling.h Kernel: Reset profiling state on exec() (but keep it going) 2020-02-22 10:54:50 +01:00
Random.cpp Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
Random.h Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
RTC.cpp Kernel: Use klog() instead of kprintf() 2020-03-02 22:23:39 +01:00
RTC.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
run Kernel: Run QEMU machine with two virtual processors 2020-03-24 16:15:33 +01:00
Scheduler.cpp WaitBlocker: don't unblock if thread has pending SIGCONT 2020-03-28 18:27:18 +01:00
Scheduler.h Scheduler: Use monotonic time for blocking threads 2020-03-19 15:48:00 +01:00
SharedBuffer.cpp Kernel: Use klog() instead of kprintf() 2020-03-02 22:23:39 +01:00
SharedBuffer.h Kernel+LibC: Rename shared buffer syscalls to use a prefix 2020-02-28 12:55:58 +01:00
sync.sh Meta: Fix shellcheck warnings in various scripts 2020-02-10 10:46:25 +01:00
Syscall.cpp Kernel: Add 'ptrace' syscall 2020-03-28 18:27:18 +01:00
Syscall.h Kernel: Add 'ptrace' syscall 2020-03-28 18:27:18 +01:00
TestModule.cpp Kernel: Use klog() instead of kprintf() 2020-03-02 22:23:39 +01:00
Thread.cpp Kernel: Add 'ptrace' syscall 2020-03-28 18:27:18 +01:00
Thread.h Kernel: Add 'ptrace' syscall 2020-03-28 18:27:18 +01:00
ThreadTracer.cpp Kernel: Add 'ptrace' syscall 2020-03-28 18:27:18 +01:00
ThreadTracer.h Kernel: Add 'ptrace' syscall 2020-03-28 18:27:18 +01:00
TimerQueue.cpp Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
TimerQueue.h Kernel: Introduce the new Time management subsystem 2020-03-19 15:48:00 +01:00
UnixTypes.h Kernel: Add 'ptrace' syscall 2020-03-28 18:27:18 +01:00
WaitQueue.cpp Kernel: Allow process with multiple threads to call exec and exit 2020-02-26 13:06:40 +01:00
WaitQueue.h Kernel: Allow process with multiple threads to call exec and exit 2020-02-26 13:06:40 +01:00