From 0c119dd1f389a9d739e24184e8bdafc62d32fb97 Mon Sep 17 00:00:00 2001 From: Alexander Potapenko Date: Thu, 12 Sep 2024 10:47:53 +0200 Subject: executor: arm64: accept cpu id in guest_main() Use the cpu id to choose the SYZOS API commands to be executed by this particular CPU. --- executor/common_kvm_arm64_syzos.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'executor') diff --git a/executor/common_kvm_arm64_syzos.h b/executor/common_kvm_arm64_syzos.h index 0f11a7b00..ebfed175c 100644 --- a/executor/common_kvm_arm64_syzos.h +++ b/executor/common_kvm_arm64_syzos.h @@ -79,9 +79,9 @@ typedef enum { // Main guest function that performs necessary setup and passes the control to the user-provided // payload. -GUEST_CODE static void guest_main(uint64 size) +GUEST_CODE static void guest_main(uint64 size, uint64 cpu) { - uint64 addr = ARM64_ADDR_USER_CODE; + uint64 addr = ARM64_ADDR_USER_CODE + cpu * 0x1000; while (size >= sizeof(struct api_call_header)) { struct api_call_header* cmd = (struct api_call_header*)addr; -- cgit mrf-deployment