diff options
author | Jinbum Park <jinb.park7@gmail.com> | 2018-04-10 19:32:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-11 13:28:35 -0400 |
commit | 854686f4edf483db1e0d26d972bdb8fb65c8bfaa (patch) | |
tree | c0e498e408f0c56201b03881a1ae92ca0ec9518d /lib/Kconfig.ubsan | |
parent | f6f66c1bf53079ce1f0789c8b482fba35b81617d (diff) |
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 <jinb.park7@gmail.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/Kconfig.ubsan')
-rw-r--r-- | lib/Kconfig.ubsan | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Kconfig.ubsan b/lib/Kconfig.ubsan index a669c193b878..19d42ea75ec2 100644 --- a/lib/Kconfig.ubsan +++ b/lib/Kconfig.ubsan | |||
@@ -46,3 +46,10 @@ config UBSAN_NULL | |||
46 | help | 46 | help |
47 | This option enables detection of memory accesses via a | 47 | This option enables detection of memory accesses via a |
48 | null pointer. | 48 | null pointer. |
49 | |||
50 | config TEST_UBSAN | ||
51 | tristate "Module for testing for undefined behavior detection" | ||
52 | depends on m && UBSAN | ||
53 | help | ||
54 | This is a test module for UBSAN. | ||
55 | It triggers various undefined behavior, and detect it. | ||