Skip to content

Commit c2aaae2

Browse files
committed
Merge tag 'rolling-lts/wsl/5.15.123.1' into linux-msft-wsl-5.15.y
Linux rolling-lts/wsl/5.15.123.1 Signed-off-by: Kelsey Steele <[email protected]>
2 parents 12802bc + 9b37665 commit c2aaae2

File tree

3,356 files changed

+44970
-40171
lines changed

Some content is hidden

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

3,356 files changed

+44970
-40171
lines changed

Documentation/ABI/testing/configfs-usb-gadget-uvc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Date: Dec 2014
5151
KernelVersion: 4.0
5252
Description: Default output terminal descriptors
5353

54-
All attributes read only:
54+
All attributes read only except bSourceID:
5555

5656
============== =============================================
5757
iTerminal index of string descriptor
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
What: /sys/kernel/oops_count
2+
Date: November 2022
3+
KernelVersion: 6.2.0
4+
Contact: Linux Kernel Hardening List <[email protected]>
5+
Description:
6+
Shows how many times the system has Oopsed since last boot.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
What: /sys/kernel/warn_count
2+
Date: November 2022
3+
KernelVersion: 6.2.0
4+
Contact: Linux Kernel Hardening List <[email protected]>
5+
Description:
6+
Shows how many times the system has Warned since last boot.

Documentation/admin-guide/cgroup-v1/memory.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ Brief summary of control files.
8484
memory.swappiness set/show swappiness parameter of vmscan
8585
(See sysctl's vm.swappiness)
8686
memory.move_charge_at_immigrate set/show controls of moving charges
87+
This knob is deprecated and shouldn't be
88+
used.
8789
memory.oom_control set/show oom controls.
8890
memory.numa_stat show the number of memory usage per numa
8991
node
@@ -723,8 +725,15 @@ NOTE2:
723725
It is recommended to set the soft limit always below the hard limit,
724726
otherwise the hard limit will take precedence.
725727

726-
8. Move charges at task migration
727-
=================================
728+
8. Move charges at task migration (DEPRECATED!)
729+
===============================================
730+
731+
THIS IS DEPRECATED!
732+
733+
It's expensive and unreliable! It's better practice to launch workload
734+
tasks directly from inside their target cgroup. Use dedicated workload
735+
cgroups to allow fine-grained policy adjustments without having to
736+
move physical pages between control domains.
728737

729738
Users can move charges associated with a task along with task migration, that
730739
is, uncharge task's pages from the old cgroup and charge them to the new cgroup.

Documentation/admin-guide/device-mapper/dm-init.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,11 @@ Other examples (per target):
123123
0 1638400 verity 1 8:1 8:2 4096 4096 204800 1 sha256
124124
fb1a5a0f00deb908d8b53cb270858975e76cf64105d412ce764225d53b8f3cfd
125125
51934789604d1b92399c52e7cb149d1b3a1b74bbbcb103b2a0aaacbed5c08584
126+
127+
For setups using device-mapper on top of asynchronously probed block
128+
devices (MMC, USB, ..), it may be necessary to tell dm-init to
129+
explicitly wait for them to become available before setting up the
130+
device-mapper tables. This can be done with the "dm-mod.waitfor="
131+
module parameter, which takes a list of devices to wait for::
132+
133+
dm-mod.waitfor=<device1>[,..,<deviceN>]
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
2+
.. SPDX-License-Identifier: GPL-2.0
3+
4+
Cross-Thread Return Address Predictions
5+
=======================================
6+
7+
Certain AMD and Hygon processors are subject to a cross-thread return address
8+
predictions vulnerability. When running in SMT mode and one sibling thread
9+
transitions out of C0 state, the other sibling thread could use return target
10+
predictions from the sibling thread that transitioned out of C0.
11+
12+
The Spectre v2 mitigations protect the Linux kernel, as it fills the return
13+
address prediction entries with safe targets when context switching to the idle
14+
thread. However, KVM does allow a VMM to prevent exiting guest mode when
15+
transitioning out of C0. This could result in a guest-controlled return target
16+
being consumed by the sibling thread.
17+
18+
Affected processors
19+
-------------------
20+
21+
The following CPUs are vulnerable:
22+
23+
- AMD Family 17h processors
24+
- Hygon Family 18h processors
25+
26+
Related CVEs
27+
------------
28+
29+
The following CVE entry is related to this issue:
30+
31+
============== =======================================
32+
CVE-2022-27672 Cross-Thread Return Address Predictions
33+
============== =======================================
34+
35+
Problem
36+
-------
37+
38+
Affected SMT-capable processors support 1T and 2T modes of execution when SMT
39+
is enabled. In 2T mode, both threads in a core are executing code. For the
40+
processor core to enter 1T mode, it is required that one of the threads
41+
requests to transition out of the C0 state. This can be communicated with the
42+
HLT instruction or with an MWAIT instruction that requests non-C0.
43+
When the thread re-enters the C0 state, the processor transitions back
44+
to 2T mode, assuming the other thread is also still in C0 state.
45+
46+
In affected processors, the return address predictor (RAP) is partitioned
47+
depending on the SMT mode. For instance, in 2T mode each thread uses a private
48+
16-entry RAP, but in 1T mode, the active thread uses a 32-entry RAP. Upon
49+
transition between 1T/2T mode, the RAP contents are not modified but the RAP
50+
pointers (which control the next return target to use for predictions) may
51+
change. This behavior may result in return targets from one SMT thread being
52+
used by RET predictions in the sibling thread following a 1T/2T switch. In
53+
particular, a RET instruction executed immediately after a transition to 1T may
54+
use a return target from the thread that just became idle. In theory, this
55+
could lead to information disclosure if the return targets used do not come
56+
from trustworthy code.
57+
58+
Attack scenarios
59+
----------------
60+
61+
An attack can be mounted on affected processors by performing a series of CALL
62+
instructions with targeted return locations and then transitioning out of C0
63+
state.
64+
65+
Mitigation mechanism
66+
--------------------
67+
68+
Before entering idle state, the kernel context switches to the idle thread. The
69+
context switch fills the RAP entries (referred to as the RSB in Linux) with safe
70+
targets by performing a sequence of CALL instructions.
71+
72+
Prevent a guest VM from directly putting the processor into an idle state by
73+
intercepting HLT and MWAIT instructions.
74+
75+
Both mitigations are required to fully address this issue.
76+
77+
Mitigation control on the kernel command line
78+
---------------------------------------------
79+
80+
Use existing Spectre v2 mitigations that will fill the RSB on context switch.
81+
82+
Mitigation control for KVM - module parameter
83+
---------------------------------------------
84+
85+
By default, the KVM hypervisor mitigates this issue by intercepting guest
86+
attempts to transition out of C0. A VMM can use the KVM_CAP_X86_DISABLE_EXITS
87+
capability to override those interceptions, but since this is not common, the
88+
mitigation that covers this path is not enabled by default.
89+
90+
The mitigation for the KVM_CAP_X86_DISABLE_EXITS capability can be turned on
91+
using the boolean module parameter mitigate_smt_rsb, e.g.:
92+
kvm.mitigate_smt_rsb=1

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ are configurable at compile, boot or run time.
1818
core-scheduling.rst
1919
l1d_flush.rst
2020
processor_mmio_stale_data.rst
21+
cross-thread-rsb.rst

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

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,16 @@ Spectre variant 2
479479
On Intel Skylake-era systems the mitigation covers most, but not all,
480480
cases. See :ref:`[3] <spec_ref3>` for more details.
481481

482-
On CPUs with hardware mitigation for Spectre variant 2 (e.g. Enhanced
483-
IBRS on x86), retpoline is automatically disabled at run time.
482+
On CPUs with hardware mitigation for Spectre variant 2 (e.g. IBRS
483+
or enhanced IBRS on x86), retpoline is automatically disabled at run time.
484+
485+
Systems which support enhanced IBRS (eIBRS) enable IBRS protection once at
486+
boot, by setting the IBRS bit, and they're automatically protected against
487+
Spectre v2 variant attacks, including cross-thread branch target injections
488+
on SMT systems (STIBP). In other words, eIBRS enables STIBP too.
489+
490+
Legacy IBRS systems clear the IBRS bit on exit to userspace and
491+
therefore explicitly enable STIBP for that
484492

485493
The retpoline mitigation is turned on by default on vulnerable
486494
CPUs. It can be forced on or off by the administrator
@@ -504,9 +512,12 @@ Spectre variant 2
504512
For Spectre variant 2 mitigation, individual user programs
505513
can be compiled with return trampolines for indirect branches.
506514
This protects them from consuming poisoned entries in the branch
507-
target buffer left by malicious software. Alternatively, the
508-
programs can disable their indirect branch speculation via prctl()
509-
(See :ref:`Documentation/userspace-api/spec_ctrl.rst <set_spec_ctrl>`).
515+
target buffer left by malicious software.
516+
517+
On legacy IBRS systems, at return to userspace, implicit STIBP is disabled
518+
because the kernel clears the IBRS bit. In this case, the userspace programs
519+
can disable indirect branch speculation via prctl() (See
520+
:ref:`Documentation/userspace-api/spec_ctrl.rst <set_spec_ctrl>`).
510521
On x86, this will turn on STIBP to guard against attacks from the
511522
sibling thread when the user program is running, and use IBPB to
512523
flush the branch target buffer when switching to/from the program.

Documentation/admin-guide/kdump/gdbmacros.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,10 @@ define dmesg
312312
set var $prev_flags = $info->flags
313313
end
314314

315-
set var $id = ($id + 1) & $id_mask
316315
if ($id == $end_id)
317316
loop_break
318317
end
318+
set var $id = ($id + 1) & $id_mask
319319
end
320320
end
321321
document dmesg

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 42 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -916,10 +916,6 @@
916916

917917
debugpat [X86] Enable PAT debugging
918918

919-
decnet.addr= [HW,NET]
920-
Format: <area>[,<node>]
921-
See also Documentation/networking/decnet.rst.
922-
923919
default_hugepagesz=
924920
[HW] The size of the default HugeTLB page. This is
925921
the size represented by the legacy /proc/ hugepages
@@ -2200,24 +2196,57 @@
22002196

22012197
ivrs_ioapic [HW,X86-64]
22022198
Provide an override to the IOAPIC-ID<->DEVICE-ID
2203-
mapping provided in the IVRS ACPI table. For
2204-
example, to map IOAPIC-ID decimal 10 to
2205-
PCI device 00:14.0 write the parameter as:
2199+
mapping provided in the IVRS ACPI table.
2200+
By default, PCI segment is 0, and can be omitted.
2201+
2202+
For example, to map IOAPIC-ID decimal 10 to
2203+
PCI segment 0x1 and PCI device 00:14.0,
2204+
write the parameter as:
2205+
ivrs_ioapic=10@0001:00:14.0
2206+
2207+
Deprecated formats:
2208+
* To map IOAPIC-ID decimal 10 to PCI device 00:14.0
2209+
write the parameter as:
22062210
ivrs_ioapic[10]=00:14.0
2211+
* To map IOAPIC-ID decimal 10 to PCI segment 0x1 and
2212+
PCI device 00:14.0 write the parameter as:
2213+
ivrs_ioapic[10]=0001:00:14.0
22072214

22082215
ivrs_hpet [HW,X86-64]
22092216
Provide an override to the HPET-ID<->DEVICE-ID
2210-
mapping provided in the IVRS ACPI table. For
2211-
example, to map HPET-ID decimal 0 to
2212-
PCI device 00:14.0 write the parameter as:
2217+
mapping provided in the IVRS ACPI table.
2218+
By default, PCI segment is 0, and can be omitted.
2219+
2220+
For example, to map HPET-ID decimal 10 to
2221+
PCI segment 0x1 and PCI device 00:14.0,
2222+
write the parameter as:
2223+
ivrs_hpet=10@0001:00:14.0
2224+
2225+
Deprecated formats:
2226+
* To map HPET-ID decimal 0 to PCI device 00:14.0
2227+
write the parameter as:
22132228
ivrs_hpet[0]=00:14.0
2229+
* To map HPET-ID decimal 10 to PCI segment 0x1 and
2230+
PCI device 00:14.0 write the parameter as:
2231+
ivrs_ioapic[10]=0001:00:14.0
22142232

22152233
ivrs_acpihid [HW,X86-64]
22162234
Provide an override to the ACPI-HID:UID<->DEVICE-ID
2217-
mapping provided in the IVRS ACPI table. For
2218-
example, to map UART-HID:UID AMD0020:0 to
2219-
PCI device 00:14.5 write the parameter as:
2235+
mapping provided in the IVRS ACPI table.
2236+
By default, PCI segment is 0, and can be omitted.
2237+
2238+
For example, to map UART-HID:UID AMD0020:0 to
2239+
PCI segment 0x1 and PCI device ID 00:14.5,
2240+
write the parameter as:
2241+
ivrs_acpihid=AMD0020:0@0001:00:14.5
2242+
2243+
Deprecated formats:
2244+
* To map UART-HID:UID AMD0020:0 to PCI segment is 0,
2245+
PCI device ID 00:14.5, write the parameter as:
22202246
ivrs_acpihid[00:14.5]=AMD0020:0
2247+
* To map UART-HID:UID AMD0020:0 to PCI segment 0x1 and
2248+
PCI device ID 00:14.5, write the parameter as:
2249+
ivrs_acpihid[0001:00:14.5]=AMD0020:0
22212250

22222251
js= [HW,JOY] Analog joystick
22232252
See Documentation/input/joydev/joystick.rst.

0 commit comments

Comments
 (0)