[PATCH 05/10] misc: lkdtm: Always provide prototype for lkdtm_DOUBLE_FAULT()

From: Lee Jones
Date: Fri Jun 26 2020 - 09:05:43 EST


lkdtm_DOUBLE_FAULT() already has internal logic to handle
!CONFIG_X86_32. Compiling out the prototype actually prevents
that logic from being useful.

Fixes the following W=1 warning:

drivers/misc/lkdtm/bugs.c: At top level:
drivers/misc/lkdtm/bugs.c:420:6: warning: no previous prototype for âlkdtm_DOUBLE_FAULTâ [-Wmissing-prototypes]
420 | void lkdtm_DOUBLE_FAULT(void)
| ^~~~~~~~~~~~~~~~~~

Cc: Kees Cook <keescook@xxxxxxxxxxxx>
Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>
---
drivers/misc/lkdtm/lkdtm.h | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/misc/lkdtm/lkdtm.h b/drivers/misc/lkdtm/lkdtm.h
index 601a2156a0d48..8878538b2c132 100644
--- a/drivers/misc/lkdtm/lkdtm.h
+++ b/drivers/misc/lkdtm/lkdtm.h
@@ -31,9 +31,7 @@ void lkdtm_CORRUPT_USER_DS(void);
void lkdtm_STACK_GUARD_PAGE_LEADING(void);
void lkdtm_STACK_GUARD_PAGE_TRAILING(void);
void lkdtm_UNSET_SMEP(void);
-#ifdef CONFIG_X86_32
void lkdtm_DOUBLE_FAULT(void);
-#endif
void lkdtm_CORRUPT_PAC(void);

/* lkdtm_heap.c */
--
2.25.1