~tyhicks/ubuntu/+source/linux/+git/bionic:lp1760099-ppc-meltdown-spectre

Last commit made on 2018-04-05
Get this branch:
git clone -b lp1760099-ppc-meltdown-spectre https://git.launchpad.net/~tyhicks/ubuntu/+source/linux/+git/bionic
Only Tyler Hicks can upload to this branch. If you are Tyler Hicks please log in for upload directions.

Branch merges

Branch information

Name:
lp1760099-ppc-meltdown-spectre
Repository:
lp:~tyhicks/ubuntu/+source/linux/+git/bionic

Recent commits

275060e... by Michael Ellerman

powerpc/64s: Wire up cpu_show_spectre_v2()

BugLink: https://bugs.launchpad.net/bugs/1760099

CVE-2017-5715

Add a definition for cpu_show_spectre_v2() to override the generic
version. This has several permuations, though in practice some may not
occur we cater for any combination.

The most verbose is:

  Mitigation: Indirect branch serialisation (kernel only), Indirect
  branch cache disabled, ori31 speculation barrier enabled

We don't treat the ori31 speculation barrier as a mitigation on its
own, because it has to be *used* by code in order to be a mitigation
and we don't know if userspace is doing that. So if that's all we see
we say:

  Vulnerable, ori31 speculation barrier enabled

Signed-off-by: Michael Ellerman <email address hidden>
(cherry picked from commit d6fbe1c55c55c6937cbea3531af7da84ab7473c3 linux-next)
Signed-off-by: Tyler Hicks <email address hidden>

ccfb3e7... by Michael Ellerman

powerpc/64s: Wire up cpu_show_spectre_v1()

BugLink: https://bugs.launchpad.net/bugs/1760099

CVE-2017-5753

Add a definition for cpu_show_spectre_v1() to override the generic
version. Currently this just prints "Not affected" or "Vulnerable"
based on the firmware flag.

Although the kernel does have array_index_nospec() in a few places, we
haven't yet audited all the powerpc code to see where it's necessary,
so for now we don't list that as a mitigation.

Signed-off-by: Michael Ellerman <email address hidden>
(cherry picked from commit 56986016cb8cd9050e601831fe89f332b4e3c46e linux-next)
Signed-off-by: Tyler Hicks <email address hidden>

a338cb7... by Michael Ellerman

powerpc/pseries: Use the security flags in pseries_setup_rfi_flush()

BugLink: https://bugs.launchpad.net/bugs/1760099

CVE-2017-5754

Now that we have the security flags we can simplify the code in
pseries_setup_rfi_flush() because the security flags have pessimistic
defaults.

Signed-off-by: Michael Ellerman <email address hidden>
(cherry picked from commit 2e4a16161fcd324b1f9bf6cb6856529f7eaf0689 linux-next)
Signed-off-by: Tyler Hicks <email address hidden>

013eade... by Michael Ellerman

powerpc/powernv: Use the security flags in pnv_setup_rfi_flush()

BugLink: https://bugs.launchpad.net/bugs/1760099

CVE-2017-5754

Now that we have the security flags we can significantly simplify the
code in pnv_setup_rfi_flush(), because we can use the flags instead of
checking device tree properties and because the security flags have
pessimistic defaults.

Signed-off-by: Michael Ellerman <email address hidden>
(cherry picked from commit 37c0bdd00d3ae83369ab60a6712c28e11e6458d5 linux-next)
Signed-off-by: Tyler Hicks <email address hidden>

f29e612... by Michael Ellerman

powerpc/64s: Enhance the information in cpu_show_meltdown()

BugLink: https://bugs.launchpad.net/bugs/1760099

CVE-2017-5754

Now that we have the security feature flags we can make the
information displayed in the "meltdown" file more informative.

Signed-off-by: Michael Ellerman <email address hidden>
(cherry picked from commit ff348355e9c72493947be337bb4fae4fc1a41eba linux-next)
Signed-off-by: Tyler Hicks <email address hidden>

6542a17... by Michael Ellerman

powerpc/64s: Move cpu_show_meltdown()

BugLink: https://bugs.launchpad.net/bugs/1760099

CVE-2017-5754

This landed in setup_64.c for no good reason other than we had nowhere
else to put it. Now that we have a security-related file, that is a
better place for it so move it.

Signed-off-by: Michael Ellerman <email address hidden>
(cherry picked from commit 8ad33041563a10b34988800c682ada14b2612533 linux-next)
Signed-off-by: Tyler Hicks <email address hidden>

f91b1a8... by Michael Ellerman

powerpc/powernv: Set or clear security feature flags

BugLink: https://bugs.launchpad.net/bugs/1760099

CVE-2017-5753
CVE-2017-5715
CVE-2017-5754

Now that we have feature flags for security related things, set or
clear them based on what we see in the device tree provided by
firmware.

Signed-off-by: Michael Ellerman <email address hidden>
(cherry picked from commit 77addf6e95c8689e478d607176b399a6242a777e linux-next)
Signed-off-by: Tyler Hicks <email address hidden>

b1ff203... by Michael Ellerman

powerpc/pseries: Set or clear security feature flags

BugLink: https://bugs.launchpad.net/bugs/1760099

CVE-2017-5753
CVE-2017-5715
CVE-2017-5754

Now that we have feature flags for security related things, set or
clear them based on what we receive from the hypercall.

Signed-off-by: Michael Ellerman <email address hidden>
(cherry picked from commit f636c14790ead6cc22cf62279b1f8d7e11a67116 linux-next)
Signed-off-by: Tyler Hicks <email address hidden>

e08bb6a... by Michael Ellerman

powerpc: Add security feature flags for Spectre/Meltdown

BugLink: https://bugs.launchpad.net/bugs/1760099

CVE-2017-5753
CVE-2017-5715
CVE-2017-5754

This commit adds security feature flags to reflect the settings we
receive from firmware regarding Spectre/Meltdown mitigations.

The feature names reflect the names we are given by firmware on bare
metal machines. See the hostboot source for details.

Arguably these could be firmware features, but that then requires them
to be read early in boot so they're available prior to asm feature
patching, but we don't actually want to use them for patching. We may
also want to dynamically update them in future, which would be
incompatible with the way firmware features work (at the moment at
least). So for now just make them separate flags.

Signed-off-by: Michael Ellerman <email address hidden>
(cherry picked from commit 9a868f634349e62922c226834aa23e3d1329ae7f linux-next)
Signed-off-by: Tyler Hicks <email address hidden>

d1acf2c... by Michael Ellerman

powerpc/pseries: Add new H_GET_CPU_CHARACTERISTICS flags

BugLink: https://bugs.launchpad.net/bugs/1760099

CVE-2017-5753
CVE-2017-5715
CVE-2017-5754

Add some additional values which have been defined for the
H_GET_CPU_CHARACTERISTICS hypercall.

Signed-off-by: Michael Ellerman <email address hidden>
(cherry picked from commit c4bc36628d7f8b664657d8bd6ad1c44c177880b7 linux-next)
Signed-off-by: Tyler Hicks <email address hidden>