Commit a99659cb authored by Juerg Haefliger's avatar Juerg Haefliger

UBUNTU: SAUCE: x86/pti: Evaluate X86_BUG_CPU_MELTDOWN when pti=auto

CVE-2018-3639 (x86)

Commit f93e1bcd ("x86/pti: Do not enable PTI on CPUs which are not
vulnerable to Meltdown") introduced a smarter detection of CPUs that
are not affected by Meltdown. Make use of that when pti=auto which also
matches Linus' tree.

While at it, remove the unused variable 'enable'.
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Acked-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
parent c7cd9ecf
......@@ -278,7 +278,6 @@ static void __init kaiser_init_all_pgds(void)
void __init kaiser_check_boottime_disable(void)
{
bool enable = true;
char arg[5];
int ret;
......@@ -301,13 +300,11 @@ void __init kaiser_check_boottime_disable(void)
goto disable;
skip:
if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
if (!boot_cpu_has_bug(X86_BUG_CPU_MELTDOWN))
goto disable;
enable:
if (enable)
setup_force_cpu_cap(X86_FEATURE_KAISER);
setup_force_cpu_cap(X86_FEATURE_KAISER);
return;
disable:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment