Skip to content

Commit 6ad4271

Browse files
committed
Rebuild rocky9_6 with kernel-5.14.0-570.37.1.el9_6
Rebuild_History BUILDABLE Rebuilding Kernel from rpm changelog with Fuzz Limit: 87.50% Number of commits in upstream range v5.14~1..kernel-mainline: 323388 Number of commits in rpm: 78 Number of commits matched with upstream: 74 (94.87%) Number of commits in upstream but not in rpm: 323314 Number of commits NOT found in upstream: 4 (5.13%) Rebuilding Kernel on Branch rocky9_6_rebuild_kernel-5.14.0-570.37.1.el9_6 for kernel-5.14.0-570.37.1.el9_6 Clean Cherry Picks: 39 (52.70%) Empty Cherry Picks: 28 (37.84%) _______________________________ Full Details Located here: ciq/ciq_backports/kernel-5.14.0-570.37.1.el9_6/rebuild.details.txt Includes: * git commit header above * Empty Commits with upstream SHA * RPM ChangeLog Entries that could not be matched Individual Empty Commit failures contained in the same containing directory. The git message for empty commits will have the path for the failed commit. File names are the first 8 characters of the upstream SHA
1 parent ed67f51 commit 6ad4271

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1601
-701
lines changed
File renamed without changes.

Documentation/ABI/testing/sysfs-devices-system-cpu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,7 @@ Description: information about CPUs heterogeneity.
519519

520520
What: /sys/devices/system/cpu/vulnerabilities
521521
/sys/devices/system/cpu/vulnerabilities/gather_data_sampling
522+
/sys/devices/system/cpu/vulnerabilities/indirect_target_selection
522523
/sys/devices/system/cpu/vulnerabilities/itlb_multihit
523524
/sys/devices/system/cpu/vulnerabilities/l1tf
524525
/sys/devices/system/cpu/vulnerabilities/mds

Documentation/admin-guide/hw-vuln/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ are configurable at compile, boot or run time.
2222
srso
2323
gather_data_sampling
2424
reg-file-data-sampling
25+
indirect-target-selection
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
Indirect Target Selection (ITS)
4+
===============================
5+
6+
ITS is a vulnerability in some Intel CPUs that support Enhanced IBRS and were
7+
released before Alder Lake. ITS may allow an attacker to control the prediction
8+
of indirect branches and RETs located in the lower half of a cacheline.
9+
10+
ITS is assigned CVE-2024-28956 with a CVSS score of 4.7 (Medium).
11+
12+
Scope of Impact
13+
---------------
14+
- **eIBRS Guest/Host Isolation**: Indirect branches in KVM/kernel may still be
15+
predicted with unintended target corresponding to a branch in the guest.
16+
17+
- **Intra-Mode BTI**: In-kernel training such as through cBPF or other native
18+
gadgets.
19+
20+
- **Indirect Branch Prediction Barrier (IBPB)**: After an IBPB, indirect
21+
branches may still be predicted with targets corresponding to direct branches
22+
executed prior to the IBPB. This is fixed by the IPU 2025.1 microcode, which
23+
should be available via distro updates. Alternatively microcode can be
24+
obtained from Intel's github repository [#f1]_.
25+
26+
Affected CPUs
27+
-------------
28+
Below is the list of ITS affected CPUs [#f2]_ [#f3]_:
29+
30+
======================== ============ ==================== ===============
31+
Common name Family_Model eIBRS Intra-mode BTI
32+
Guest/Host Isolation
33+
======================== ============ ==================== ===============
34+
SKYLAKE_X (step >= 6) 06_55H Affected Affected
35+
ICELAKE_X 06_6AH Not affected Affected
36+
ICELAKE_D 06_6CH Not affected Affected
37+
ICELAKE_L 06_7EH Not affected Affected
38+
TIGERLAKE_L 06_8CH Not affected Affected
39+
TIGERLAKE 06_8DH Not affected Affected
40+
KABYLAKE_L (step >= 12) 06_8EH Affected Affected
41+
KABYLAKE (step >= 13) 06_9EH Affected Affected
42+
COMETLAKE 06_A5H Affected Affected
43+
COMETLAKE_L 06_A6H Affected Affected
44+
ROCKETLAKE 06_A7H Not affected Affected
45+
======================== ============ ==================== ===============
46+
47+
- All affected CPUs enumerate Enhanced IBRS feature.
48+
- IBPB isolation is affected on all ITS affected CPUs, and need a microcode
49+
update for mitigation.
50+
- None of the affected CPUs enumerate BHI_CTRL which was introduced in Golden
51+
Cove (Alder Lake and Sapphire Rapids). This can help guests to determine the
52+
host's affected status.
53+
- Intel Atom CPUs are not affected by ITS.
54+
55+
Mitigation
56+
----------
57+
As only the indirect branches and RETs that have their last byte of instruction
58+
in the lower half of the cacheline are vulnerable to ITS, the basic idea behind
59+
the mitigation is to not allow indirect branches in the lower half.
60+
61+
This is achieved by relying on existing retpoline support in the kernel, and in
62+
compilers. ITS-vulnerable retpoline sites are runtime patched to point to newly
63+
added ITS-safe thunks. These safe thunks consists of indirect branch in the
64+
second half of the cacheline. Not all retpoline sites are patched to thunks, if
65+
a retpoline site is evaluated to be ITS-safe, it is replaced with an inline
66+
indirect branch.
67+
68+
Dynamic thunks
69+
~~~~~~~~~~~~~~
70+
From a dynamically allocated pool of safe-thunks, each vulnerable site is
71+
replaced with a new thunk, such that they get a unique address. This could
72+
improve the branch prediction accuracy. Also, it is a defense-in-depth measure
73+
against aliasing.
74+
75+
Note, for simplicity, indirect branches in eBPF programs are always replaced
76+
with a jump to a static thunk in __x86_indirect_its_thunk_array. If required,
77+
in future this can be changed to use dynamic thunks.
78+
79+
All vulnerable RETs are replaced with a static thunk, they do not use dynamic
80+
thunks. This is because RETs get their prediction from RSB mostly that does not
81+
depend on source address. RETs that underflow RSB may benefit from dynamic
82+
thunks. But, RETs significantly outnumber indirect branches, and any benefit
83+
from a unique source address could be outweighed by the increased icache
84+
footprint and iTLB pressure.
85+
86+
Retpoline
87+
~~~~~~~~~
88+
Retpoline sequence also mitigates ITS-unsafe indirect branches. For this
89+
reason, when retpoline is enabled, ITS mitigation only relocates the RETs to
90+
safe thunks. Unless user requested the RSB-stuffing mitigation.
91+
92+
RSB Stuffing
93+
~~~~~~~~~~~~
94+
RSB-stuffing via Call Depth Tracking is a mitigation for Retbleed RSB-underflow
95+
attacks. And it also mitigates RETs that are vulnerable to ITS.
96+
97+
Mitigation in guests
98+
^^^^^^^^^^^^^^^^^^^^
99+
All guests deploy ITS mitigation by default, irrespective of eIBRS enumeration
100+
and Family/Model of the guest. This is because eIBRS feature could be hidden
101+
from a guest. One exception to this is when a guest enumerates BHI_DIS_S, which
102+
indicates that the guest is running on an unaffected host.
103+
104+
To prevent guests from unnecessarily deploying the mitigation on unaffected
105+
platforms, Intel has defined ITS_NO bit(62) in MSR IA32_ARCH_CAPABILITIES. When
106+
a guest sees this bit set, it should not enumerate the ITS bug. Note, this bit
107+
is not set by any hardware, but is **intended for VMMs to synthesize** it for
108+
guests as per the host's affected status.
109+
110+
Mitigation options
111+
^^^^^^^^^^^^^^^^^^
112+
The ITS mitigation can be controlled using the "indirect_target_selection"
113+
kernel parameter. The available options are:
114+
115+
======== ===================================================================
116+
on (default) Deploy the "Aligned branch/return thunks" mitigation.
117+
If spectre_v2 mitigation enables retpoline, aligned-thunks are only
118+
deployed for the affected RET instructions. Retpoline mitigates
119+
indirect branches.
120+
121+
off Disable ITS mitigation.
122+
123+
vmexit Equivalent to "=on" if the CPU is affected by guest/host isolation
124+
part of ITS. Otherwise, mitigation is not deployed. This option is
125+
useful when host userspace is not in the threat model, and only
126+
attacks from guest to host are considered.
127+
128+
stuff Deploy RSB-fill mitigation when retpoline is also deployed.
129+
Otherwise, deploy the default mitigation. When retpoline mitigation
130+
is enabled, RSB-stuffing via Call-Depth-Tracking also mitigates
131+
ITS.
132+
133+
force Force the ITS bug and deploy the default mitigation.
134+
======== ===================================================================
135+
136+
Sysfs reporting
137+
---------------
138+
139+
The sysfs file showing ITS mitigation status is:
140+
141+
/sys/devices/system/cpu/vulnerabilities/indirect_target_selection
142+
143+
Note, microcode mitigation status is not reported in this file.
144+
145+
The possible values in this file are:
146+
147+
.. list-table::
148+
149+
* - Not affected
150+
- The processor is not vulnerable.
151+
* - Vulnerable
152+
- System is vulnerable and no mitigation has been applied.
153+
* - Vulnerable, KVM: Not affected
154+
- System is vulnerable to intra-mode BTI, but not affected by eIBRS
155+
guest/host isolation.
156+
* - Mitigation: Aligned branch/return thunks
157+
- The mitigation is enabled, affected indirect branches and RETs are
158+
relocated to safe thunks.
159+
* - Mitigation: Retpolines, Stuffing RSB
160+
- The mitigation is enabled using retpoline and RSB stuffing.
161+
162+
References
163+
----------
164+
.. [#f1] Microcode repository - https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files
165+
166+
.. [#f2] Affected Processors list - https://www.intel.com/content/www/us/en/developer/topic-technology/software-security-guidance/processors-affected-consolidated-product-cpu-model.html
167+
168+
.. [#f3] Affected Processors list (machine readable) - https://github.com/intel/Intel-affected-processor-list

Documentation/admin-guide/hw-vuln/reg-file-data-sampling.rst

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,6 @@ Below is the list of affected Intel processors [#f1]_:
2929
RAPTORLAKE_S 06_BFH
3030
=================== ============
3131

32-
As an exception to this table, Intel Xeon E family parts ALDERLAKE(06_97H) and
33-
RAPTORLAKE(06_B7H) codenamed Catlow are not affected. They are reported as
34-
vulnerable in Linux because they share the same family/model with an affected
35-
part. Unlike their affected counterparts, they do not enumerate RFDS_CLEAR or
36-
CPUID.HYBRID. This information could be used to distinguish between the
37-
affected and unaffected parts, but it is deemed not worth adding complexity as
38-
the reporting is fixed automatically when these parts enumerate RFDS_NO.
39-
4032
Mitigation
4133
==========
4234
Intel released a microcode update that enables software to clear sensitive

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2060,6 +2060,23 @@
20602060
different crypto accelerators. This option can be used
20612061
to achieve best performance for particular HW.
20622062

2063+
indirect_target_selection= [X86,Intel] Mitigation control for Indirect
2064+
Target Selection(ITS) bug in Intel CPUs. Updated
2065+
microcode is also required for a fix in IBPB.
2066+
2067+
on: Enable mitigation (default).
2068+
off: Disable mitigation.
2069+
force: Force the ITS bug and deploy default
2070+
mitigation.
2071+
vmexit: Only deploy mitigation if CPU is affected by
2072+
guest/host isolation part of ITS.
2073+
stuff: Deploy RSB-fill mitigation when retpoline is
2074+
also deployed. Otherwise, deploy the default
2075+
mitigation.
2076+
2077+
For details see:
2078+
Documentation/admin-guide/hw-vuln/indirect-target-selection.rst
2079+
20632080
init= [KNL]
20642081
Format: <full_path>
20652082
Run specified binary instead of /sbin/init as init
@@ -3389,6 +3406,7 @@
33893406
expose users to several CPU vulnerabilities.
33903407
Equivalent to: if nokaslr then kpti=0 [ARM64]
33913408
gather_data_sampling=off [X86]
3409+
indirect_target_selection=off [X86]
33923410
kvm.nx_huge_pages=off [X86]
33933411
l1tf=off [X86]
33943412
mds=off [X86]

Makefile.rhelver

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RHEL_MINOR = 6
1212
#
1313
# Use this spot to avoid future merge conflicts.
1414
# Do not trim this comment.
15-
RHEL_RELEASE = 570.33.2
15+
RHEL_RELEASE = 570.37.1
1616

1717
#
1818
# ZSTREAM

arch/arm64/include/asm/insn.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,7 @@ u32 aarch64_insn_gen_cas(enum aarch64_insn_register result,
686686
}
687687
#endif
688688
u32 aarch64_insn_gen_dmb(enum aarch64_insn_mb_type type);
689+
u32 aarch64_insn_gen_dsb(enum aarch64_insn_mb_type type);
689690

690691
s32 aarch64_get_branch_offset(u32 insn);
691692
u32 aarch64_set_branch_offset(u32 insn, s32 offset);

arch/arm64/lib/insn.c

Lines changed: 37 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*
66
* Copyright (C) 2014-2016 Zi Shen Lim <zlim.lnx@gmail.com>
77
*/
8+
#include <linux/bitfield.h>
89
#include <linux/bitops.h>
910
#include <linux/bug.h>
1011
#include <linux/printk.h>
@@ -1471,47 +1472,60 @@ u32 aarch64_insn_gen_extr(enum aarch64_insn_variant variant,
14711472
return aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RM, insn, Rm);
14721473
}
14731474

1474-
u32 aarch64_insn_gen_dmb(enum aarch64_insn_mb_type type)
1475+
static u32 __get_barrier_crm_val(enum aarch64_insn_mb_type type)
14751476
{
1476-
u32 opt;
1477-
u32 insn;
1478-
14791477
switch (type) {
14801478
case AARCH64_INSN_MB_SY:
1481-
opt = 0xf;
1482-
break;
1479+
return 0xf;
14831480
case AARCH64_INSN_MB_ST:
1484-
opt = 0xe;
1485-
break;
1481+
return 0xe;
14861482
case AARCH64_INSN_MB_LD:
1487-
opt = 0xd;
1488-
break;
1483+
return 0xd;
14891484
case AARCH64_INSN_MB_ISH:
1490-
opt = 0xb;
1491-
break;
1485+
return 0xb;
14921486
case AARCH64_INSN_MB_ISHST:
1493-
opt = 0xa;
1494-
break;
1487+
return 0xa;
14951488
case AARCH64_INSN_MB_ISHLD:
1496-
opt = 0x9;
1497-
break;
1489+
return 0x9;
14981490
case AARCH64_INSN_MB_NSH:
1499-
opt = 0x7;
1500-
break;
1491+
return 0x7;
15011492
case AARCH64_INSN_MB_NSHST:
1502-
opt = 0x6;
1503-
break;
1493+
return 0x6;
15041494
case AARCH64_INSN_MB_NSHLD:
1505-
opt = 0x5;
1506-
break;
1495+
return 0x5;
15071496
default:
1508-
pr_err("%s: unknown dmb type %d\n", __func__, type);
1497+
pr_err("%s: unknown barrier type %d\n", __func__, type);
15091498
return AARCH64_BREAK_FAULT;
15101499
}
1500+
}
1501+
1502+
u32 aarch64_insn_gen_dmb(enum aarch64_insn_mb_type type)
1503+
{
1504+
u32 opt;
1505+
u32 insn;
1506+
1507+
opt = __get_barrier_crm_val(type);
1508+
if (opt == AARCH64_BREAK_FAULT)
1509+
return AARCH64_BREAK_FAULT;
15111510

15121511
insn = aarch64_insn_get_dmb_value();
15131512
insn &= ~GENMASK(11, 8);
15141513
insn |= (opt << 8);
15151514

15161515
return insn;
15171516
}
1517+
1518+
u32 aarch64_insn_gen_dsb(enum aarch64_insn_mb_type type)
1519+
{
1520+
u32 opt, insn;
1521+
1522+
opt = __get_barrier_crm_val(type);
1523+
if (opt == AARCH64_BREAK_FAULT)
1524+
return AARCH64_BREAK_FAULT;
1525+
1526+
insn = aarch64_insn_get_dsb_base_value();
1527+
insn &= ~GENMASK(11, 8);
1528+
insn |= (opt << 8);
1529+
1530+
return insn;
1531+
}

arch/x86/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2628,6 +2628,17 @@ config MITIGATION_SPECTRE_BHI
26282628
indirect branches.
26292629
See <file:Documentation/admin-guide/hw-vuln/spectre.rst>
26302630

2631+
config MITIGATION_ITS
2632+
bool "Enable Indirect Target Selection mitigation"
2633+
depends on CPU_SUP_INTEL && X86_64
2634+
depends on MITIGATION_RETPOLINE && MITIGATION_RETHUNK
2635+
default y
2636+
help
2637+
Enable Indirect Target Selection (ITS) mitigation. ITS is a bug in
2638+
BPU on some Intel CPUs that may allow Spectre V2 style attacks. If
2639+
disabled, mitigation cannot be enabled via cmdline.
2640+
See <file:Documentation/admin-guide/hw-vuln/indirect-target-selection.rst>
2641+
26312642
endif
26322643

26332644
config ARCH_HAS_ADD_PAGES

0 commit comments

Comments
 (0)