mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
lkdtm: include WARN format string
In order to test the ordering of WARN format strings, actually include one in LKDTM. Link: http://lkml.kernel.org/r/1510100869-73751-2-git-send-email-keescook@chromium.org Signed-off-by: Kees Cook <keescook@chromium.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Fengguang Wu <fengguang.wu@intel.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
d15809f364
commit
d32f11ba28
1 changed files with 3 additions and 1 deletions
|
@ -63,9 +63,11 @@ void lkdtm_BUG(void)
|
||||||
BUG();
|
BUG();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int warn_counter;
|
||||||
|
|
||||||
void lkdtm_WARNING(void)
|
void lkdtm_WARNING(void)
|
||||||
{
|
{
|
||||||
WARN_ON(1);
|
WARN(1, "Warning message trigger count: %d\n", warn_counter++);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lkdtm_EXCEPTION(void)
|
void lkdtm_EXCEPTION(void)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue