diff options
author | Kees Cook <keescook@chromium.org> | 2013-07-08 10:01:31 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-24 22:47:19 -0700 |
commit | 65892723c386d658234ffffa35789e68e0601982 (patch) | |
tree | 012dc12cf2a6bb976270d7a2bd639bc91794ea0f /drivers/misc | |
parent | 4f198289747f0391bc5a5574279b1791a8ca2d06 (diff) | |
download | op-kernel-dev-65892723c386d658234ffffa35789e68e0601982.zip op-kernel-dev-65892723c386d658234ffffa35789e68e0601982.tar.gz |
lkdtm: add "WARNING" trigger
For additional testing, add "WARNING" as a trigger that calls WARN_ON(1).
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/lkdtm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/misc/lkdtm.c b/drivers/misc/lkdtm.c index adb6bde..b1323fc 100644 --- a/drivers/misc/lkdtm.c +++ b/drivers/misc/lkdtm.c @@ -68,6 +68,7 @@ enum ctype { CT_NONE, CT_PANIC, CT_BUG, + CT_WARNING, CT_EXCEPTION, CT_LOOP, CT_OVERFLOW, @@ -95,6 +96,7 @@ static char* cp_name[] = { static char* cp_type[] = { "PANIC", "BUG", + "WARNING", "EXCEPTION", "LOOP", "OVERFLOW", @@ -284,6 +286,9 @@ static void lkdtm_do_action(enum ctype which) case CT_BUG: BUG(); break; + case CT_WARNING: + WARN_ON(1); + break; case CT_EXCEPTION: *((int *) 0) = 0; break; |