Hi Marco, > It appears that stack overflows are *not* detected when KASAN_VMALLOC > and VMAP_STACK are enabled. > > Tested with: > insmod drivers/misc/lkdtm/lkdtm.ko cpoint_name=DIRECT cpoint_type=EXHAUST_STACK > > I've also attached the .config. Anything I missed? > Fascinating - it seems to work on my config, a lightly modified defconfig (attached): [ 111.287854] lkdtm: loop 46/64 ... [ 111.287856] lkdtm: loop 45/64 ... [ 111.287859] lkdtm: loop 44/64 ... [ 111.287862] lkdtm: loop 43/64 ... [ 111.287864] lkdtm: loop 42/64 ... [ 111.287867] lkdtm: loop 41/64 ... [ 111.287869] lkdtm: loop 40/64 ... [ 111.288498] BUG: stack guard page was hit at 000000007bf6ef1a (stack is 000000005952e5cc..00000000ba40316c) [ 111.288499] kernel stack overflow (double-fault): 0000 [#1] SMP KASAN PTI [ 111.288500] CPU: 0 PID: 767 Comm: modprobe Not tainted 5.3.0-rc1-next-20190723+ #91 [ 111.288501] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015 [ 111.288501] RIP: 0010:__lock_acquire+0x43/0x3b50 [ 111.288503] Code: 84 24 90 00 00 00 48 c7 84 24 90 00 00 00 b3 8a b5 41 48 8b 9c 24 28 01 00 00 48 c7 84 24 98 00 00 00 f8 5a a9 84 48 c1 e8 03 <48> 89 44 24 18 48 89 c7 48 b8 00 00 00 00 00 fc ff df 48 c7 84 24 [ 111.288504] RSP: 0018:ffffc90000a37fd8 EFLAGS: 00010802 [ 111.288505] RAX: 1ffff9200014700d RBX: 0000000000000000 RCX: 0000000000000000 [ 111.288506] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff84cf3ff8 [ 111.288507] RBP: ffffffff84cf3ff8 R08: 0000000000000001 R09: 0000000000000001 [ 111.288507] R10: fffffbfff0a440cf R11: ffffffff8522067f R12: 0000000000000000 [ 111.288508] R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000000 [ 111.288509] FS: 00007f97f1f23740(0000) GS:ffff88806c400000(0000) knlGS:0000000000000000 [ 111.288510] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 111.288510] CR2: ffffc90000a37fc8 CR3: 000000006a0fc005 CR4: 0000000000360ef0 [ 111.288511] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 111.288512] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 111.288512] Call Trace: [ 111.288513] lock_acquire+0x125/0x300 [ 111.288513] ? vprintk_emit+0x6c/0x250 [ 111.288514] _raw_spin_lock+0x20/0x30 I will test with your config and see if I can narrow it down tomorrow. Regards, Daniel