Re: [PATCH v2 03/32] qapi: add 'insecure-types' option for -compat argument

[email protected]
Newsgroups gmane.comp.emulators.qemu
Message-ID <178708450915.1320462.6965992998165943728.b4-review@b4>
> This introduces a new 'insecure-types' option for the 'compat'
> argument that accepts three values
> 
>  * accept: Allow any usage
>  * reject: Reject with an error reported
>  * warn: Allow any usage, with a warning reported
> 
> For historical compatibility it defaults to 'accept'.
> 
> The 'reject' and 'warn' values will take effect for any type
> that has been explicitly marked insecure, or is lacking an
> explicit declaration of its security status.
> 
> Signed-off-by: Daniel P. Berrangé <[email protected]>


> Message-ID: <[email protected]>
>
> diff --git a/include/qapi/compat-policy.h b/include/qapi/compat-policy.h
> index ea65e10744ab..b2d0835c3697 100644
> --- a/include/qapi/compat-policy.h
> +++ b/include/qapi/compat-policy.h
> @@ -24,6 +24,11 @@ bool compat_policy_input_ok(uint64_t features,
>                              const char *kind, const char *name,
>                              Error **errp);
>  
> +bool compat_policy_check_security(CompatPolicy *policy,
> +                                  const char *typename,
> +                                  bool isSecure,

It should take a "const CompatPolicy *policy".

-- 
Marc-André Lureau <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.