<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/arm64/kernel/proton-pack.c, branch linux-5.12.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-12-09T10:00:24Z</updated>
<entry>
<title>Merge remote-tracking branch 'origin/kvm-arm64/psci-relay' into kvmarm-master/next</title>
<updated>2020-12-09T10:00:24Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2020-12-09T10:00:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3a514592b698588326924625b6948a10c35fadd5'/>
<id>urn:sha1:3a514592b698588326924625b6948a10c35fadd5</id>
<content type='text'>
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>arm64: add C wrappers for SET_PSTATE_*()</title>
<updated>2020-12-02T19:44:02Z</updated>
<author>
<name>Mark Rutland</name>
</author>
<published>2020-11-13T12:49:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=515d5c8a1374b307225e41b3e66b0aad08585f53'/>
<id>urn:sha1:515d5c8a1374b307225e41b3e66b0aad08585f53</id>
<content type='text'>
To make callsites easier to read, add trivial C wrappers for the
SET_PSTATE_*() helpers, and convert trivial uses over to these. The new
wrappers will be used further in subsequent patches.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: James Morse &lt;james.morse@arm.com&gt;
Cc: Will Deacon &lt;will@kernel.org&gt;
Link: https://lore.kernel.org/r/20201113124937.20574-3-mark.rutland@arm.com
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'kvm-arm64/vector-rework' into kvmarm-master/next</title>
<updated>2020-11-27T11:47:08Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2020-11-27T11:47:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dc2286f397e69989c803abfdb0d75ae90b88c98c'/>
<id>urn:sha1:dc2286f397e69989c803abfdb0d75ae90b88c98c</id>
<content type='text'>
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>arm64: spectre: Consolidate spectre-v3a detection</title>
<updated>2020-11-16T10:43:06Z</updated>
<author>
<name>Will Deacon</name>
</author>
<published>2020-11-13T11:38:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cd1f56b930e857c170d8a04f0f989bfb8a1b5ac1'/>
<id>urn:sha1:cd1f56b930e857c170d8a04f0f989bfb8a1b5ac1</id>
<content type='text'>
The spectre-v3a mitigation is split between cpu_errata.c and spectre.c,
with the former handling detection of the problem and the latter handling
enabling of the workaround.

Move the detection logic alongside the enabling logic, like we do for the
other spectre mitigations.

Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Cc: Marc Zyngier &lt;maz@kernel.org&gt;
Cc: Quentin Perret &lt;qperret@google.com&gt;
Link: https://lore.kernel.org/r/20201113113847.21619-10-will@kernel.org
</content>
</entry>
<entry>
<title>arm64: spectre: Rename ARM64_HARDEN_EL2_VECTORS to ARM64_SPECTRE_V3A</title>
<updated>2020-11-16T10:43:06Z</updated>
<author>
<name>Will Deacon</name>
</author>
<published>2020-11-13T11:38:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c4792b6dbc5070fe67f4cdcfdad39416333acbe0'/>
<id>urn:sha1:c4792b6dbc5070fe67f4cdcfdad39416333acbe0</id>
<content type='text'>
Since ARM64_HARDEN_EL2_VECTORS is really a mitigation for Spectre-v3a,
rename it accordingly for consistency with the v2 and v4 mitigation.

Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Cc: Marc Zyngier &lt;maz@kernel.org&gt;
Cc: Quentin Perret &lt;qperret@google.com&gt;
Link: https://lore.kernel.org/r/20201113113847.21619-9-will@kernel.org
</content>
</entry>
<entry>
<title>KVM: arm64: Allocate hyp vectors statically</title>
<updated>2020-11-16T10:43:05Z</updated>
<author>
<name>Will Deacon</name>
</author>
<published>2020-11-13T11:38:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b881cdce77b48bd488f268041f32951bab89bb0f'/>
<id>urn:sha1:b881cdce77b48bd488f268041f32951bab89bb0f</id>
<content type='text'>
The EL2 vectors installed when a guest is running point at one of the
following configurations for a given CPU:

  - Straight at __kvm_hyp_vector
  - A trampoline containing an SMC sequence to mitigate Spectre-v2 and
    then a direct branch to __kvm_hyp_vector
  - A dynamically-allocated trampoline which has an indirect branch to
    __kvm_hyp_vector
  - A dynamically-allocated trampoline containing an SMC sequence to
    mitigate Spectre-v2 and then an indirect branch to __kvm_hyp_vector

The indirect branches mean that VA randomization at EL2 isn't trivially
bypassable using Spectre-v3a (where the vector base is readable by the
guest).

Rather than populate these vectors dynamically, configure everything
statically and use an enumerated type to identify the vector "slot"
corresponding to one of the configurations above. This both simplifies
the code, but also makes it much easier to implement at EL2 later on.

Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
[maz: fixed double call to kvm_init_vector_slots() on nVHE]
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Cc: Marc Zyngier &lt;maz@kernel.org&gt;
Cc: Quentin Perret &lt;qperret@google.com&gt;
Link: https://lore.kernel.org/r/20201113113847.21619-8-will@kernel.org
</content>
</entry>
<entry>
<title>arm64: proton-pack: Add KRYO2XX silver CPUs to spectre-v2 safe-list</title>
<updated>2020-11-13T09:47:08Z</updated>
<author>
<name>Konrad Dybcio</name>
</author>
<published>2020-11-04T23:22:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=38328d40116739af0692748427bedda35b286c33'/>
<id>urn:sha1:38328d40116739af0692748427bedda35b286c33</id>
<content type='text'>
KRYO2XX silver (LITTLE) CPUs are based on Cortex-A53
and they are not affected by spectre-v2.

Signed-off-by: Konrad Dybcio &lt;konrad.dybcio@somainline.org&gt;
Link: https://lore.kernel.org/r/20201104232218.198800-4-konrad.dybcio@somainline.org
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
</content>
</entry>
<entry>
<title>arm64: alternatives: Split up alternative.h</title>
<updated>2020-11-09T21:49:34Z</updated>
<author>
<name>Will Deacon</name>
</author>
<published>2020-06-30T12:55:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7cda23da52ad793a578d290e7fcc9cdc1698bba8'/>
<id>urn:sha1:7cda23da52ad793a578d290e7fcc9cdc1698bba8</id>
<content type='text'>
asm/alternative.h contains both the macros needed to use alternatives,
as well the type definitions and function prototypes for applying them.

Split the header in two, so that alternatives can be used from core
header files such as linux/compiler.h without the risk of circular
includes

Acked-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Acked-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: ARM_SMCCC_ARCH_WORKAROUND_1 doesn't return SMCCC_RET_NOT_REQUIRED</title>
<updated>2020-10-28T11:13:36Z</updated>
<author>
<name>Stephen Boyd</name>
</author>
<published>2020-10-23T15:47:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1de111b51b829bcf01d2e57971f8fd07a665fa3f'/>
<id>urn:sha1:1de111b51b829bcf01d2e57971f8fd07a665fa3f</id>
<content type='text'>
According to the SMCCC spec[1](7.5.2 Discovery) the
ARM_SMCCC_ARCH_WORKAROUND_1 function id only returns 0, 1, and
SMCCC_RET_NOT_SUPPORTED.

 0 is "workaround required and safe to call this function"
 1 is "workaround not required but safe to call this function"
 SMCCC_RET_NOT_SUPPORTED is "might be vulnerable or might not be, who knows, I give up!"

SMCCC_RET_NOT_SUPPORTED might as well mean "workaround required, except
calling this function may not work because it isn't implemented in some
cases". Wonderful. We map this SMC call to

 0 is SPECTRE_MITIGATED
 1 is SPECTRE_UNAFFECTED
 SMCCC_RET_NOT_SUPPORTED is SPECTRE_VULNERABLE

For KVM hypercalls (hvc), we've implemented this function id to return
SMCCC_RET_NOT_SUPPORTED, 0, and SMCCC_RET_NOT_REQUIRED. One of those
isn't supposed to be there. Per the code we call
arm64_get_spectre_v2_state() to figure out what to return for this
feature discovery call.

 0 is SPECTRE_MITIGATED
 SMCCC_RET_NOT_REQUIRED is SPECTRE_UNAFFECTED
 SMCCC_RET_NOT_SUPPORTED is SPECTRE_VULNERABLE

Let's clean this up so that KVM tells the guest this mapping:

 0 is SPECTRE_MITIGATED
 1 is SPECTRE_UNAFFECTED
 SMCCC_RET_NOT_SUPPORTED is SPECTRE_VULNERABLE

Note: SMCCC_RET_NOT_AFFECTED is 1 but isn't part of the SMCCC spec

Fixes: c118bbb52743 ("arm64: KVM: Propagate full Spectre v2 workaround state to KVM guests")
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Acked-by: Marc Zyngier &lt;maz@kernel.org&gt;
Acked-by: Will Deacon &lt;will@kernel.org&gt;
Cc: Andre Przywara &lt;andre.przywara@arm.com&gt;
Cc: Steven Price &lt;steven.price@arm.com&gt;
Cc: Marc Zyngier &lt;maz@kernel.org&gt;
Cc: stable@vger.kernel.org
Link: https://developer.arm.com/documentation/den0028/latest [1]
Link: https://lore.kernel.org/r/20201023154751.1973872-1-swboyd@chromium.org
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
</content>
</entry>
<entry>
<title>arm64: proton-pack: Update comment to reflect new function name</title>
<updated>2020-10-21T10:07:27Z</updated>
<author>
<name>Stephen Boyd</name>
</author>
<published>2020-10-20T21:45:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=66dd3474702aa98d5844367e1577cdad78ef7c65'/>
<id>urn:sha1:66dd3474702aa98d5844367e1577cdad78ef7c65</id>
<content type='text'>
The function detect_harden_bp_fw() is gone after commit d4647f0a2ad7
("arm64: Rewrite Spectre-v2 mitigation code"). Update this comment to
reflect the new state of affairs.

Fixes: d4647f0a2ad7 ("arm64: Rewrite Spectre-v2 mitigation code")
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Cc: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20201020214544.3206838-3-swboyd@chromium.org
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
</content>
</entry>
</feed>
