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

Re: [Xen-devel] [PATCH] x86/spec-ctrl: Yet more fixes for xpti= parsing



>>> On 09.08.18 at 18:38, <andrew.cooper3@xxxxxxxxxx> wrote:
> As it currently stands, 'xpti=dom0' is indistinguishable from the default
> value, which means it will be overridden by ARCH_CAPABILITIES_RDCL_NO on fixed
> hardware.
> 
> Switch opt_xpti to use -1 as a default like all our other related options, and
> clobber it as soon as we have a string to parse.
> 
> In addition, 'xpti' alone should be interpreted in its positive boolean form,
> rather than resulting in a parse error.

But e.g. "xpti=dom0," should not be. I.e. ...

> @@ -439,6 +438,10 @@ static __init int parse_xpti(const char *s)
>      const char *ss;
>      int val, rc = 0;
>  
> +    /* Inhibit the defaults as an explicit choice has been given. */
> +    if ( opt_xpti == -1 )
> +        opt_xpti = 0;

... the check for an empty string pointed to by s needs to be put here,
ahead of the loop.

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®.