fuzz/x86emul: remove bogus check against fuzzer msr index
PATCH 1/1 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.
--- tools/fuzz/x86_instruction_emulator/x86-insn-emulator-fuzzer.c | 3 --- 1 file changed, 3 deletions(-)
tools/fuzz/x86_instruction_emulator/x86-insn-emulator-fuzzer.c +0 -3
@@ -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 :
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 5 lines · Wei Liu
The "reg" variable in
fuzz_read_msrstores 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."
Quoted 1 line
Signed-off-by Wei Liu <[email protected]>
Quoted 9 lines
--- tools/fuzz/x86_instruction_emulator/x86-insn-emulator-fuzzer.c | 3 --- 1 file changed, 3 deletions(-)tools/fuzz/x86_instruction_emulator/x86-insn-emulator-fuzzer.c +0
-0
tools/fuzz/x86_instruction_emulator/x86-insn-emulator-fuzzer.c static int fuzz_read_msr( · line 352
Quoted 9 lines
tools/fuzz/x86_instruction_emulator/x86-insn-emulator-fuzzer.c +0
-3@@ -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 :
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Wei Liu
AppliedQuoted 4 lines · Andrew Cooper
Quoted 3 lines · Wei Liu
The "reg" variable in
fuzz_read_msrstores the real MSR index, not an index within the fuzzer.
Quoted 9 lines
Quoted 2 lines
The rest of that function already handles things correctly. We just need to remove the bogus check.
"Spotted by Coverity."
Quoted 1 line
Signed-off-by Wei Liu <[email protected]>Reviewed-by Andrew Cooper <[email protected]>
Applied.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel