<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/arm64/kernel/proton-pack.c, branch linux-5.10.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.10.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.10.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2026-03-04T12:19:52Z</updated>
<entry>
<title>arm64: Add support for TSV110 Spectre-BHB mitigation</title>
<updated>2026-03-04T12:19:52Z</updated>
<author>
<name>Jinqian Yang</name>
</author>
<published>2025-12-27T09:24:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=598c11dd4f4a9de31d854fcb9702f54c1c70f0d0'/>
<id>urn:sha1:598c11dd4f4a9de31d854fcb9702f54c1c70f0d0</id>
<content type='text'>
[ Upstream commit e3baa5d4b361276efeb87b20d8beced451a7dbd5 ]

The TSV110 processor is vulnerable to the Spectre-BHB (Branch History
Buffer) attack, which can be exploited to leak information through
branch prediction side channels. This commit adds the MIDR of TSV110
to the list for software mitigation.

Signed-off-by: Jinqian Yang &lt;yangjinqian1@huawei.com&gt;
Reviewed-by: Zenghui Yu &lt;zenghui.yu@linux.dev&gt;
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>arm64: proton-pack: Add new CPUs 'k' values for branch mitigation</title>
<updated>2025-06-27T10:04:23Z</updated>
<author>
<name>James Morse</name>
</author>
<published>2025-06-07T15:25:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9202c71e951294f14e5a3a648a3c44aa1afd64e3'/>
<id>urn:sha1:9202c71e951294f14e5a3a648a3c44aa1afd64e3</id>
<content type='text'>
[ Upstream commit efe676a1a7554219eae0b0dcfe1e0cdcc9ef9aef ]

Update the list of 'k' values for the branch mitigation from arm's
website.

Add the values for Cortex-X1C. The MIDR_EL1 value can be found here:
https://developer.arm.com/documentation/101968/0002/Register-descriptions/AArch&gt;

Link: https://developer.arm.com/documentation/110280/2-0/?lang=en
Signed-off-by: James Morse &lt;james.morse@arm.com&gt;
Reviewed-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Pu Lehui &lt;pulehui@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>arm64: bpf: Add BHB mitigation to the epilogue for cBPF programs</title>
<updated>2025-06-27T10:04:23Z</updated>
<author>
<name>James Morse</name>
</author>
<published>2025-06-07T15:25:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c6a8735d841bcb7649734bb3a787bb174c67c0d8'/>
<id>urn:sha1:c6a8735d841bcb7649734bb3a787bb174c67c0d8</id>
<content type='text'>
[ Upstream commit 0dfefc2ea2f29ced2416017d7e5b1253a54c2735 ]

A malicious BPF program may manipulate the branch history to influence
what the hardware speculates will happen next.

On exit from a BPF program, emit the BHB mititgation sequence.

This is only applied for 'classic' cBPF programs that are loaded by
seccomp.

Signed-off-by: James Morse &lt;james.morse@arm.com&gt;
Reviewed-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Acked-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: Pu Lehui &lt;pulehui@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>arm64: spectre: increase parameters that can be used to turn off bhb mitigation individually</title>
<updated>2025-06-27T10:04:23Z</updated>
<author>
<name>Liu Song</name>
</author>
<published>2025-06-07T15:25:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d38941ee87aa1e5848515f14cd61fa0e057ba512'/>
<id>urn:sha1:d38941ee87aa1e5848515f14cd61fa0e057ba512</id>
<content type='text'>
[ Upstream commit 877ace9eab7de032f954533afd5d1ecd0cf62eaf ]

In our environment, it was found that the mitigation BHB has a great
impact on the benchmark performance. For example, in the lmbench test,
the "process fork &amp;&amp; exit" test performance drops by 20%.
So it is necessary to have the ability to turn off the mitigation
individually through cmdline, thus avoiding having to compile the
kernel by adjusting the config.

Signed-off-by: Liu Song &lt;liusong@linux.alibaba.com&gt;
Acked-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Link: https://lore.kernel.org/r/1661514050-22263-1-git-send-email-liusong@linux.alibaba.com
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Pu Lehui &lt;pulehui@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>arm64: proton-pack: Expose whether the branchy loop k value</title>
<updated>2025-06-27T10:04:23Z</updated>
<author>
<name>James Morse</name>
</author>
<published>2025-06-07T15:25:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=86ca67653d1a48ee41a9d4a7cd33dfd700dabd90'/>
<id>urn:sha1:86ca67653d1a48ee41a9d4a7cd33dfd700dabd90</id>
<content type='text'>
[ Upstream commit a1152be30a043d2d4dcb1683415f328bf3c51978 ]

Add a helper to expose the k value of the branchy loop. This is needed
by the BPF JIT to generate the mitigation sequence in BPF programs.

Signed-off-by: James Morse &lt;james.morse@arm.com&gt;
Reviewed-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Pu Lehui &lt;pulehui@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>arm64: errata: Add missing sentinels to Spectre-BHB MIDR arrays</title>
<updated>2025-06-27T10:04:23Z</updated>
<author>
<name>Will Deacon</name>
</author>
<published>2025-06-07T15:25:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e68da90ac00d8b681561aeb8f5d6c47af3a04861'/>
<id>urn:sha1:e68da90ac00d8b681561aeb8f5d6c47af3a04861</id>
<content type='text'>
[ Upstream commit fee4d171451c1ad9e8aaf65fc0ab7d143a33bd72 ]

Commit a5951389e58d ("arm64: errata: Add newer ARM cores to the
spectre_bhb_loop_affected() lists") added some additional CPUs to the
Spectre-BHB workaround, including some new arrays for designs that
require new 'k' values for the workaround to be effective.

Unfortunately, the new arrays omitted the sentinel entry and so
is_midr_in_range_list() will walk off the end when it doesn't find a
match. With UBSAN enabled, this leads to a crash during boot when
is_midr_in_range_list() is inlined (which was more common prior to
c8c2647e69be ("arm64: Make  _midr_in_range_list() an exported
function")):

 |  Internal error: aarch64 BRK: 00000000f2000001 [#1] PREEMPT SMP
 |  pstate: 804000c5 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
 |  pc : spectre_bhb_loop_affected+0x28/0x30
 |  lr : is_spectre_bhb_affected+0x170/0x190
 | [...]
 |  Call trace:
 |   spectre_bhb_loop_affected+0x28/0x30
 |   update_cpu_capabilities+0xc0/0x184
 |   init_cpu_features+0x188/0x1a4
 |   cpuinfo_store_boot_cpu+0x4c/0x60
 |   smp_prepare_boot_cpu+0x38/0x54
 |   start_kernel+0x8c/0x478
 |   __primary_switched+0xc8/0xd4
 |  Code: 6b09011f 54000061 52801080 d65f03c0 (d4200020)
 |  ---[ end trace 0000000000000000 ]---
 |  Kernel panic - not syncing: aarch64 BRK: Fatal exception

Add the missing sentinel entries.

Cc: Lee Jones &lt;lee@kernel.org&gt;
Cc: James Morse &lt;james.morse@arm.com&gt;
Cc: Doug Anderson &lt;dianders@chromium.org&gt;
Cc: Shameer Kolothum &lt;shameerali.kolothum.thodi@huawei.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Reported-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Fixes: a5951389e58d ("arm64: errata: Add newer ARM cores to the spectre_bhb_loop_affected() lists")
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
Reviewed-by: Lee Jones &lt;lee@kernel.org&gt;
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/20250501104747.28431-1-will@kernel.org
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Pu Lehui &lt;pulehui@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>arm64: errata: Add newer ARM cores to the spectre_bhb_loop_affected() lists</title>
<updated>2025-06-27T10:04:23Z</updated>
<author>
<name>Douglas Anderson</name>
</author>
<published>2025-06-07T15:25:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4a2f3d8260a996bc43dcc1ce49ac594db54f4b3e'/>
<id>urn:sha1:4a2f3d8260a996bc43dcc1ce49ac594db54f4b3e</id>
<content type='text'>
[ Upstream commit a5951389e58d2e816eed3dbec5877de9327fd881 ]

When comparing to the ARM list [1], it appears that several ARM cores
were missing from the lists in spectre_bhb_loop_affected(). Add them.

NOTE: for some of these cores it may not matter since other ways of
clearing the BHB may be used (like the CLRBHB instruction or ECBHB),
but it still seems good to have all the info from ARM's whitepaper
included.

[1] https://developer.arm.com/Arm%20Security%20Center/Spectre-BHB

Fixes: 558c303c9734 ("arm64: Mitigate spectre style branch history side channels")
Cc: stable@vger.kernel.org
Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Reviewed-by: James Morse &lt;james.morse@arm.com&gt;
Link: https://lore.kernel.org/r/20250107120555.v4.5.I4a9a527e03f663040721c5401c41de587d015c82@changeid
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Pu Lehui &lt;pulehui@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>arm64: errata: Add KRYO 2XX/3XX/4XX silver cores to Spectre BHB safe list</title>
<updated>2025-06-27T10:04:23Z</updated>
<author>
<name>Douglas Anderson</name>
</author>
<published>2025-06-07T15:25:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=777f973a91a4129675a13135f13c752d463949aa'/>
<id>urn:sha1:777f973a91a4129675a13135f13c752d463949aa</id>
<content type='text'>
[ Upstream commit 0c9fc6e652cd5aed48c5f700c32b7642bea7f453 ]

Qualcomm has confirmed that, much like Cortex A53 and A55, KRYO
2XX/3XX/4XX silver cores are unaffected by Spectre BHB. Add them to
the safe list.

Fixes: 558c303c9734 ("arm64: Mitigate spectre style branch history side channels")
Cc: stable@vger.kernel.org
Cc: Scott Bauer &lt;sbauer@quicinc.com&gt;
Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Acked-by: Trilok Soni &lt;quic_tsoni@quicinc.com&gt;
Link: https://lore.kernel.org/r/20250107120555.v4.3.Iab8dbfb5c9b1e143e7a29f410bce5f9525a0ba32@changeid
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Pu Lehui &lt;pulehui@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>arm64: errata: Assume that unknown CPUs _are_ vulnerable to Spectre BHB</title>
<updated>2025-06-27T10:04:23Z</updated>
<author>
<name>Douglas Anderson</name>
</author>
<published>2025-06-07T15:25:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1c24e2af302c4ac234c337718a205cfb205cace4'/>
<id>urn:sha1:1c24e2af302c4ac234c337718a205cfb205cace4</id>
<content type='text'>
[ Upstream commit e403e8538359d8580cbee1976ff71813e947101e ]

The code for detecting CPUs that are vulnerable to Spectre BHB was
based on a hardcoded list of CPU IDs that were known to be affected.
Unfortunately, the list mostly only contained the IDs of standard ARM
cores. The IDs for many cores that are minor variants of the standard
ARM cores (like many Qualcomm Kyro CPUs) weren't listed. This led the
code to assume that those variants were not affected.

Flip the code on its head and instead assume that a core is vulnerable
if it doesn't have CSV2_3 but is unrecognized as being safe. This
involves creating a "Spectre BHB safe" list.

As of right now, the only CPU IDs added to the "Spectre BHB safe" list
are ARM Cortex A35, A53, A55, A510, and A520. This list was created by
looking for cores that weren't listed in ARM's list [1] as per review
feedback on v2 of this patch [2]. Additionally Brahma A53 is added as
per mailing list feedback [3].

NOTE: this patch will not actually _mitigate_ anyone, it will simply
cause them to report themselves as vulnerable. If any cores in the
system are reported as vulnerable but not mitigated then the whole
system will be reported as vulnerable though the system will attempt
to mitigate with the information it has about the known cores.

[1] https://developer.arm.com/Arm%20Security%20Center/Spectre-BHB
[2] https://lore.kernel.org/r/20241219175128.GA25477@willie-the-truck
[3] https://lore.kernel.org/r/18dbd7d1-a46c-4112-a425-320c99f67a8d@broadcom.com

Fixes: 558c303c9734 ("arm64: Mitigate spectre style branch history side channels")
Cc: stable@vger.kernel.org
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Link: https://lore.kernel.org/r/20250107120555.v4.2.I2040fa004dafe196243f67ebcc647cbedbb516e6@changeid
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
[The conflicts were mainly due to LTS commit e192c8baa69a
differ from mainline commit 558c303c9734]
Signed-off-by: Pu Lehui &lt;pulehui@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>arm64: proton-pack: Expose whether the platform is mitigated by firmware</title>
<updated>2025-06-27T10:04:23Z</updated>
<author>
<name>James Morse</name>
</author>
<published>2025-06-07T15:25:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cde8ad8a7aa5f2edc1ca6ed5c3931295f5bdee05'/>
<id>urn:sha1:cde8ad8a7aa5f2edc1ca6ed5c3931295f5bdee05</id>
<content type='text'>
[ Upstream commit e7956c92f396a44eeeb6eaf7a5b5e1ad24db6748 ]

is_spectre_bhb_fw_affected() allows the caller to determine if the CPU
is known to need a firmware mitigation. CPUs are either on the list
of CPUs we know about, or firmware has been queried and reported that
the platform is affected - and mitigated by firmware.

This helper is not useful to determine if the platform is mitigated
by firmware. A CPU could be on the know list, but the firmware may
not be implemented. Its affected but not mitigated.

spectre_bhb_enable_mitigation() handles this distinction by checking
the firmware state before enabling the mitigation.

Add a helper to expose this state. This will be used by the BPF JIT
to determine if calling firmware for a mitigation is necessary and
supported.

Signed-off-by: James Morse &lt;james.morse@arm.com&gt;
Reviewed-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
[The conflicts were due to not include bitmap of mitigations]
Signed-off-by: Pu Lehui &lt;pulehui@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
