How to invalidate registers.
Posted: Sun Apr 06, 2014 12:41 pm
GCC thinks that registers is not changed in function.
But registers are changed in sys_call_kernel and movzwl causes to page fault. Must be a key for gcc that fixes this trouble.
Code: Select all
100021: bb 24 15 10 00 mov $0x101524,%ebx
100026: 31 ff xor %edi,%edi
100028: be e1 10 10 00 mov $0x1010e1,%esi
10002d: e8 f9 00 00 00 callq 10012b <sys_call_kernel>
100032: 0f b7 03 movzwl (%rbx),%eax