summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_kubsan.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Use atomic operations consistently while writing to kubsan_slot.anton2019-11-061-6/+6
| | | | | | Otherwise, reports might go by unnoticed. Prodded by and ok visa@
* Regularly poll and report kubsan findings using the timeout(9) APIanton2019-11-041-17/+14
| | | | | | | instead of task(9). Undefined behavior can potentially be present in any context and calling task_add() isn't always safe. ok visa@
* rework kubsan_state into simpler boolean named kubsan_coldanton2019-11-031-7/+5
|
* add missing handler for float cast overflow; caused by code inanton2019-11-031-1/+41
| | | | sys/dev/pci/drm/amd/display/dc/calcs/dcn_calc_auto.c
* Undefined behavior (UB) can potentially be present anywhere in theanton2019-06-201-218/+380
| | | | | | | | | | | | kernel. kubsan reports findings using printf() and assuming that calling printf() is safe in all contexts can be problematic. Instead, defer reporting of findings to the systq task queue. Storage for findings is allocated early in the boot process in order to catch potential UB during boot. The same findings are reported once the task queue subsystem has been initialized. Feedback from kettenis@ and ok mpi@
* sort struct declarationsanton2019-06-031-5/+5
|
* rename struct for consistencyanton2019-05-241-5/+7
|
* fix incorrect order of argumentsanton2019-05-241-3/+3
|
* A source location in kubsan is an absolute path making reports quiteanton2019-05-241-3/+31
| | | | long. Instead, use everything after the first /sys/ segment as the path.
* The latest inteldrm update brought along code making use ofanton2019-05-241-4/+48
| | | | | | | | __attribute__((nonnull)); which the undefined behavior sanitizer in clang is aware of. A new handler is therefore needed in order to compile a kernel with kubsan enabled. ok visa@
* correct LOCATION_REPORTED maskanton2019-03-191-2/+2
|
* Add kubsan(4), a undefined behavior sanitizer for the kernel. It'santon2019-03-181-0/+491
capable of detecting undefined behavior at runtime and all findings are printed to the system console, including the offending line in the source code. kubsan is limited to architectures using Clang as their default compiler and is not enabled by default. Derived from the NetBSD implementation. ok kettenis@ visa@