lkml.org 
[lkml]   [2019]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH] kvm: x86/vmx: Use kzalloc for cached_vmcs12
From
Date
On 23/01/19 19:33, Tom Roeder wrote:
>
> Even in vmx_set_nested_state, there are about 30 lines of code in
> between enter_vmx_operation and copy_from_user, and there are a couple
> of cases that cause vmx_set_nested_state to return with an error. So if
> we want to fix this by handling all the error paths, I think it might be
> cleanest to convert vmx_set_nested_state to use goto error handling,
> since that would allow us to clear the allocated memory in one place.

I prefer to have kzalloc, and change vmx_get_nested_state to copy the
whole page including the trailing zeroes.

Paolo

\
 
 \ /
  Last update: 2019-01-24 02:19    [W:0.048 / U:1.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site