Message ID | 20200626130525.389469-6-lee.jones@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Fix a bunch of W=1 warnings in Misc | expand |
On Fri, Jun 26, 2020 at 3:05 PM Lee Jones <lee.jones@linaro.org> wrote: > > 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@chromium.org> > Signed-off-by: Lee Jones <lee.jones@linaro.org> Acked-by: Arnd Bergmann <arnd@arndb.de>
On Fri, Jun 26, 2020 at 02:05:20PM +0100, Lee Jones wrote: > 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@chromium.org> > Signed-off-by: Lee Jones <lee.jones@linaro.org> Thanks! This change is actually already part of another patch and is waiting for Greg to pick up: https://lore.kernel.org/lkml/20200529200347.2464284-5-keescook@chromium.org/
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 */
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@chromium.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/misc/lkdtm/lkdtm.h | 2 -- 1 file changed, 2 deletions(-)