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

Re: [Xen-devel] [PATCH v3 09/11] fuzz/x86emul: update fuzzer



This patch will be squashed in.

From 4990d760f900223e32cb800e7374ee45d357081b Mon Sep 17 00:00:00 2001
From: Wei Liu <wei.liu2@xxxxxxxxxx>
Date: Wed, 1 Feb 2017 16:54:58 +0000
Subject: [PATCH] fixup! fuzz/x86emul: update fuzzer

---
 .../x86-insn-emulator-fuzzer.c                         | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/tools/fuzz/x86_instruction_emulator/x86-insn-emulator-fuzzer.c 
b/tools/fuzz/x86_instruction_emulator/x86-insn-emulator-fuzzer.c
index edc5130b3b..ed43935600 100644
--- a/tools/fuzz/x86_instruction_emulator/x86-insn-emulator-fuzzer.c
+++ b/tools/fuzz/x86_instruction_emulator/x86-insn-emulator-fuzzer.c
@@ -294,17 +294,12 @@ static int fuzz_read_cr(
     unsigned long *val,
     struct x86_emulate_ctxt *ctxt)
 {
-    int rc;
-
     if ( reg >= ARRAY_SIZE(input.cr) )
         return X86EMUL_UNHANDLEABLE;
 
-    rc = maybe_fail("read_cr", true);
+    *val = input.cr[reg];
 
-    if ( rc == X86EMUL_OKAY )
-        *val = input.cr[reg];
-
-    return rc;
+    return X86EMUL_OKAY;
 }
 
 static int fuzz_write_cr(
@@ -312,17 +307,12 @@ static int fuzz_write_cr(
     unsigned long val,
     struct x86_emulate_ctxt *ctxt)
 {
-    int rc;
-
     if ( reg >= ARRAY_SIZE(input.cr) )
         return X86EMUL_UNHANDLEABLE;
 
-    rc = maybe_fail("write_cr", true);
+    input.cr[reg] = val;
 
-    if ( rc == X86EMUL_OKAY )
-        input.cr[reg] = val;
-
-    return rc;
+    return X86EMUL_OKAY;
 }
 
 enum {
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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