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

[Xen-changelog] [xen master] fuzz/x86emul: remove bogus check against fuzzer msr index



commit 4008d7774cd951eeba907b7bfe84302abfa4377c
Author:     Wei Liu <wei.liu2@xxxxxxxxxx>
AuthorDate: Tue Feb 7 11:02:40 2017 +0000
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Wed Feb 8 09:24:13 2017 +0000

    fuzz/x86emul: remove bogus check against fuzzer msr index
    
    The "reg" variable in fuzz_read_msr stores the real MSR index, not an
    index within the fuzzer.
    
    The rest of that function already handles things correctly. We just need
    to remove the bogus check.
    
    Spotted by Coverity.
    
    Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 tools/fuzz/x86_instruction_emulator/x86-insn-emulator-fuzzer.c | 3 ---
 1 file changed, 3 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 3b6d33a..4a2bdbe 100644
--- a/tools/fuzz/x86_instruction_emulator/x86-insn-emulator-fuzzer.c
+++ b/tools/fuzz/x86_instruction_emulator/x86-insn-emulator-fuzzer.c
@@ -347,9 +347,6 @@ static int fuzz_read_msr(
 {
     unsigned int idx;
 
-    if ( reg >= MSR_INDEX_MAX )
-        return X86EMUL_UNHANDLEABLE;
-
     switch ( reg )
     {
     case MSR_TSC_AUX:
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

 


Rackspace

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