R: Re: [PATCH] KVM: arm/arm64: Allow usercopy to vcpu->arch.ctxt and arm64 debug

2017-10-23 Thread Paolo Bonzini
- Kees Cook ha scritto: > On Mon, Oct 23, 2017 at 7:14 AM, Paolo Bonzini wrote: > > On 22/10/2017 09:44, Christoffer Dall wrote: > >> However, I think it's much clearer if I > >> rewrite these to use get_user() and put_user(). v2 incoming. > > >

Re: [PATCH] KVM: arm/arm64: Allow usercopy to vcpu->arch.ctxt and arm64 debug

2017-10-23 Thread Kees Cook
On Mon, Oct 23, 2017 at 7:14 AM, Paolo Bonzini wrote: > On 22/10/2017 09:44, Christoffer Dall wrote: >> However, I think it's much clearer if I >> rewrite these to use get_user() and put_user(). v2 incoming. > > I'd actually prefer if you all do a trivial conversion to >

Re: [PATCH] KVM: arm/arm64: Allow usercopy to vcpu->arch.ctxt and arm64 debug

2017-10-23 Thread Christoffer Dall
On Mon, Oct 23, 2017 at 4:14 PM, Paolo Bonzini wrote: > On 22/10/2017 09:44, Christoffer Dall wrote: >> However, I think it's much clearer if I >> rewrite these to use get_user() and put_user(). v2 incoming. > > I'd actually prefer if you all do a trivial conversion to >

Re: [PATCH] KVM: arm/arm64: Allow usercopy to vcpu->arch.ctxt and arm64 debug

2017-10-23 Thread Paolo Bonzini
On 22/10/2017 09:44, Christoffer Dall wrote: > However, I think it's much clearer if I > rewrite these to use get_user() and put_user(). v2 incoming. I'd actually prefer if you all do a trivial conversion to kvm_init_usercopy to begin with. In fact, we could just change the default from "0, 0"

Re: [PATCH] KVM: arm/arm64: Allow usercopy to vcpu->arch.ctxt and arm64 debug

2017-10-22 Thread Christoffer Dall
On Sat, Oct 21, 2017 at 08:06:10PM -0700, Kees Cook wrote: > On Sat, Oct 21, 2017 at 11:45 AM, Christoffer Dall > wrote: > > We do direct useraccess copying to the kvm_cpu_context structure > > embedded in the kvm_vcpu_arch structure, and to the vcpu debug register >

Re: [PATCH] KVM: arm/arm64: Allow usercopy to vcpu->arch.ctxt and arm64 debug

2017-10-21 Thread Kees Cook
On Sat, Oct 21, 2017 at 11:45 AM, Christoffer Dall wrote: > We do direct useraccess copying to the kvm_cpu_context structure > embedded in the kvm_vcpu_arch structure, and to the vcpu debug register > state. Everything else (timer, PMU, vgic) goes through a temporary