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 <[email protected]>
> Signed-off-by: Roger Pau Monné <[email protected]>

Reviewed-by: Andrew Cooper <[email protected]>, 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

Reply via email to