All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <Andrew.Cooper3@citrix.com>
To: Roger Pau Monne <roger.pau@citrix.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: "Henry.Wang@arm.com" <Henry.Wang@arm.com>,
	Jan Beulich <jbeulich@suse.com>,
	George Dunlap <George.Dunlap@citrix.com>, Wei Liu <wl@xen.org>,
	Edwin Torok <edvin.torok@citrix.com>
Subject: Re: [PATCH for-4.17?] x86/paging: return -EINVAL for paging domctls for dying domains
Date: Wed, 9 Nov 2022 16:11:06 +0000	[thread overview]
Message-ID: <de5c9f07-90f5-a460-f1f7-a6732bbab1df@citrix.com> (raw)
In-Reply-To: <20221108113850.61619-1-roger.pau@citrix.com>

On 08/11/2022 11:38, Roger Pau Monne wrote:
> Like on the Arm side, return -EINVAL when attempting to do a p2m
> operation on dying domains.

Honestly, I'd drop the comment about ARM.  "the Arm side" has existed
for of all of a couple of weeks.

A far better justification is because almost all other DOMCTLs are
rejected with -EINVAL against dying domains.

> The current logic returns 0 and leaves the domctl parameter
> uninitialized for any parameter fetching operations (like the
> GET_ALLOCATION operation), which is not helpful from a toolstack point
> of view, because there's no indication that the data hasn't been
> fetched.
>
> Reported-by: Edwin Török <edvin.torok@citrix.com>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>, ideally with a
modified commit message.

Xen's behaviour is definitely bogus, whatever the perceived intention
behind this change was originally.

System-wide memory handling is unusably broken for known reasons, let
alone unexpected surprises like this, it is not credible to suggest that
unspecified obsolete code might be broken by such a change; it's
definitely broken, and what we risk is exposing a previously hidden error.

Not that this is relevant, because Xend only makes this hypercall
bounded by domctls which do yield -EINVAL for dying domains.

~Andrew

  parent reply	other threads:[~2022-11-09 16:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-08 11:38 [PATCH for-4.17?] x86/paging: return -EINVAL for paging domctls for dying domains Roger Pau Monne
2022-11-08 16:14 ` Jan Beulich
2022-11-08 16:43   ` Roger Pau Monné
2022-11-08 17:03     ` Jan Beulich
2022-11-08 17:15       ` Roger Pau Monné
2022-11-09  7:48         ` Jan Beulich
2022-11-09  9:45           ` Edwin Torok
2022-11-09  9:58             ` Jan Beulich
2022-11-09 10:11           ` Roger Pau Monné
2022-11-09 10:23             ` Jan Beulich
2022-11-09 11:36               ` Roger Pau Monné
2022-11-09 12:02                 ` Jan Beulich
2022-11-09 13:22                   ` Roger Pau Monné
2022-11-10  9:03                     ` Jan Beulich
2022-11-08 17:30     ` Edwin Torok
2022-11-09 16:11 ` Andrew Cooper [this message]
2022-11-10  9:02   ` 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=de5c9f07-90f5-a460-f1f7-a6732bbab1df@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=George.Dunlap@citrix.com \
    --cc=Henry.Wang@arm.com \
    --cc=edvin.torok@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=roger.pau@citrix.com \
    --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.