mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
lib: add testing module for UBSAN
This is a test module for UBSAN. It triggers all undefined behaviors that linux supports now, and detect them. All test-cases have passed by compiling with gcc-5.5.0. If use gcc-4.9.x, misaligned, out-of-bounds, object-size-mismatch will not be detected. Because gcc-4.9.x doesn't support them. Link: http://lkml.kernel.org/r/20180309102247.GA2944@pjb1027-Latitude-E5410 Signed-off-by: Jinbum Park <[email protected]> Cc: Andrey Ryabinin <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Kees Cook <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
f6f66c1bf5
commit
854686f4ed
3 changed files with 153 additions and 0 deletions
|
|
@ -46,3 +46,10 @@ config UBSAN_NULL
|
|||
help
|
||||
This option enables detection of memory accesses via a
|
||||
null pointer.
|
||||
|
||||
config TEST_UBSAN
|
||||
tristate "Module for testing for undefined behavior detection"
|
||||
depends on m && UBSAN
|
||||
help
|
||||
This is a test module for UBSAN.
|
||||
It triggers various undefined behavior, and detect it.
|
||||
|
|
|
|||
Loading…
Reference in a new issue