[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/5] xen/domain: Introduce a new check_domain_config() helper



>>> On 05.10.18 at 16:54, <andrew.cooper3@xxxxxxxxxx> wrote:
> Call it from the head of domain_create() (before doing any memory
> allocations), which will apply the checks to dom0 as well as domU's.
> 
> For now, just subsume the XEN_DOMCTL_CDF_* check from XEN_DOMCTL_createdomain.
> This means that the corner case of the toolstack providing bad configuration
> will burn a domid, but production setups shouldn't ever get into this
> situation.

"Burn" as in "skip in the current round", not as in "leak" afaiu?

> --- a/xen/common/domain.c
> +++ b/xen/common/domain.c
> @@ -288,6 +288,18 @@ static void _domain_destroy(struct domain *d)
>      free_domain_struct(d);
>  }
>  
> +static int check_domain_config(struct xen_domctl_createdomain *config)

I was tempted to ask for the parameter to be constified, but since on
its own the code movement here makes no sense (and the description
also doesn't supply any hint), I've peeked into patch 2, where I found
that Arm's arch_check_domain_config() actually modifies the config.
With that I don't consider "check" the right term for the function name;
"sanitize" or "massage" perhaps?

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.