Re: [PATCH] KVM: check userspace_addr for all memslots

2020-06-11 Thread Maxim Levitsky
On Thu, 2020-06-11 at 17:27 +0200, Paolo Bonzini wrote: > On 11/06/20 16:44, Maxim Levitsky wrote: > > On Mon, 2020-06-01 at 04:21 -0400, Paolo Bonzini wrote: > > > The userspace_addr alignment and range checks are not performed for > > > private > > > memory slots that are prepared by KVM itself.

Re: [PATCH] KVM: check userspace_addr for all memslots

2020-06-11 Thread Paolo Bonzini
On 11/06/20 16:44, Maxim Levitsky wrote: > On Mon, 2020-06-01 at 04:21 -0400, Paolo Bonzini wrote: >> The userspace_addr alignment and range checks are not performed for private >> memory slots that are prepared by KVM itself. This is unnecessary and makes >> it questionable to use __*_user functi

Re: [PATCH] KVM: check userspace_addr for all memslots

2020-06-11 Thread Maxim Levitsky
On Mon, 2020-06-01 at 04:21 -0400, Paolo Bonzini wrote: > The userspace_addr alignment and range checks are not performed for private > memory slots that are prepared by KVM itself. This is unnecessary and makes > it questionable to use __*_user functions to access memory later on. We also > rely

[PATCH] KVM: check userspace_addr for all memslots

2020-06-01 Thread Paolo Bonzini
The userspace_addr alignment and range checks are not performed for private memory slots that are prepared by KVM itself. This is unnecessary and makes it questionable to use __*_user functions to access memory later on. We also rely on the userspace address being aligned since we have an entire