aboutsummaryrefslogtreecommitdiff
path: root/lib/dynamic_debug.c
diff options
context:
space:
mode:
authorArnd Bergmann <[email protected]>2017-01-11 15:56:44 +0100
committerGreg Kroah-Hartman <[email protected]>2017-01-19 12:42:25 +0100
commit7a11a1d1b58873b2e5a6922dcdc23b6b339b14ba (patch)
tree822667e7c3c8d81f37ed1363a672bbe8f4e5c6af /lib/dynamic_debug.c
parent4474f4c40a9c607c7317e686b23619b7b768004f (diff)
lkdtm: hide stack overflow warning for corrupt-stack test
After the latest change to make sure the compiler actually does a memset, it is now smart enough to flag the stack overflow at compile time, at least with gcc-7.0: drivers/misc/lkdtm_bugs.c: In function 'lkdtm_CORRUPT_STACK': drivers/misc/lkdtm_bugs.c:88:144: warning: 'memset' writing 64 bytes into a region of size 8 overflows the destination [-Wstringop-overflow=] To outsmart the compiler again, this moves the memset into a noinline function where (for now) it doesn't see that we intentionally write broken code here. Fixes: c55d240003ae ("lkdtm: Prevent the compiler from optimising lkdtm_CORRUPT_STACK()") Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Kees Cook <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/dynamic_debug.c')
0 files changed, 0 insertions, 0 deletions