Re: [PATCH] Revert "module: Add retpoline tag to VERMAGIC"

From: David Woodhouse
Date: Wed Jan 24 2018 - 14:31:47 EST


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?

Attachment: smime.p7s
Description: S/MIME cryptographic signature