search for: patch_call_site

Displaying 4 results from an estimated 4 matches for "patch_call_site".

2007 Apr 18
7
[RFC, PATCH 5/24] i386 Vmi code patching
...ECX 0x51 +#define MNEM_PUSH_EDX 0x52 +#define MNEM_PUSH_EBX 0x53 +#define MNEM_PUSH_ESP 0x54 +#define MNEM_PUSH_EBP 0x55 +#define MNEM_PUSH_ESI 0x56 +#define MNEM_PUSH_EDI 0x57 +#define MNEM_OPSIZE 0x66 +#define MNEM_LEA 0x8d +#define MNEM_NOP 0x90 +#define MNEM_CALL_NEAR 0xe8 + +static inline void patch_call_site(struct vmi_annotation *a, unsigned char *eip) +{ + unsigned long call = a->vmi_call; + unsigned char *dest = (unsigned char *)(&((VROMCallTable *)vmi_rom)->vromCall[call]); + *(unsigned long *)(eip+1) = dest-eip-5; +} + +static void fixup_translation(struct vmi_annotation *a) +{ + unsigne...
2007 Apr 18
7
[RFC, PATCH 5/24] i386 Vmi code patching
...ECX 0x51 +#define MNEM_PUSH_EDX 0x52 +#define MNEM_PUSH_EBX 0x53 +#define MNEM_PUSH_ESP 0x54 +#define MNEM_PUSH_EBP 0x55 +#define MNEM_PUSH_ESI 0x56 +#define MNEM_PUSH_EDI 0x57 +#define MNEM_OPSIZE 0x66 +#define MNEM_LEA 0x8d +#define MNEM_NOP 0x90 +#define MNEM_CALL_NEAR 0xe8 + +static inline void patch_call_site(struct vmi_annotation *a, unsigned char *eip) +{ + unsigned long call = a->vmi_call; + unsigned char *dest = (unsigned char *)(&((VROMCallTable *)vmi_rom)->vromCall[call]); + *(unsigned long *)(eip+1) = dest-eip-5; +} + +static void fixup_translation(struct vmi_annotation *a) +{ + unsigne...
2023 Jun 08
3
[RFC PATCH 0/3] x86/paravirt: Get rid of paravirt patching
This is a small series getting rid of paravirt patching by switching completely to alternative patching for the same functionality. The basic idea is to add the capability to switch from indirect to direct calls via a special alternative patching option. This removes _some_ of the paravirt macro maze, but most of it needs to stay due to the need of hiding the call instructions from the compiler
2023 Jun 08
3
[RFC PATCH 0/3] x86/paravirt: Get rid of paravirt patching
This is a small series getting rid of paravirt patching by switching completely to alternative patching for the same functionality. The basic idea is to add the capability to switch from indirect to direct calls via a special alternative patching option. This removes _some_ of the paravirt macro maze, but most of it needs to stay due to the need of hiding the call instructions from the compiler