Re: [RFC][PATCH 0/4] x86/entry: disallow #DB more

From: Peter Zijlstra
Date: Mon May 25 2020 - 06:40:47 EST


On Mon, May 25, 2020 at 12:02:48PM +0200, Rasmus Villemoes wrote:

> Naive question: did you check disassembly to see whether gcc threw your
> native_get_debugreg() away, given that the asm isn't volatile and the
> result is not used for anything? Testing here only shows a "mov
> %r9,%db7", but the read did seem to get thrown away.

Argh.. no I did not. Writing it all in asm gets me:

[ 1.627405] XXX: 3900 8304 22632

which is a lot worse...