[Xen-devel] [PATCH v2 6/6] x86/xstate: Fix latent bugs in compress_xsave_states()

2016-09-12 Thread Andrew Cooper
compress_xsave_states() mustn't read xstate_bv or xcomp_bv before first confirming that the input buffer is large enough. It also doesn't cope with compressed input. Make all of these problems the callers responsbility to ensure. Simplify the decompression logic by inlining get_xsave_addr(). As

Re: [Xen-devel] [PATCH v2 6/6] x86/xstate: Fix latent bugs in compress_xsave_states()

2016-09-13 Thread Jan Beulich
>>> On 12.09.16 at 18:21, wrote: > compress_xsave_states() mustn't read xstate_bv or xcomp_bv before first > confirming that the input buffer is large enough. It also doesn't cope with > compressed input. Make all of these problems the callers responsbility to > ensure. > > Simplify the decompr

Re: [Xen-devel] [PATCH v2 6/6] x86/xstate: Fix latent bugs in compress_xsave_states()

2016-09-13 Thread Andrew Cooper
On 13/09/16 09:27, Jan Beulich wrote: On 12.09.16 at 18:21, wrote: >> compress_xsave_states() mustn't read xstate_bv or xcomp_bv before first >> confirming that the input buffer is large enough. It also doesn't cope with >> compressed input. Make all of these problems the callers responsbil