[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH v2] xen: add libafl-qemu fuzzer support



Hi Stefano, Volodymyr,

On 21/03/2025 22:32, Stefano Stabellini wrote:
diff --git a/xen/arch/arm/psci.c b/xen/arch/arm/psci.c
index b6860a7760..c7a51a1144 100644
--- a/xen/arch/arm/psci.c
+++ b/xen/arch/arm/psci.c
@@ -17,6 +17,7 @@
  #include <asm/cpufeature.h>
  #include <asm/psci.h>
  #include <asm/acpi.h>
+#include <asm/libafl_qemu.h>
/*
   * While a 64-bit OS can make calls with SMC32 calling conventions, for
@@ -49,6 +50,10 @@ int call_psci_cpu_on(int cpu)
void call_psci_cpu_off(void)
  {
+#ifdef CONFIG_LIBAFL_QEMU_FUZZER_PASS_BLOCKING
+    libafl_qemu_end(LIBAFL_QEMU_END_OK);
+#endif

As discussed, please add a wrapper with an empty implementation in the
regular case and the call to libafl_qemu_end when the fuzzer is enabled.
So that here it becomes just something like:

   fuzzer_success();

Other than that, the code changes to Xen look OK to me

I am a bit surprised this was resent without addressing the licensing issue pointed out by Andrew [1] (I don't see a reply). And if there is no issue, then I would have a least expected a mention in the commit message why this is ok.

Cheers,

[1] https://lore.kernel.org/ae2dbe98-57cf-4aba-bc48-6d7212cfc859@xxxxxxxxxx

--
Julien Grall




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.