[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/4] libxc: correct bounce direction in xc_get_device_group()
- To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Wed, 1 Dec 2021 10:42:36 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yCxKdOv38xfLsrtBhC68T2KY7VJQHeYtb/l3qTS1wqQ=; b=fOC+V8VD3lwTebnBrLtgPkNWRDMoywZJFKwty34wmbeXI9wZAA1NkjVqZ+yp5M/i9sMySYkJ+vqAYMhbCLig3ny2SWvtHcE84RY42EwG4lrdxOwxOU+FlCDVBWM0scJZPvgz167iyG8w2RldFgZCn5KfY2X6asDXf1boQA4Rjqw4gyLPCQMEOtvgV1bCaaUbH/faELEc6GOgiJTyEZhwJtWNt46pzWe/a+uviTvQwTETeSlt7hqPYtABPIrwFv3mQzQZLVLSU7ery0dv55WZnMTa2pHjY6z1kOGJbsoeHB02g08wumPc67gfYll3BGiVX1vSoqm0PV//GvjsYNGE5A==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A1vCqNXhxuJy11f+B+U5t1B/YsF3LFMrnvY1mCw3ESIDUzJSYlbmylwqxICqZ0tsKzeqeZCGZ4Z9+ot/nNEqo7xrxG6MavhNSEF7fUAifiBEcwMRXeM+mKm2DwFGl6B9Tg/3YGoztdSq2nCdH5BtmH799rvCqbzFSEXfJm1Y14O9Vwqsl2rDkpy/muaVfh3eiXr5aBrTXXAXWSBviHN/ql7m2CbFP9rasXUHMsYJ+SGAzFb1+NgtxtT37dBrtH3Gn/YNVufKHDaLh5Eg90uLrzDrryzKz73Mu4wcjRg9H6+AqOnYjgTJShX7GA4XIfdOJFQNoF33VkJmpvdbXCr8RA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Paul Durrant <paul@xxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
- Delivery-date: Wed, 01 Dec 2021 09:42:54 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
The array of IDs is an output.
Fixes: 79647c5bc9c6 ("libxc: convert domctl interfaces over to hypercall
buffers")
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
Clearly the function, including its Python wrapper, cannot have been
used by anything for many years. I wonder whether that isn't good enough
a reason to sanitize the layout of the array elements: Right now they
have BDF in bits 8...23, when conventionally this would be bits 0...15.
--- a/tools/libs/ctrl/xc_domain.c
+++ b/tools/libs/ctrl/xc_domain.c
@@ -1546,7 +1546,8 @@ int xc_get_device_group(
{
int rc;
DECLARE_DOMCTL;
- DECLARE_HYPERCALL_BOUNCE(sdev_array, max_sdevs * sizeof(*sdev_array),
XC_HYPERCALL_BUFFER_BOUNCE_IN);
+ DECLARE_HYPERCALL_BOUNCE(sdev_array, max_sdevs * sizeof(*sdev_array),
+ XC_HYPERCALL_BUFFER_BOUNCE_OUT);
if ( xc_hypercall_bounce_pre(xch, sdev_array) )
{
|