[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] x86/hypercall: fix gnttab hypercall args conditional build on pvshim


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Fri, 8 Jan 2021 15:41:23 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=806LayRgPaUKFKSNW6DyLVyreKyzZoAOGUnSZxzoWe8=; b=RmcSZFF+BkdIxwBo7WChHGXMtUBPeE66lYSLNVteNuFPWtP8krbVwQAujuY2cPkFmjH27bDo/7X8Qcdq8iVIrSsxX3NL9Z7Xun2UzZs2oyxz0JcMehLUz/w9T+ANrLm/2tWawx7uKUDkKnHd2emAZLvBNLc9/XIL+uSDZN13iZEwRSPVlCdZ5JMsQpCZhshXdvDIkvKZyp6XaSNh8HMN4DIDTCQpngp2RscKEYOY6SOaIAll1c/OOjoFMXvjDppIYh0jbf0p0oVBncZOrKjaBPhzsXo576ljbKWQk508xHhF8TzIbGYu/Wx7cmTwcAWO7fqdiNNx5cDfYrwUWMP7cA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kvCN61PJiIqQhYTQM/l8wisuoW9FA1TZpYaqw/wHdVMFYqKjPVOjl7mvj55SwEdjZAnE00I0KXcsg8j2cGLAf7iknNow72BkVPqcVDsNEclikQR/GTP6qvzG/1cHUI6EmEWG/YVo9mamecayoyZrSzJg0Ighkjal1mP5dkd9Bdf78AWJJcYi1ZJRm1XwlnMkExtX8fVXjVnm7g2vC7x4fM2Vtm7Kjxc8lCJvlll8bSfIU7GWIdFB1ItI/CTTy1D9FZWkXM2zqecqtIqVjaqCkpXSXH3+fMoYsVh4c1Ke4h7GUiChNrXLl2fcm1vbh2UAwaaoADJ6NFsd9rWWUY0kuA==
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Fri, 08 Jan 2021 14:41:44 +0000
  • Ironport-sdr: vTmW4qRBKwTPwiO8VW8oinn6e2FmiuD+OZC11lyPJyzdcnzUl5zwXDem7/wQ67rMUafz25h41H 1keN2Hl3pD9CxWWWKr4+jq+BdU9Nc2t7A9gKq2vuLSWK4g3ufybvlce0vXUYE0w5Y3Iet9fUsI EdR9QOwtu7jceMsnJmvLib982yYDX9N+8wXuQOHz1gjPmW1uSalJaLthr6NmFklNf4ZKEOFnVW SlcehDq+a1L9CT+0WZUrnW2PsbgaXObK/wbxbIi+yt3+I/w1Z8S0MO/fZZerrHTWCt9NlA55DB +1c=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

A pvshim build doesn't require the grant table functionality built in,
but it does require knowing the number of arguments the hypercall has
so the hypercall parameter clobbering works properly.

Note this hasn't been detected by osstest because the tools pvshim
build is done without debug enabled, so the hypercall parameter
clobbering doesn't happen.

Fixes: d2151152dd2 ('xen: make grant table support configurable')
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
 xen/arch/x86/hypercall.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/hypercall.c b/xen/arch/x86/hypercall.c
index dd00983005..8d18ef80cc 100644
--- a/xen/arch/x86/hypercall.c
+++ b/xen/arch/x86/hypercall.c
@@ -47,7 +47,7 @@ const hypercall_args_t hypercall_args_table[NR_hypercalls] =
     ARGS(xen_version, 2),
     ARGS(console_io, 3),
     ARGS(physdev_op_compat, 1),
-#ifdef CONFIG_GRANT_TABLE
+#if defined(CONFIG_GRANT_TABLE) || defined(CONFIG_PV_SHIM)
     ARGS(grant_table_op, 3),
 #endif
     ARGS(vm_assist, 2),
-- 
2.29.2




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.