From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Fix prefix register checking in arch/s390/kvm/sigp.c Date: Wed, 02 Dec 2009 14:55:48 +0200 Message-ID: <4B1663D4.5050003@redhat.com> References: <4B13EF71.3080905@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alexander Graf , Heiko Carstens , KVM list , stable@kernel.org, Martin Schwidefsky To: Carsten Otte Return-path: Received: from mx1.redhat.com ([209.132.183.28]:58749 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751429AbZLBM4Y (ORCPT ); Wed, 2 Dec 2009 07:56:24 -0500 In-Reply-To: <4B13EF71.3080905@de.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On 11/30/2009 06:14 PM, Carsten Otte wrote: > This patch corrects the checking of the new address for the prefix register. > On s390, the prefix register is used to address the cpu's lowcore (address > 0...8k). This check is supposed to verify that the memory is readable and > present. > copy_from_guest is a helper function, that can be used to read from guest > memory. It applies prefixing, adds the start address of the guest memory in > user, and then calls copy_from_user. Previous code was obviously broken for > two reasons: > - prefixing should not be applied here. The current prefix register is > going to be updated soon, and the address we're looking for will be > 0..8k after we've updated the register > - we're adding the guest origin (gmsor) twice: once in subject code > and once in copy_from_guest > > With kuli, we did not hit this problem because (a) we were lucky with > previous prefix register content, and (b) our guest memory was mmaped > very low into user address space. > > Applied, thanks. -- error compiling committee.c: too many arguments to function