lkdtm: adjust recursion size to avoid warnings
authorKees Cook <keescook@chromium.org>
Thu, 24 Oct 2013 16:25:39 +0000 (09:25 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Oct 2013 23:13:39 +0000 (16:13 -0700)
commit7d196ac303652588c60350f0a581d71e2e7b1a50
tree5bcda7cfe5cdb498abf5ac3c9cbe81ee75bc6813
parent629c66a22c21b692b6e58b9c1d8fa56a60ccb52d
lkdtm: adjust recursion size to avoid warnings

When CONFIG_FRAME_WARN is set low (e.g. some ARM builds), the hard-coded
stack buffer size used for kernel stack over run testing triggers build
warnings. Instead, avoid the warning by recalcuating the buffer size and
recursion count needed to trigger the test. Also uses the recursion counter
indirectly to avoid changing the parameter during the test.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/lkdtm.c