Skip to content

Commit d6bebad

Browse files
committed
Rebuild rocky8_10 with kernel-4.18.0-553.83.1.el8_10
Rebuild_History BUILDABLE Rebuilding Kernel from rpm changelog with Fuzz Limit: 87.50% Number of commits in upstream range v4.18~1..kernel-mainline: 567757 Number of commits in rpm: 27 Number of commits matched with upstream: 19 (70.37%) Number of commits in upstream but not in rpm: 567738 Number of commits NOT found in upstream: 8 (29.63%) Rebuilding Kernel on Branch rocky8_10_rebuild_kernel-4.18.0-553.83.1.el8_10 for kernel-4.18.0-553.83.1.el8_10 Clean Cherry Picks: 8 (42.11%) Empty Cherry Picks: 11 (57.89%) _______________________________ Full Details Located here: ciq/ciq_backports/kernel-4.18.0-553.83.1.el8_10/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 3c89a41 commit d6bebad

File tree

29 files changed

+599
-100
lines changed

29 files changed

+599
-100
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,7 @@ What: /sys/devices/system/cpu/vulnerabilities
499499
/sys/devices/system/cpu/vulnerabilities/spectre_v2
500500
/sys/devices/system/cpu/vulnerabilities/srbds
501501
/sys/devices/system/cpu/vulnerabilities/tsx_async_abort
502+
/sys/devices/system/cpu/vulnerabilities/vmscape
502503
Date: January 2018
503504
Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
504505
Description: Information about CPU vulnerabilities

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ are configurable at compile, boot or run time.
1919
srso
2020
gather_data_sampling
2121
reg-file-data-sampling
22+
vmscape
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
VMSCAPE
4+
=======
5+
6+
VMSCAPE is a vulnerability that may allow a guest to influence the branch
7+
prediction in host userspace. It particularly affects hypervisors like QEMU.
8+
9+
Even if a hypervisor may not have any sensitive data like disk encryption keys,
10+
guest-userspace may be able to attack the guest-kernel using the hypervisor as
11+
a confused deputy.
12+
13+
Affected processors
14+
-------------------
15+
16+
The following CPU families are affected by VMSCAPE:
17+
18+
**Intel processors:**
19+
- Skylake generation (Parts without Enhanced-IBRS)
20+
- Cascade Lake generation - (Parts affected by ITS guest/host separation)
21+
- Alder Lake and newer (Parts affected by BHI)
22+
23+
Note that, BHI affected parts that use BHB clearing software mitigation e.g.
24+
Icelake are not vulnerable to VMSCAPE.
25+
26+
**AMD processors:**
27+
- Zen series (families 0x17, 0x19, 0x1a)
28+
29+
** Hygon processors:**
30+
- Family 0x18
31+
32+
Mitigation
33+
----------
34+
35+
Conditional IBPB
36+
----------------
37+
38+
Kernel tracks when a CPU has run a potentially malicious guest and issues an
39+
IBPB before the first exit to userspace after VM-exit. If userspace did not run
40+
between VM-exit and the next VM-entry, no IBPB is issued.
41+
42+
Note that the existing userspace mitigation against Spectre-v2 is effective in
43+
protecting the userspace. They are insufficient to protect the userspace VMMs
44+
from a malicious guest. This is because Spectre-v2 mitigations are applied at
45+
context switch time, while the userspace VMM can run after a VM-exit without a
46+
context switch.
47+
48+
Vulnerability enumeration and mitigation is not applied inside a guest. This is
49+
because nested hypervisors should already be deploying IBPB to isolate
50+
themselves from nested guests.
51+
52+
SMT considerations
53+
------------------
54+
55+
When Simultaneous Multi-Threading (SMT) is enabled, hypervisors can be
56+
vulnerable to cross-thread attacks. For complete protection against VMSCAPE
57+
attacks in SMT environments, STIBP should be enabled.
58+
59+
The kernel will issue a warning if SMT is enabled without adequate STIBP
60+
protection. Warning is not issued when:
61+
62+
- SMT is disabled
63+
- STIBP is enabled system-wide
64+
- Intel eIBRS is enabled (which implies STIBP protection)
65+
66+
System information and options
67+
------------------------------
68+
69+
The sysfs file showing VMSCAPE mitigation status is:
70+
71+
/sys/devices/system/cpu/vulnerabilities/vmscape
72+
73+
The possible values in this file are:
74+
75+
* 'Not affected':
76+
77+
The processor is not vulnerable to VMSCAPE attacks.
78+
79+
* 'Vulnerable':
80+
81+
The processor is vulnerable and no mitigation has been applied.
82+
83+
* 'Mitigation: IBPB before exit to userspace':
84+
85+
Conditional IBPB mitigation is enabled. The kernel tracks when a CPU has
86+
run a potentially malicious guest and issues an IBPB before the first
87+
exit to userspace after VM-exit.
88+
89+
* 'Mitigation: IBPB on VMEXIT':
90+
91+
IBPB is issued on every VM-exit. This occurs when other mitigations like
92+
RETBLEED or SRSO are already issuing IBPB on VM-exit.
93+
94+
Mitigation control on the kernel command line
95+
----------------------------------------------
96+
97+
The mitigation can be controlled via the ``vmscape=`` command line parameter:
98+
99+
* ``vmscape=off``:
100+
101+
Disable the VMSCAPE mitigation.
102+
103+
* ``vmscape=ibpb``:
104+
105+
Enable conditional IBPB mitigation (default when CONFIG_MITIGATION_VMSCAPE=y).
106+
107+
* ``vmscape=force``:
108+
109+
Force vulnerability detection and mitigation even on processors that are
110+
not known to be affected.

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2874,6 +2874,7 @@
28742874
srbds=off [X86,INTEL]
28752875
ssbd=force-off [ARM64]
28762876
tsx_async_abort=off [X86]
2877+
vmscape=off [X86]
28772878

28782879
Exceptions:
28792880
This does not have any effect on
@@ -6019,6 +6020,16 @@
60196020
vmpoff= [KNL,S390] Perform z/VM CP command after power off.
60206021
Format: <command>
60216022

6023+
vmscape= [X86] Controls mitigation for VMscape attacks.
6024+
VMscape attacks can leak information from a userspace
6025+
hypervisor to a guest via speculative side-channels.
6026+
6027+
off - disable the mitigation
6028+
ibpb - use Indirect Branch Prediction Barrier
6029+
(IBPB) mitigation (default)
6030+
force - force vulnerability detection even on
6031+
unaffected processors
6032+
60226033
vsyscall= [X86-64]
60236034
Controls the behavior of vsyscalls (i.e. calls to
60246035
fixed addresses of 0xffffffffff600x00 from legacy

Makefile.rhelver

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

1717
#
1818
# ZSTREAM

arch/s390/pci/pci_mmio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ static inline int __pcilg_mio_inuser(
225225
[ioaddr_len] "+&d" (ioaddr_len.pair),
226226
[cc] "+d" (cc), [val] "=d" (val),
227227
[dst] "+a" (dst), [cnt] "+d" (cnt), [tmp] "=d" (tmp),
228-
[shift] "+d" (shift)
228+
[shift] "+a" (shift)
229229
:: "cc", "memory");
230230

231231
/* did we write everything to the user space buffer? */

arch/x86/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2626,6 +2626,14 @@ config MITIGATION_SPECTRE_BHI
26262626
indirect branches.
26272627
See <file:Documentation/admin-guide/hw-vuln/spectre.rst>
26282628

2629+
config MITIGATION_VMSCAPE
2630+
bool "Mitigate VMSCAPE"
2631+
depends on KVM
2632+
default y
2633+
help
2634+
Enable mitigation for VMSCAPE attacks. VMSCAPE is a hardware security
2635+
vulnerability on Intel and AMD CPUs that may allow a guest to do
2636+
Spectre v2 style attacks on userspace hypervisor.
26292637
endif
26302638

26312639
config ARCH_HAS_ADD_PAGES

arch/x86/entry/common.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,13 @@ __visible inline void prepare_exit_to_usermode(struct pt_regs *regs)
222222
ti->status &= ~(TS_COMPAT|TS_I386_REGS_POKED);
223223
#endif
224224

225+
/* Avoid unnecessary reads of 'x86_ibpb_exit_to_user' */
226+
if (cpu_feature_enabled(X86_FEATURE_IBPB_EXIT_TO_USER) &&
227+
this_cpu_read(x86_ibpb_exit_to_user)) {
228+
indirect_branch_prediction_barrier();
229+
this_cpu_write(x86_ibpb_exit_to_user, false);
230+
}
231+
225232
user_enter_irqoff();
226233

227234
amd_clear_divider();

arch/x86/include/asm/cpufeatures.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@
445445
#define X86_FEATURE_BHI_CTRL (21*32+ 2) /* "" BHI_DIS_S HW control available */
446446
#define X86_FEATURE_CLEAR_BHB_HW (21*32+ 3) /* "" BHI_DIS_S HW control enabled */
447447
#define X86_FEATURE_CLEAR_BHB_LOOP_ON_VMEXIT (21*32+ 4) /* "" Clear branch history at vmexit using SW loop */
448+
#define X86_FEATURE_IBPB_EXIT_TO_USER (21*32+14) /* "" Use IBPB on exit-to-userspace, see VMSCAPE bug */
448449

449450
/* RHEL specific auxillary flags, word 22 */
450451
#define X86_FEATURE_IBRS_EXIT_SET (22*32+ 0) /* "" Set IBRS on kernel exit */
@@ -497,4 +498,5 @@
497498
#define X86_BUG_DIV0 X86_BUG(1*32 + 1) /* AMD DIV0 speculation bug */
498499
#define X86_BUG_RFDS X86_BUG(1*32 + 2) /* CPU is vulnerable to Register File Data Sampling */
499500
#define X86_BUG_BHI X86_BUG(1*32 + 3) /* CPU is affected by Branch History Injection */
501+
#define X86_BUG_VMSCAPE X86_BUG(1*32 +10) /* "vmscape" CPU is affected by VMSCAPE attacks from guests */
500502
#endif /* _ASM_X86_CPUFEATURES_H */

arch/x86/include/asm/nospec-branch.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,8 @@ void alternative_msr_write(unsigned int msr, u64 val, unsigned int feature)
371371

372372
extern u64 x86_pred_cmd;
373373

374+
DECLARE_PER_CPU(bool, x86_ibpb_exit_to_user);
375+
374376
static inline void indirect_branch_prediction_barrier(void)
375377
{
376378
alternative_msr_write(MSR_IA32_PRED_CMD, x86_pred_cmd, X86_FEATURE_USE_IBPB);

0 commit comments

Comments
 (0)