Commit 65892723 authored by Kees Cook's avatar Kees Cook Committed by Greg Kroah-Hartman

lkdtm: add "WARNING" trigger

For additional testing, add "WARNING" as a trigger that calls WARN_ON(1).
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4f198289
...@@ -68,6 +68,7 @@ enum ctype { ...@@ -68,6 +68,7 @@ enum ctype {
CT_NONE, CT_NONE,
CT_PANIC, CT_PANIC,
CT_BUG, CT_BUG,
CT_WARNING,
CT_EXCEPTION, CT_EXCEPTION,
CT_LOOP, CT_LOOP,
CT_OVERFLOW, CT_OVERFLOW,
...@@ -95,6 +96,7 @@ static char* cp_name[] = { ...@@ -95,6 +96,7 @@ static char* cp_name[] = {
static char* cp_type[] = { static char* cp_type[] = {
"PANIC", "PANIC",
"BUG", "BUG",
"WARNING",
"EXCEPTION", "EXCEPTION",
"LOOP", "LOOP",
"OVERFLOW", "OVERFLOW",
...@@ -284,6 +286,9 @@ static void lkdtm_do_action(enum ctype which) ...@@ -284,6 +286,9 @@ static void lkdtm_do_action(enum ctype which)
case CT_BUG: case CT_BUG:
BUG(); BUG();
break; break;
case CT_WARNING:
WARN_ON(1);
break;
case CT_EXCEPTION: case CT_EXCEPTION:
*((int *) 0) = 0; *((int *) 0) = 0;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment