Re: [PATCH v10 00/18] Enable FSGSBASE instructions

From: Sasha Levin
Date: Sun May 10 2020 - 10:17:26 EST


On Sun, May 10, 2020 at 12:15:34PM +0200, Thomas Gleixner wrote:
Vegard Nossum <vegard.nossum@xxxxxxxxxx> writes:
On 5/10/20 10:09 AM, Vegard Nossum wrote:

I spoke a few minutes too soon. Just hit this, if anybody wants to have
a look:

[ 6402.786418] ------------[ cut here ]------------
[ 6402.787769] WARNING: CPU: 0 PID: 13802 at arch/x86/kernel/traps.c:811
do_debug+0x16c/0x210

[ 6402.820353] Call Trace:
[ 6402.821043] <#DB>
[ 6402.821622] debug+0x37/0x70
[ 6402.822449] RIP: 0010:arch_stack_walk_user+0x79/0x110

That's a cute way to trigger that WARN_ON in the #DB handler.

[ 6402.816468] DR0: 0000000000000001 DR1: 0000000040006070 DR2: 00007ffff7ffd000
[ 6402.818406] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000003b3062a

#DB recursion

[ 6402.832288] RDX: 0000000040006073

27: 48 8b 1a mov (%rdx),%rbx

Breakpoint on user space stack, #DB triggers and the low level ASM
irqflags tracepoint has stacktrace enabled which unwinds into the user
stack and triggers #DB again.

Bah. I know why I want to ban all that tracing muck from low level entry code.

It might not be related to the patch set, mind.

It's unrelated.

Thanks for testing Vegard!

--
Thanks,
Sasha