On Wed, 2018-01-24 at 10:17 -0800, Andi Kleen wrote:
> +/* A module has been loaded. Disable reporting that we're good. */
> +void disable_retpoline(void)
> +{
> + spectre_v2_enabled = SPECTRE_V2_NONE;
That wants to be one of the 'MINIMAL' variants.
> + pr_err("system may be vunerable to spectre\n");
> +}
> +
> +bool retpoline_enabled(void)
> +{
> + return spectre_v2_enabled != SPECTRE_V2_NONE;
How about checking for X86_FEATURE_RETPOLINE?
smime.p7s
Description: S/MIME cryptographic signature

