From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: [V1 PATCH 3/3] pvh: disallow PHYSDEVOP_pirq_eoi_gmfn_v2/v1 Date: Mon, 24 Feb 2014 17:03:57 -0800 Message-ID: <1393290237-28427-4-git-send-email-mukesh.rathor@oracle.com> References: <1393290237-28427-1-git-send-email-mukesh.rathor@oracle.com> <1393290237-28427-2-git-send-email-mukesh.rathor@oracle.com> <1393290237-28427-3-git-send-email-mukesh.rathor@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WI6TR-0001s2-5g for xen-devel@lists.xenproject.org; Tue, 25 Feb 2014 01:06:17 +0000 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s1P16C8x015795 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 25 Feb 2014 01:06:13 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s1P16BM7020009 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 25 Feb 2014 01:06:12 GMT Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s1P16BGG008272 for ; Tue, 25 Feb 2014 01:06:11 GMT In-Reply-To: <1393290237-28427-3-git-send-email-mukesh.rathor@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org A call to do_physdev_op with PHYSDEVOP_pirq_eoi_gmfn_v2/v1 will crash xen later. Disallow that. Currently, such a path exists for linux dom0 pvh. Signed-off-by: Mukesh Rathor --- xen/arch/x86/physdev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c index bc0634c..9f85857 100644 --- a/xen/arch/x86/physdev.c +++ b/xen/arch/x86/physdev.c @@ -339,6 +339,10 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) unsigned long mfn; struct page_info *page; + ret = -ENOSYS; + if ( is_pvh_vcpu(current) ) + break; + ret = -EFAULT; if ( copy_from_guest(&info, arg, 1) != 0 ) break; -- 1.8.3.1