<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/arm64/kernel/proton-pack.c, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2026-03-04T12:19:34Z</updated>
<entry>
<title>arm64: Add support for TSV110 Spectre-BHB mitigation</title>
<updated>2026-03-04T12:19:34Z</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=fd51d47fcacec3ca027eb65d8c44853d3b6cea95'/>
<id>urn:sha1:fd51d47fcacec3ca027eb65d8c44853d3b6cea95</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: Fix hard lockup when !MITIGATE_SPECTRE_BRANCH_HISTORY</title>
<updated>2025-11-24T13:31:50Z</updated>
<author>
<name>Jonathan Marek</name>
</author>
<published>2025-11-17T05:12:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=165eb13e485c5c25c7cb276ac85f788a2bd200cb'/>
<id>urn:sha1:165eb13e485c5c25c7cb276ac85f788a2bd200cb</id>
<content type='text'>
The "drop print" commit removed the whole branch and not just the print.
For some ARM64 cpus, this leads to hard lockup when
CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY is not enabled.

Fixes: 62e72463ca71 ("arm64: proton-pack: Drop print when !CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY")
Signed-off-by: Jonathan Marek &lt;jonathan@marek.ca&gt;
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
</content>
</entry>
<entry>
<title>arm64: proton-pack: Fix hard lockup due to print in scheduler context</title>
<updated>2025-11-07T14:49:12Z</updated>
<author>
<name>shechenglong</name>
</author>
<published>2025-10-31T09:15:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7f1635737823a6c0c412ccf3767a12bec642c10f'/>
<id>urn:sha1:7f1635737823a6c0c412ccf3767a12bec642c10f</id>
<content type='text'>
Relocate the printk() calls from spectre_v4_mitigations_off() and
spectre_v2_mitigations_off() into setup_system_capabilities() function,
preventing hard lockups caused by printk calls in scheduler context:

  | _raw_spin_lock_nested+168
  | ttwu_queue+180 （rq_lock(rq, &amp;rf); 2nd acquiring the rq-&gt;__lock）
  | try_to_wake_up+548
  | wake_up_process+32
  | __up+88
  | up+100
  | __up_console_sem+96
  | console_unlock+696
  | vprintk_emit+428
  | vprintk_default+64
  | vprintk_func+220
  | printk+104
  | spectre_v4_enable_task_mitigation+344
  | __switch_to+100
  | __schedule+1028 (rq_lock(rq, &amp;rf); 1st acquiring the rq-&gt;__lock)
  | schedule_idle+48
  | do_idle+388
  | cpu_startup_entry+44
  | secondary_start_kernel+352

Suggested-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Suggested-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Suggested-by: Will Deacon &lt;will@kernel.org&gt;
Signed-off-by: shechenglong &lt;shechenglong@xfusion.com&gt;
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
</content>
</entry>
<entry>
<title>arm64: proton-pack: Drop print when !CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY</title>
<updated>2025-11-07T14:49:09Z</updated>
<author>
<name>shechenglong</name>
</author>
<published>2025-10-31T09:15:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=62e72463ca714073962eda450e80c5d71dfb0dcb'/>
<id>urn:sha1:62e72463ca714073962eda450e80c5d71dfb0dcb</id>
<content type='text'>
Following the pattern established with other Spectre mitigations,
do not print a message when the CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY
Kconfig option is disabled.

Suggested-by: Will Deacon &lt;will@kernel.org&gt;
Signed-off-by: shechenglong &lt;shechenglong@xfusion.com&gt;
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
</content>
</entry>
<entry>
<title>arm64: errata: Expand speculative SSBS workaround for Cortex-A720AE</title>
<updated>2025-09-18T10:41:24Z</updated>
<author>
<name>Kuninori Morimoto</name>
</author>
<published>2025-09-18T06:27:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3ba8d4aa42bd5dc6e2493ce4a73bb41c9cfd77ca'/>
<id>urn:sha1:3ba8d4aa42bd5dc6e2493ce4a73bb41c9cfd77ca</id>
<content type='text'>
It is same as Cortex-A720.

Link: https://lore.kernel.org/all/aMlFwbDjJ6yKuxTv@J2N7QTR9R3.cambridge.arm.com/
Signed-off-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
</content>
</entry>
<entry>
<title>arm64: proton-pack: Add new CPUs 'k' values for branch mitigation</title>
<updated>2025-05-08T14:29:28Z</updated>
<author>
<name>James Morse</name>
</author>
<published>2024-08-12T16:50:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=efe676a1a7554219eae0b0dcfe1e0cdcc9ef9aef'/>
<id>urn:sha1:efe676a1a7554219eae0b0dcfe1e0cdcc9ef9aef</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>arm64: bpf: Add BHB mitigation to the epilogue for cBPF programs</title>
<updated>2025-05-08T14:28:35Z</updated>
<author>
<name>James Morse</name>
</author>
<published>2021-12-09T15:13:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0dfefc2ea2f29ced2416017d7e5b1253a54c2735'/>
<id>urn:sha1:0dfefc2ea2f29ced2416017d7e5b1253a54c2735</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>arm64: proton-pack: Expose whether the branchy loop k value</title>
<updated>2025-05-08T14:28:35Z</updated>
<author>
<name>James Morse</name>
</author>
<published>2025-04-29T12:55:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a1152be30a043d2d4dcb1683415f328bf3c51978'/>
<id>urn:sha1:a1152be30a043d2d4dcb1683415f328bf3c51978</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>arm64: proton-pack: Expose whether the platform is mitigated by firmware</title>
<updated>2025-05-08T14:28:35Z</updated>
<author>
<name>James Morse</name>
</author>
<published>2024-08-19T13:15:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e7956c92f396a44eeeb6eaf7a5b5e1ad24db6748'/>
<id>urn:sha1:e7956c92f396a44eeeb6eaf7a5b5e1ad24db6748</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>arm64: errata: Add missing sentinels to Spectre-BHB MIDR arrays</title>
<updated>2025-05-01T16:44:18Z</updated>
<author>
<name>Will Deacon</name>
</author>
<published>2025-05-01T10:47:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fee4d171451c1ad9e8aaf65fc0ab7d143a33bd72'/>
<id>urn:sha1:fee4d171451c1ad9e8aaf65fc0ab7d143a33bd72</id>
<content type='text'>
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;
</content>
</entry>
</feed>
