Skip to content

Commit dbe6dc7

Browse files
committed
Merge remote-tracking branch 'stable/linux-6.12.y' into rpi-6.12.y
2 parents 51dde1b + f6cf124 commit dbe6dc7

File tree

199 files changed

+2171
-1025
lines changed

Some content is hidden

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

199 files changed

+2171
-1025
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ What: /sys/devices/system/cpu/vulnerabilities
525525
/sys/devices/system/cpu/vulnerabilities/srbds
526526
/sys/devices/system/cpu/vulnerabilities/tsa
527527
/sys/devices/system/cpu/vulnerabilities/tsx_async_abort
528+
/sys/devices/system/cpu/vulnerabilities/vmscape
528529
Date: January 2018
529530
Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
530531
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
@@ -23,3 +23,4 @@ are configurable at compile, boot or run time.
2323
gather_data_sampling
2424
reg-file-data-sampling
2525
indirect-target-selection
26+
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
@@ -3548,6 +3548,7 @@
35483548
srbds=off [X86,INTEL]
35493549
ssbd=force-off [ARM64]
35503550
tsx_async_abort=off [X86]
3551+
vmscape=off [X86]
35513552

35523553
Exceptions:
35533554
This does not have any effect on
@@ -7425,6 +7426,16 @@
74257426
vmpoff= [KNL,S390] Perform z/VM CP command after power off.
74267427
Format: <command>
74277428

7429+
vmscape= [X86] Controls mitigation for VMscape attacks.
7430+
VMscape attacks can leak information from a userspace
7431+
hypervisor to a guest via speculative side-channels.
7432+
7433+
off - disable the mitigation
7434+
ibpb - use Indirect Branch Prediction Barrier
7435+
(IBPB) mitigation (default)
7436+
force - force vulnerability detection even on
7437+
unaffected processors
7438+
74287439
vsyscall= [X86-64,EARLY]
74297440
Controls the behavior of vsyscalls (i.e. calls to
74307441
fixed addresses of 0xffffffffff600x00 from legacy

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 6
33
PATCHLEVEL = 12
4-
SUBLEVEL = 45
4+
SUBLEVEL = 47
55
EXTRAVERSION =
66
NAME = Baby Opossum Posse
77

arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc.dts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,7 @@
555555
pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
556556
cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
557557
vmmc-supply = <&reg_usdhc2_vmmc>;
558+
vqmmc-supply = <&ldo5>;
558559
bus-width = <4>;
559560
status = "okay";
560561
};

arch/arm64/boot/dts/freescale/imx8mp-dhcom-som.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,7 @@
609609
pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
610610
cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
611611
vmmc-supply = <&reg_usdhc2_vmmc>;
612+
vqmmc-supply = <&ldo5>;
612613
bus-width = <4>;
613614
status = "okay";
614615
};

arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mp-ras314.dts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,10 @@
467467
status = "okay";
468468
};
469469

470+
&reg_usdhc2_vqmmc {
471+
status = "okay";
472+
};
473+
470474
&sai5 {
471475
pinctrl-names = "default";
472476
pinctrl-0 = <&pinctrl_sai5>;
@@ -876,8 +880,7 @@
876880
<MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d2>,
877881
<MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d2>,
878882
<MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d2>,
879-
<MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d2>,
880-
<MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT 0xc0>;
883+
<MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d2>;
881884
};
882885

883886
pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
@@ -886,8 +889,7 @@
886889
<MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d4>,
887890
<MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d4>,
888891
<MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d4>,
889-
<MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d4>,
890-
<MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT 0xc0>;
892+
<MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d4>;
891893
};
892894

893895
pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
@@ -896,8 +898,7 @@
896898
<MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d4>,
897899
<MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d4>,
898900
<MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d4>,
899-
<MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d4>,
900-
<MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT 0xc0>;
901+
<MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d4>;
901902
};
902903

903904
pinctrl_usdhc2_gpio: usdhc2-gpiogrp {

arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,10 @@
603603
status = "okay";
604604
};
605605

606+
&reg_usdhc2_vqmmc {
607+
status = "okay";
608+
};
609+
606610
&sai3 {
607611
pinctrl-names = "default";
608612
pinctrl-0 = <&pinctrl_sai3>;
@@ -982,8 +986,7 @@
982986
<MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d2>,
983987
<MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d2>,
984988
<MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d2>,
985-
<MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d2>,
986-
<MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT 0xc0>;
989+
<MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d2>;
987990
};
988991

989992
pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
@@ -992,8 +995,7 @@
992995
<MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d4>,
993996
<MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d4>,
994997
<MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d4>,
995-
<MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d4>,
996-
<MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT 0xc0>;
998+
<MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d4>;
997999
};
9981000

9991001
pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
@@ -1002,8 +1004,7 @@
10021004
<MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d4>,
10031005
<MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d4>,
10041006
<MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d4>,
1005-
<MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d4>,
1006-
<MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT 0xc0>;
1007+
<MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d4>;
10071008
};
10081009

10091010
pinctrl_usdhc2_gpio: usdhc2-gpiogrp {

arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql.dtsi

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,20 @@
2424
regulator-max-microvolt = <3300000>;
2525
regulator-always-on;
2626
};
27+
28+
reg_usdhc2_vqmmc: regulator-usdhc2-vqmmc {
29+
compatible = "regulator-gpio";
30+
pinctrl-names = "default";
31+
pinctrl-0 = <&pinctrl_reg_usdhc2_vqmmc>;
32+
regulator-name = "V_SD2";
33+
regulator-min-microvolt = <1800000>;
34+
regulator-max-microvolt = <3300000>;
35+
gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
36+
states = <1800000 0x1>,
37+
<3300000 0x0>;
38+
vin-supply = <&ldo5_reg>;
39+
status = "disabled";
40+
};
2741
};
2842

2943
&A53_0 {
@@ -179,6 +193,10 @@
179193
};
180194
};
181195

196+
&usdhc2 {
197+
vqmmc-supply = <&reg_usdhc2_vqmmc>;
198+
};
199+
182200
&usdhc3 {
183201
pinctrl-names = "default", "state_100mhz", "state_200mhz";
184202
pinctrl-0 = <&pinctrl_usdhc3>;
@@ -228,6 +246,10 @@
228246
fsl,pins = <MX8MP_IOMUXC_SD2_RESET_B__GPIO2_IO19 0x10>;
229247
};
230248

249+
pinctrl_reg_usdhc2_vqmmc: regusdhc2vqmmcgrp {
250+
fsl,pins = <MX8MP_IOMUXC_GPIO1_IO04__GPIO1_IO04 0xc0>;
251+
};
252+
231253
pinctrl_usdhc3: usdhc3grp {
232254
fsl,pins = <MX8MP_IOMUXC_NAND_WE_B__USDHC3_CLK 0x194>,
233255
<MX8MP_IOMUXC_NAND_WP_B__USDHC3_CMD 0x1d4>,

0 commit comments

Comments
 (0)