summaryrefslogtreecommitdiffstats
path: root/lib/Kconfig.debug
diff options
context:
space:
mode:
authorRasmus Villemoes2018-05-08 00:36:28 +0200
committerKees Cook2018-06-05 21:16:51 +0200
commit455a35a6cdb6f53fe9294e23301eb056f2908bd9 (patch)
treed100b0647b858d100609b4115680e1349cc912aa /lib/Kconfig.debug
parentcompiler.h: enable builtin overflow checkers and add fallback code (diff)
downloadkernel-qcow2-linux-455a35a6cdb6f53fe9294e23301eb056f2908bd9.tar.gz
kernel-qcow2-linux-455a35a6cdb6f53fe9294e23301eb056f2908bd9.tar.xz
kernel-qcow2-linux-455a35a6cdb6f53fe9294e23301eb056f2908bd9.zip
lib: add runtime test of check_*_overflow functions
This adds a small module for testing that the check_*_overflow functions work as expected, whether implemented in C or using gcc builtins. Example output: test_overflow: u8 : 18 tests test_overflow: s8 : 19 tests test_overflow: u16: 17 tests test_overflow: s16: 17 tests test_overflow: u32: 17 tests test_overflow: s32: 17 tests test_overflow: u64: 17 tests test_overflow: s64: 21 tests Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> [kees: add output to commit log, drop u64 tests on 32-bit] Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'lib/Kconfig.debug')
-rw-r--r--lib/Kconfig.debug3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index c40c7b734cd1..d9fe912afed5 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1785,6 +1785,9 @@ config TEST_BITMAP
config TEST_UUID
tristate "Test functions located in the uuid module at runtime"
+config TEST_OVERFLOW
+ tristate "Test check_*_overflow() functions at runtime"
+
config TEST_RHASHTABLE
tristate "Perform selftest on resizable hash table"
default n