From 17d8d375c867b0f63f61192e73e1b8056fce1514 Mon Sep 17 00:00:00 2001 From: Alexander Potapenko Date: Wed, 23 Jul 2025 14:02:28 +0200 Subject: executor/common_kvm_amd64_syzos.h: add _handle_ to function names Let's try to stick to the convention of naming every SYZOS API handler syzos_handle_something(). No functional change. --- executor/common_kvm_amd64_syzos.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'executor') diff --git a/executor/common_kvm_amd64_syzos.h b/executor/common_kvm_amd64_syzos.h index 22c00b501..41915a84b 100644 --- a/executor/common_kvm_amd64_syzos.h +++ b/executor/common_kvm_amd64_syzos.h @@ -64,9 +64,9 @@ struct api_call_2 { static void guest_uexit(uint64 exit_code); static void guest_execute_code(uint8* insns, uint64 size); -static void guest_cpuid(uint32 eax, uint32 ecx); -static void guest_wrmsr(uint64 reg, uint64 val); -static void guest_rdmsr(uint64 reg); +static void guest_handle_cpuid(uint32 eax, uint32 ecx); +static void guest_handle_wrmsr(uint64 reg, uint64 val); +static void guest_handle_rdmsr(uint64 reg); typedef enum { UEXIT_END = (uint64)-1, @@ -101,17 +101,17 @@ guest_main(uint64 size, uint64 cpu) } case SYZOS_API_CPUID: { struct api_call_cpuid* ccmd = (struct api_call_cpuid*)cmd; - guest_cpuid(ccmd->eax, ccmd->ecx); + guest_handle_cpuid(ccmd->eax, ccmd->ecx); break; } case SYZOS_API_WRMSR: { struct api_call_2* ccmd = (struct api_call_2*)cmd; - guest_wrmsr(ccmd->args[0], ccmd->args[1]); + guest_handle_wrmsr(ccmd->args[0], ccmd->args[1]); break; } case SYZOS_API_RDMSR: { struct api_call_1* ccmd = (struct api_call_1*)cmd; - guest_rdmsr(ccmd->arg); + guest_handle_rdmsr(ccmd->arg); break; } } @@ -136,7 +136,7 @@ GUEST_CODE static noinline void guest_uexit(uint64 exit_code) *ptr = exit_code; } -GUEST_CODE static noinline void guest_cpuid(uint32 eax, uint32 ecx) +GUEST_CODE static noinline void guest_handle_cpuid(uint32 eax, uint32 ecx) { asm volatile( "cpuid\n" @@ -146,7 +146,7 @@ GUEST_CODE static noinline void guest_cpuid(uint32 eax, uint32 ecx) } // Write val into an MSR register reg. -GUEST_CODE static noinline void guest_wrmsr(uint64 reg, uint64 val) +GUEST_CODE static noinline void guest_handle_wrmsr(uint64 reg, uint64 val) { // The wrmsr instruction takes its arguments in specific registers: // edx:eax contains the 64-bit value to write, ecx contains the MSR address. @@ -160,7 +160,7 @@ GUEST_CODE static noinline void guest_wrmsr(uint64 reg, uint64 val) } // Read an MSR register, ignore the result. -GUEST_CODE static noinline void guest_rdmsr(uint64 reg) +GUEST_CODE static noinline void guest_handle_rdmsr(uint64 reg) { uint32 low = 0, high = 0; // The rdmsr instruction takes the MSR address in ecx. -- cgit mrf-deployment