1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:58:12 +00:00
serenity/Userland/Libraries/LibC/sys
Patrick Meyer 83f88df757 Kernel: Add option to build with coverage instrumentation and KCOV
GCC and Clang allow us to inject a call to a function named
__sanitizer_cov_trace_pc on every edge. This function has to be defined
by us. By noting down the caller in that function we can trace the code
we have encountered during execution. Such information is used by
coverage guided fuzzers like AFL and LibFuzzer to determine if a new
input resulted in a new code path. This makes fuzzing much more
effective.

Additionally this adds a basic KCOV implementation. KCOV is an API that
allows user space to request the kernel to start collecting coverage
information for a given user space thread. Furthermore KCOV then exposes
the collected program counters to user space via a BlockDevice which can
be mmaped from user space.

This work is required to add effective support for fuzzing SerenityOS to
the Syzkaller syscall fuzzer. :^) :^)
2021-07-26 17:40:28 +02:00
..
arch Kernel+Userland: Add x86_64 registers to RegisterState/PtraceRegisters 2021-06-27 15:46:42 +02:00
cdefs.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
file.cpp LibC: Implement flock(2) using fcntl's F_SETLK 2021-07-20 17:44:30 +04:30
file.h LibC: Implement flock(2) using fcntl's F_SETLK 2021-07-20 17:44:30 +04:30
internals.h LibC: Don't use C++ attribute syntax in C-visible headers 2021-07-03 01:56:31 +04:30
ioctl.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ioctl_numbers.h Kernel: Add option to build with coverage instrumentation and KCOV 2021-07-26 17:40:28 +02:00
kcov.h Kernel: Add option to build with coverage instrumentation and KCOV 2021-07-26 17:40:28 +02:00
mman.cpp LibC: Move mman.h to sys/mman.h 2021-05-14 22:24:02 +02:00
mman.h Kernel: Remove unused madvise(MADV_GET_VOLATILE) 2021-07-25 17:28:06 +02:00
param.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
prctl.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
prctl.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
prctl_numbers.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ptrace.cpp Everywhere: Remove empty line after function body opening curly brace 2021-04-25 20:20:00 +02:00
ptrace.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
resource.h LibC: Add definition for the rlim_t type 2021-05-09 17:21:38 +01:00
select.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
select.h LibC: Make sure the definition for struct timeval is available 2021-06-16 20:08:13 +02:00
socket.cpp Kernel+Userspace: Implement the accept4() system call 2021-05-17 13:32:19 +02:00
socket.h LibC: Define MSG_OOB 2021-06-04 10:39:41 +02:00
stat.h Kernel+LibC: Add fstatat 2021-05-14 23:32:10 +02:00
statvfs.cpp LibC: Add functions for the new statvfs syscalls 2021-05-19 21:33:29 +02:00
statvfs.h LibC: Add functions for the new statvfs syscalls 2021-05-19 21:33:29 +02:00
sysmacros.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
time.h Ports: Fix building openssh 2021-04-25 09:28:21 +02:00
times.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ttydefaults.h LibC: Use \010 for erasing instead of \0177 2021-05-23 19:32:31 +02:00
types.h LibC: Make makedev()/minor()/major() static 2021-07-09 15:36:50 +02:00
uio.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
uio.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
un.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
utsname.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
wait.cpp LibC: Do not include errno.h inside unistd.h 2021-05-14 22:24:02 +02:00
wait.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00