Re: [PATCH] x86/ftrace: Make sure that ftrace trampolines are not RWX
From: Thomas Gleixner
Date: Wed May 24 2017 - 15:13:35 EST
On Wed, 24 May 2017, Steven Rostedt wrote:
> OK, it crashed on one of my tests. I removed the patch and it boots
> fine, and crashes when I add it back.
It reproduces here with your config.
> BUG: unable to handle kernel paging request at ffff880214f5c000
> IP: new_slab+0x1e8/0x2b4
> PGD 338c067
> P4D 338c067
> PUD 338f067
> PMD 212022063
> PTE 8000000214f5c161
>
> Oops: 0003 [#1] SMP
> Modules linked in:
> CPU: 3 PID: 1 Comm: swapper/0 Not tainted 4.12.0-rc2-test+ #42
> Hardware name: MSI MS-7823/CSM-H87M-G43 (MS-7823), BIOS V1.6 02/22/2014
> task: ffff8802153a8000 task.stack: ffffc90000c74000
> RIP: 0010:new_slab+0x1e8/0x2b4
> RSP: 0000:ffffc90000c77b28 EFLAGS: 00010282
> RAX: 0000000040040000 RBX: ffff880216003f00 RCX: ffff880214f5c058
> RDX: 0000000000000000 RSI: ffff880214f5c000 RDI: ffff880216003f00
> RBP: ffffc90000c77b70 R08: 000000000000002a R09: 0000000000000000
> R10: 00000000000201e2 R11: 0000000000020190 R12: ffff880214f5c000
> R13: 000000000000002e R14: 0000000000000001 R15: ffffea000853d700
> FS: 0000000000000000(0000) GS:ffff88021eb80000(0000) knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: ffff880214f5c000 CR3: 000000000221d000 CR4: 00000000001406e0
> Call Trace:
> ? interleave_nodes+0x29/0x40
> ___slab_alloc+0x2e8/0x49e
That does not make any sense, but I'm digging into it.
Thanks,
tglx