Re: [PATCH] x86/TSC: Use RDTSCP

From: Borislav Petkov
Date: Fri Nov 23 2018 - 16:07:55 EST


On Fri, Nov 23, 2018 at 01:03:25PM -0800, Guenter Roeck wrote:
> It is a cut off screen log. x86 boots change xterm configuration from
> wrap to non-wrap, and I did a cut-and-paste instead of copying the log
> to a file. Sorry for that.

No worries.

It was a head-scratcher though because look what it decodes to with the
'b':

[ 0.854209] Code: 90 90 90 90 90 90 90 a1 84 37 11 cd c3 8d b4 26 00 00 00 00 8d 76 00 c3 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 90 55 89 e5 <0f> ae f0b 0f 31 5d c3 8d b6 00 00 00 00 55 89 e5 57 31 ff 56 53 89
All code
========
0: 90 nop
1: 90 nop
2: 90 nop
3: 90 nop
4: 90 nop
5: 90 nop
6: 90 nop
7: a1 84 37 11 cd mov 0xcd113784,%eax
c: c3 ret
d: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
14: 8d 76 00 lea 0x0(%esi),%esi
17: c3 ret
18: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
1f: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
26: 90 nop
27: 55 push %ebp
28: 89 e5 mov %esp,%ebp
2a:* 0f ae 0b fxrstor (%ebx) <-- trapping instruction
2d: 0f 31 rdtsc
2f: 5d pop %ebp
30: c3 ret

FXRSTOR?!?!?

:-)

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.