All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: Paul Durrant <paul@xen.org>, Ian Jackson <ian.jackson@citrix.com>,
	Wei Liu <wl@xen.org>, Juergen Gross <jgross@suse.com>
Subject: [PATCH 4/4] libxc: correct bounce direction in xc_get_device_group()
Date: Wed, 1 Dec 2021 10:42:36 +0100	[thread overview]
Message-ID: <b53c7853-b53a-37a0-d3bb-81093b19f305@suse.com> (raw)
In-Reply-To: <5d72c629-fabf-3d40-aa19-d177826fdde5@suse.com>

The array of IDs is an output.

Fixes: 79647c5bc9c6 ("libxc: convert domctl interfaces over to hypercall buffers")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
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) )
     {



  parent reply	other threads:[~2021-12-01  9:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-01  9:35 [PATCH 0/4] (mainly) IOMMU hook adjustments Jan Beulich
2021-12-01  9:39 ` [PATCH 1/4] IOMMU/x86: switch to alternatives-call patching in further instances Jan Beulich
2021-12-01 15:13   ` Andrew Cooper
2021-12-02  7:24     ` Jan Beulich
2021-12-01  9:40 ` [PATCH 2/4] VT-d / x86: re-arrange cache syncing Jan Beulich
2021-12-01 14:39   ` Andrew Cooper
2021-12-02  9:19     ` Jan Beulich
2021-12-24  7:24       ` Tian, Kevin
2021-12-01  9:41 ` [PATCH 3/4] VT-d: replace flush_all_cache() Jan Beulich
2021-12-01 13:02   ` Andrew Cooper
2021-12-02  8:47     ` Jan Beulich
2021-12-24  7:28       ` Tian, Kevin
2021-12-01  9:42 ` Jan Beulich [this message]
2021-12-01 12:11   ` [PATCH 4/4] libxc: correct bounce direction in xc_get_device_group() Juergen Gross
2021-12-01 15:11   ` Andrew Cooper
2021-12-02  7:30     ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b53c7853-b53a-37a0-d3bb-81093b19f305@suse.com \
    --to=jbeulich@suse.com \
    --cc=ian.jackson@citrix.com \
    --cc=jgross@suse.com \
    --cc=paul@xen.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.