Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-doc
Path: blob/main/website/content/en/status/report-2023-01-2023-03/aarch64-kasan.adoc
18096 views
=== Kernel Address Sanitizer on AArch64

Contact: Kyle Evans <[email protected]>

Sanitizers are bug detection facilities which use a combination of instrumentation inserted by the compiler (LLVM in this case) and runtime state tracking to detect bugs in C code.
They can automatically detect many types of C programming bugs, such as use-after-frees and uses of uninitialized variables, which may otherwise require substantial effort to identify.
They are particularly effective in combination with regression testing suites or fuzzing tools such as link:https://github.com/google/syzkaller[syzkaller].
Unlike tools such as Valgrind, software must be recompiled to enable a given sanitizer, but sanitizers can be used in the kernel.
Kernels with sanitizers enabled incur a significant performance overhead from the runtime, in both CPU utilization and memory usage.

As of gitref:89c52f9d59fa[repository=src], the kernel address sanitizer that was previously exclusive to amd64 is ported to arm64.

Prior testing has been done on a decent variety of machines, including:

- Various Ampere Altra machines
- QEMU
- Microsoft's "Volterra" Devkit
- bhyve (WIP).

Further testing on other hardware would be both welcomed and appreciated.

Sponsor: Juniper Networks, Inc. +
Sponsor: Klara, Inc.