Re: [Xen-devel] [PATCH] x86emul/fuzz: add a state sanitization function

2019-03-29 Thread Jan Beulich
>>> On 29.03.19 at 16:10, wrote: >> On Mar 29, 2019, at 2:54 PM, Jan Beulich wrote: >> @@ -424,8 +426,19 @@ static int fuzz_write_segment( >> rc = maybe_fail(ctxt, "write_segment", true); >> >> if ( rc == X86EMUL_OKAY ) >> +{ >> c->segments[seg] = *reg; >> >> +if ( !

Re: [Xen-devel] [PATCH] x86emul/fuzz: add a state sanitization function

2019-03-29 Thread George Dunlap
> On Mar 29, 2019, at 2:54 PM, Jan Beulich wrote: > > This is to accompany sanitize_input(). Just like for initial state we > want to have state between two emulated insns sane, at least as far as > assumptions in the main emulator go. Do minimal checking after segment > register, CR, and MSR w

[Xen-devel] [PATCH] x86emul/fuzz: add a state sanitization function

2019-03-29 Thread Jan Beulich
This is to accompany sanitize_input(). Just like for initial state we want to have state between two emulated insns sane, at least as far as assumptions in the main emulator go. Do minimal checking after segment register, CR, and MSR writes, and roll back to the old value in case of failure (raisin