mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: boris.ostrovsky@oracle.com
To: Roger Pau Monne <roger.pau@citrix.com>, linux-kernel@vger.kernel.org
Cc: Juergen Gross <jgross@suse.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Paul Durrant <paul.durrant@citrix.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH] xen/privcmd: allow fetching resource sizes
Date: Mon, 11 Jan 2021 17:09:54 -0500	[thread overview]
Message-ID: <555ba53c-1b6b-6cf7-9887-52d4179f7456@oracle.com> (raw)
In-Reply-To: <20210111152958.7166-1-roger.pau@citrix.com>


On 1/11/21 10:29 AM, Roger Pau Monne wrote:
>  
> +	xdata.domid = kdata.dom;
> +	xdata.type = kdata.type;
> +	xdata.id = kdata.id;
> +
> +	if (!kdata.addr && !kdata.num) {


I think we should not allow only one of them to be zero. If it's only kdata.num then we will end up with pfns array set to ZERO_SIZE_PTR (which is 0x10). We seem to be OK in that we are not derefencing pfns (either in kernel or in hypervisor) if number of frames is zero but IMO we shouldn't be tempting the fate.


(And if it's only kdata.addr then we will get a vma but I am not sure it will do what we want.)


-boris



  reply	other threads:[~2021-01-11 22:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 15:29 Roger Pau Monne
2021-01-11 22:09 ` boris.ostrovsky [this message]
2021-01-11 22:39   ` Andrew Cooper
2021-01-12  5:50     ` Jürgen Groß
2021-01-12  6:01       ` Jürgen Groß
2021-01-12  5:57 ` Jürgen Groß
2021-01-12 10:03   ` Roger Pau Monné
2021-01-12 10:34     ` Jürgen Groß

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=555ba53c-1b6b-6cf7-9887-52d4179f7456@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul.durrant@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®