mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 15:08:21 +00:00
kcov: initial implementation
Implement a device (/dev/kcov) that exposes coverage info for the kernel. This will be especially useful for coverage-based fuzzing (e.g. syzkaller). Exclude a lot of functions which would crash/otherwise interfere in the coverage, including only processing coverage callbacks when not handling an irq.
This commit is contained in:
@@ -140,7 +140,7 @@ bool arch_cpu_smap_enabled(void) {
|
||||
return has_smap;
|
||||
}
|
||||
|
||||
void arch_nmi_isr(context_t *ctx) {
|
||||
KCOV_DISABLED void arch_nmi_isr(context_t *ctx) {
|
||||
// we are in an NMI context, running on IST0
|
||||
// first load the proper gsbase to get access to cpu-local variables.
|
||||
// the pointer to cpu's data is at the beggining of the stack so after the context struct.
|
||||
|
||||
Reference in New Issue
Block a user