microsoft / usersim

MIT License
73 stars 22 forks source link

cxplat_kernel when running against usersim does the wrong thing in cxplat_get_current_processor_number #222

Open Alan-Jowett opened 2 weeks ago

Alan-Jowett commented 2 weeks ago

The issue is that cxplat_get_current_processor_number calls KeGetCurrentProcessorIndex, which is an inline function that expands to:

return __readgsdword(0x1a4);

Which doesn't work when running in user mode.