Gbps / gbhv

Simple x86-64 VT-x Hypervisor with EPT Hooking
Creative Commons Attribution 4.0 International
841 stars 143 forks source link

thank you!The code is very good! #10

Closed wuhao13 closed 4 years ago

wuhao13 commented 4 years ago

thank you!The code is very good!,but there's a bug in this HvEptHookInstructionMemory !

//fix bug: fix SizeOfHookedInstructions error!
PVOID Tmp_TargetFunction = TargetFunction;

for (SizeOfHookedInstructions = LDE(Tmp_TargetFunction, 64);
    SizeOfHookedInstructions < MaxSizeOfTrampoline;
    SizeOfHookedInstructions += LDE(Tmp_TargetFunction, 64))
{
    HvUtilLogDebug("LDE Size Code of : %d\n", SizeOfHookedInstructions);
    (INT64)Tmp_TargetFunction = (INT64)Tmp_TargetFunction + LDE(Tmp_TargetFunction, 64);
}

I hope you can update the compatibility of the code in the latest CPU,thank you!

Gbps commented 4 years ago

Thank you for the compliments.

Could you make a pull request with the change so I can review it?

Thank you

On Thu, Jan 23, 2020, 12:20 AM wuhao13 notifications@github.com wrote:

thank you!The code is very good!,but there's a bug in this HvEptHookInstructionMemory !

//fix bug: fix SizeOfHookedInstructions error!

PVOID Tmp_TargetFunction = TargetFunction;

for (SizeOfHookedInstructions = LDE(Tmp_TargetFunction, 64);

SizeOfHookedInstructions < MaxSizeOfTrampoline;

SizeOfHookedInstructions += LDE(Tmp_TargetFunction, 64))

{

HvUtilLogDebug("LDE Size Code of : %d\n", SizeOfHookedInstructions);

(INT64)Tmp_TargetFunction = (INT64)Tmp_TargetFunction + LDE(Tmp_TargetFunction, 64);

}

I hope you can update the compatibility of the code in the latest CPU,thank you!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Gbps/gbhv/issues/10?email_source=notifications&email_token=ABKZAKA4SEH6RA5UKAKWK5DQ7ESIHA5CNFSM4KKQ4FE2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IIEQOCQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKZAKFAG36VZAKH3L7TRL3Q7ESIHANCNFSM4KKQ4FEQ .

wuhao13 commented 4 years ago

I want to increase the processing of RING3 memory. In addition, your code is tested normal in my virtual machine, but there is a blue screen in the physical machine debugging. I am studying it. I hope you will pay attention to these problems