summaryrefslogtreecommitdiff
path: root/Kernel/Devices/KCOVInstance.cpp
AgeCommit message (Collapse)Author
2021-12-28Kernel: Propagate overflow errors from Memory::page_round_upGuilherme Goncalves
Fixes #11402.
2021-12-11Kernel: Remove unused String.h includesHendiadyoin1
This makes searching for not yet OOM safe interfaces a bit easier.
2021-11-30Kernel: Handle string format errors in KCOVInstance :^)Brian Gianforcaro
2021-11-08Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T>Andreas Kling
We now use AK::Error and AK::ErrorOr<T> in both kernel and userspace! This was a slightly tedious refactoring that took a long time, so it's not unlikely that some bugs crept in. Nevertheless, it does pass basic functionality testing, and it's just real nice to finally see the same pattern in all contexts. :^)
2021-09-06Kernel/KCOV: Use TRY() in KCOVInstance::buffer_allocate()Andreas Kling
2021-09-06Kernel: Make kernel region allocators return KResultOr<NOP<Region>>Andreas Kling
This expands the reach of error propagation greatly throughout the kernel. Sadly, it also exposes the fact that we're allocating (and doing other fallible things) in constructors all over the place. This patch doesn't attempt to address that of course. That's work for our future selves.
2021-09-06Kernel/KCOV: Bring closer to typical SerenityOS coding styleAndreas Kling
- Remove a bunch of redundant `this->` - Make class data members private and provide accessors instead
2021-08-15Kernel: Make Kernel::VMObject allocation functions return KResultOrsin-ack
This makes for nicer handling of errors compared to checking whether a RefPtr is null. Additionally, this will give way to return different types of errors in the future.
2021-08-06Kernel: Add convenience values to the Memory::Region::Access enumAndreas Kling
Instead of `Memory::Region::Access::Read | Memory::Region::AccessWrite` you can now say `Memory::Region::Access::ReadWrite`.
2021-08-06Kernel: Move Kernel/Memory/ code into Kernel::Memory namespaceAndreas Kling
2021-07-26Kernel: Fix integer overflow in KCOV_SETBUFSIZE ioctlPatrick Meyer
2021-07-27Kernel: Make KCOVDevice::ioctl() return KResultAli Mohammad Pur
Recent ioctl() changes broke this, this commit fixes that and the build.
2021-07-26Kernel: Add option to build with coverage instrumentation and KCOVPatrick Meyer
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. :^) :^)