Does anyone know if it's possible to trigger VM-exit on transition between kernelmode <-> usermode? Ideally, when CPL is changed. I'm aware that there probably won't be a direct way, but I can't even think of any "trick" that would bring me close.
Conversation
That would be painfully slow and it would resolve only syscalls (which can be much easily solved by EFER.SCE=0). Interrupts/exceptions is what's bugging me the most.
1
1
Yeah, that's basically my only idea on how to do it ( twitter.com/PetrBenes/stat ). Although I'd rather avoid building such monster :/
Quote Tweet
My only idea is: take snapshot of page-tables (+ monitoring them for changes), make 2 EPTs where EPT1 has executable memory where PTE's Supervisor bit = 0, and EPT2 is inverted to EPT1 (has executable only the rest of the memory). But that solution would be kinda pain in the neck
Show this thread

