Re: [PATCH] KVM: s390: Test for bad access register at the start of S390_MEM_OP

2019-08-29 Thread Thomas Huth
On 29/08/2019 13.15, Janosch Frank wrote: [...] > By the way, I think we want to check mop->size for 0 before giving it to > vmalloc and working with it. You're right! This currently triggers a kernel warning message with a Call Trace! I'll add a check to my new memop selftest and send a patch...

Re: [PATCH] KVM: s390: Test for bad access register at the start of S390_MEM_OP

2019-08-29 Thread Cornelia Huck
On Thu, 29 Aug 2019 13:47:59 +0200 Thomas Huth wrote: > On 29/08/2019 13.18, Cornelia Huck wrote: > [...] > > > > Btw: should Documentation/virt/kvm/api.txt spell out the valid range > > for ar explicitly? > > > > That certainly would not hurt. Care to send a patch, or shall I assemble > one

Re: [PATCH] KVM: s390: Test for bad access register at the start of S390_MEM_OP

2019-08-29 Thread Thomas Huth
On 29/08/2019 13.18, Cornelia Huck wrote: [...] > > Btw: should Documentation/virt/kvm/api.txt spell out the valid range > for ar explicitly? > That certainly would not hurt. Care to send a patch, or shall I assemble one? Thomas

Re: [PATCH] KVM: s390: Test for bad access register at the start of S390_MEM_OP

2019-08-29 Thread Cornelia Huck
On Thu, 29 Aug 2019 12:53:56 +0200 Thomas Huth wrote: > If the KVM_S390_MEM_OP ioctl is called with an access register >= 16, > then there is certainly a bug in the calling userspace application. > We check for wrong access registers, but only if the vCPU was already > in the access register mode

Re: [PATCH] KVM: s390: Test for bad access register at the start of S390_MEM_OP

2019-08-29 Thread Janosch Frank
On 8/29/19 12:53 PM, Thomas Huth wrote: > If the KVM_S390_MEM_OP ioctl is called with an access register >= 16, > then there is certainly a bug in the calling userspace application. > We check for wrong access registers, but only if the vCPU was already > in the access register mode before (i.e. th

[PATCH] KVM: s390: Test for bad access register at the start of S390_MEM_OP

2019-08-29 Thread Thomas Huth
If the KVM_S390_MEM_OP ioctl is called with an access register >= 16, then there is certainly a bug in the calling userspace application. We check for wrong access registers, but only if the vCPU was already in the access register mode before (i.e. the SIE block has recorded it). The check is also