--- zzzz-none-000/linux-4.4.60/drivers/misc/lkdtm.c 2017-04-08 07:53:53.000000000 +0000 +++ hawkeye-5590-729/linux-4.4.60/drivers/misc/lkdtm.c 2022-03-30 14:21:52.000000000 +0000 @@ -330,9 +330,10 @@ static noinline void corrupt_stack(void) { /* Use default char array length that triggers stack protection. */ - char data[8]; - + volatile char data[8]; memset((void *)data, 0, 64); + /* print data so that compiler wouldn't optimize the code */ + pr_info("print data[0]:%c\n", data[0]); } static void execute_location(void *dst)