Commit Graph

6 Commits

Author SHA1 Message Date
Hendiadyoin1
4d5496b2b2
KUBSAN: Add nearly all missing -fsanitize handlers (#5254) 2021-02-11 20:58:01 +01:00
Brian Gianforcaro
c95d48c8d6 Kernel: KUBSAN implementation of returns-nonnull-attribute
This didn't find anything in the current source.
2021-02-07 10:22:03 +01:00
Andreas Kling
04ff46bff4 Kernel: And some more KUBSAN checks :^)
Here comes a few more:

* enum
* object-size
* vptr
2021-02-06 17:39:49 +01:00
Andreas Kling
fad0332898 Kernel: Implement some more KUBSAN checks :^)
This patch enables the following -fsanitize sub-options:

* bounds
* bounds-strict
* integer-divide-by-zero
* return
* shift
* shift-base
* shift-exponent
2021-02-06 17:39:49 +01:00
Andreas Kling
d164f89ada Kenrel: Implement two more KUBSAN checks
This patch adds the following UndefinedBehaviorSanitizer sub-options:

* signed-integer-overflow
* vla-bound
2021-02-05 21:23:11 +01:00
Andreas Kling
d44be96893 Kernel: KUBSAN! (Kernel Undefined Behavior SANitizer) :^)
We now build the kernel with partial UBSAN support.
The following -fsanitize sub-options are enabled:

* nonnull-attribute
* bool

If the kernel detects UB at runtime, it will now print a debug message
with a stack trace. This is very cool! I'm leaving it on by default for
now, but we'll probably have to re-evaluate this as more options are
enabled and slowdown increases.
2021-02-05 21:23:11 +01:00