Why? I tried 'lock popf' and I got invalid instruction. The same for
'rep popf'.
int main(void)
{
asm volatile ("pushf; rep; popf");
return 0;
}
OK, probably nobody should do this (although the kernel should not
assume this imho), but
asm volatile ("pushfw; popfw");
doesn't look bad and the code is
000000000040047c<main>:
40047c: 55 push %rbp
40047d: 48 89 e5 mov %rsp,%rbp
400480: 66 9c pushfw
400482: 66 9d popfw
400484: b8 00 00 00 00 mov $0x0,%eax
400489: c9 leaveq
40048a: c3 retq
And in any case it would be better to re-use auprobe->fixups.
Oleg.