[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180112221313.GA13035@light.dominikbrodowski.net>
Date: Fri, 12 Jan 2018 23:13:13 +0100
From: Dominik Brodowski <law@...inikbrodowski.net>
To: Andi Kleen <andi@...stfloor.org>
Cc: tglx@...utronix.de, x86@...nel.org, dwmw@...zon.co.uk,
linux-kernel@...r.kernel.org, pjt@...gle.com,
torvalds@...ux-foundation.org, gregkh@...ux-foundation.org,
peterz@...radead.org, luto@...capital.net, thomas.lendacky@....com,
arjan.van.de.ven@...el.com, Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH 1/4] x86/retpoline: Add new mode RETPOLINE_UNDERFLOW
> @@ -209,6 +234,11 @@ static void __init spectre_v2_select_mitigation(void)
> mode = retp_compiler() ? SPECTRE_V2_RETPOLINE_GENERIC :
> SPECTRE_V2_RETPOLINE_MINIMAL;
> setup_force_cpu_cap(X86_FEATURE_RETPOLINE);
> + if (mode == SPECTRE_V2_RETPOLINE_GENERIC &&
> + cpu_needs_underflow_protection()) {
> + mode = SPECTRE_V2_RETPOLINE_UNDERFLOW;
> + setup_force_cpu_cap(X86_FEATURE_RETURN_UNDERFLOW);
> + }
> }
Why does this require a retp-compatible compiler to be enabled?
Thanks,
Dominik
Powered by blists - more mailing lists