All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org
Cc: boris.ostrovsky@oracle.com
Subject: Re: [Xen-devel] [PATCH 4/4] xen: select grant interface version
Date: Wed, 13 Sep 2017 11:23:45 +0200	[thread overview]
Message-ID: <7d34f929-b45d-c056-865d-94082312b0bc@suse.com> (raw)
In-Reply-To: <b733a132-e3a8-d096-a015-f1762165cc21@citrix.com>

On 12/09/17 20:54, Andrew Cooper wrote:
> On 08/09/17 15:48, Juergen Gross wrote:
>>  static void gnttab_request_version(void)
>>  {
>> -	int rc;
>> +	long rc;
>>  	struct gnttab_set_version gsv;
>>  
>> -	gsv.version = 1;
>> +	rc = HYPERVISOR_memory_op(XENMEM_maximum_ram_page, NULL);
> 
> This hypercall is information leak and layering violation.  Please can
> we avoid adding more dependence on its presence?  (I'm got a
> proto-series which strips various corners off the hypervisor for attack
> surface reduction purposes, and this hypercall is one victim which is
> restricted to privileged domains only.)
> 
> For translated guests, it is definitely not the right number to check. 
> What matters is the maximum frame inside the translated guest, not on
> the host.

Oh, right.

> For PV guests, I'm not sure what to suggest, but the result of
> XENMEM_maximum_ram_page isn't applicable.  Xen's max_page can increase
> at runtime through memory hotplug, after which ballooning operations can
> leave Linux with a frame it wishes to grant which exceeds the limit
> calculated here.

We need a way to decide whether V2 is to be selected.

Is there a way to determine which is the highest physical address being
available for memory hotplug on a system? Something in ACPI tables
perhaps?


Juergen

  reply	other threads:[~2017-09-13  9:23 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-08 14:48 [PATCH 0/4] xen: grant table interface v2 support Juergen Gross
2017-09-08 14:48 ` [PATCH 1/4] xen: re-introduce support for grant v2 interface Juergen Gross
2017-09-08 14:48   ` Juergen Gross
2017-09-12 15:41   ` Boris Ostrovsky
2017-09-12 15:41   ` [Xen-devel] " Boris Ostrovsky
2017-09-12 15:45     ` Juergen Gross
2017-09-12 15:45       ` Juergen Gross
2017-09-08 14:48 ` [PATCH 2/4] xen: limit grant v2 interface to the v1 functionality Juergen Gross
2017-09-08 14:48 ` Juergen Gross
2017-09-12 15:44   ` Boris Ostrovsky
2017-09-12 15:44   ` Boris Ostrovsky
2017-09-12 15:50     ` Juergen Gross
2017-09-12 15:50       ` Juergen Gross
2017-09-12 16:05       ` Boris Ostrovsky
2017-09-12 16:05       ` Boris Ostrovsky
2017-09-12 16:09         ` Juergen Gross
2017-09-12 16:21           ` Boris Ostrovsky
2017-09-12 16:21           ` Boris Ostrovsky
2017-09-12 18:18             ` Juergen Gross
2017-09-12 18:18             ` Juergen Gross
2017-09-13 13:22               ` Boris Ostrovsky
2017-09-13 13:38                 ` Juergen Gross
2017-09-13 13:50                   ` Boris Ostrovsky
2017-09-13 13:50                     ` Boris Ostrovsky
2017-09-13 14:45                     ` Juergen Gross
2017-09-13 16:20                       ` Boris Ostrovsky
2017-09-13 16:20                       ` Boris Ostrovsky
2017-09-14  8:13                         ` Juergen Gross
2017-09-14  8:13                         ` Juergen Gross
2017-09-13 14:45                     ` Juergen Gross
2017-09-13 13:38                 ` Juergen Gross
2017-09-13 13:22               ` Boris Ostrovsky
2017-09-12 16:09         ` Juergen Gross
2017-09-08 14:48 ` [PATCH 3/4] xen: add grant interface version dependent constants to gnttab_ops Juergen Gross
2017-09-12 16:02   ` Boris Ostrovsky
2017-09-12 16:02   ` Boris Ostrovsky
2017-09-08 14:48 ` Juergen Gross
2017-09-08 14:48 ` [PATCH 4/4] xen: select grant interface version Juergen Gross
2017-09-08 14:48 ` Juergen Gross
2017-09-12 16:21   ` Boris Ostrovsky
2017-09-12 16:21   ` [Xen-devel] " Boris Ostrovsky
2017-09-12 18:54   ` Andrew Cooper
2017-09-13  9:23     ` Juergen Gross [this message]
2017-09-15 13:00       ` Juergen Gross
2017-09-15 13:00       ` [Xen-devel] " Juergen Gross
2017-09-15 13:21         ` Jan Beulich
2017-09-15 13:21         ` [Xen-devel] " Jan Beulich
     [not found]         ` <59BBEFFC020000780017B8EF@suse.com>
2017-09-15 13:27           ` Juergen Gross
2017-09-15 13:27           ` [Xen-devel] " Juergen Gross
2017-09-13  9:23     ` Juergen Gross
2017-09-12 18:54   ` Andrew Cooper

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=7d34f929-b45d-c056-865d-94082312b0bc@suse.com \
    --to=jgross@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=linux-kernel@vger.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 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.