From 2889f88a00118171d28ec6256f07d42e90f8d180 Mon Sep 17 00:00:00 2001 From: Steffen Schulz Date: Wed, 16 Nov 2022 00:43:08 +0100 Subject: [PATCH] Allow multiple GET_HOST_CONFIG, but abort on SET_AGENT_CONFIG GET_HOST_CONFIG may be queried multiple times to verify host magic/version info by different tools. Only inform in debug mode. --- nyx/hypercall/configuration.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/nyx/hypercall/configuration.c b/nyx/hypercall/configuration.c index 26e7fb68f7..3be375724d 100644 --- a/nyx/hypercall/configuration.c +++ b/nyx/hypercall/configuration.c @@ -17,10 +17,7 @@ void handle_hypercall_kafl_get_host_config(struct kvm_run *run, return; } - if (GET_GLOBAL_STATE()->get_host_config_done) { - nyx_abort((char *)"KVM_EXIT_KAFL_GET_HOST_CONFIG called twice..."); - return; - } + nyx_trace(); memset((void *)&config, 0, sizeof(host_config_t)); @@ -47,8 +44,7 @@ void handle_hypercall_kafl_set_agent_config(struct kvm_run *run, } if (GET_GLOBAL_STATE()->set_agent_config_done) { - nyx_abort((char *)"KVM_EXIT_KAFL_SET_AGENT_CONFIG called twice..."); - return; + nyx_abort("SET_AGENT_CONFIG called twice."); } X86CPU *cpux86 = X86_CPU(cpu);