Skip to content

Update 5.4-1.0.0-imx to v5.4.46 from stable #84

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 36 commits into from
Jun 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
449c723
devinet: fix memleak in inetdev_init()
May 30, 2020
1b7693c
l2tp: add sk_family checks to l2tp_validate_socket
edumazet May 29, 2020
5fc8f9a
l2tp: do not use inet_hash()/inet_unhash()
edumazet May 29, 2020
fb915f0
net/mlx5: Fix crash upon suspend/resume
mark-bloch May 20, 2020
de8f810
net: stmmac: enable timestamp snapshot for required PTP packets in dw…
fugangduan May 25, 2020
87adb76
net: usb: qmi_wwan: add Telit LE910C1-EUX composition
dnlplm May 25, 2020
165508e
NFC: st21nfca: add missed kfree_skb() in an error path
WillLester May 28, 2020
646345a
nfp: flower: fix used time of merge flow statistics
heinrich-kuhn May 27, 2020
a022033
vsock: fix timeout in vsock_accept()
stefano-garzarella May 27, 2020
a93417d
net: check untrusted gso_size at kernel entry
wdebruij May 25, 2020
b3ebd98
net: be more gentle about silly gso requests coming from user
edumazet May 28, 2020
f366d3a
USB: serial: qcserial: add DW5816e QDL support
Kangie May 21, 2020
5555c8f
USB: serial: usb_wwan: do not resubmit rx urb on fatal errors
liubiin May 13, 2020
9060d48
USB: serial: option: add Telit LE910C1-EUX compositions
dnlplm May 25, 2020
0fac736
USB: serial: ch341: add basis for quirk detection
hansmi Mar 31, 2020
940530f
iio:chemical:sps30: Fix timestamp alignment
jic23 May 17, 2020
9b0e734
iio: vcnl4000: Fix i2c swapped word reading.
mothacehe May 3, 2020
e98b054
iio:chemical:pms7003: Fix timestamp alignment and prevent data leak.
jic23 May 17, 2020
8d130bf
iio: adc: stm32-adc: fix a wrong error message when probing interrupts
May 12, 2020
e8f57f5
usb: musb: start session in resume for host port
liubiin May 25, 2020
2d0c87d
usb: musb: Fix runtime PM imbalance on error
dinghaoliu May 25, 2020
9619c2f
vt: keyboard: avoid signed integer overflow in k_ascii
dtor May 25, 2020
784ac0e
tty: hvc_console, fix crashes on parallel open/close
May 26, 2020
4992c76
staging: rtl8712: Fix IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK
pterjan May 23, 2020
b3e3f4c
CDC-ACM: heed quirk also in error handling
oneukum May 26, 2020
c2baba2
nvmem: qfprom: remove incorrect write support
Srinivas-Kandagatla May 22, 2020
e4e57f7
x86/speculation/spectre_v2: Exclude Zhaoxin CPUs from SPECTRE_V2
Jan 17, 2020
749ec6b
x86/cpu: Add a steppings field to struct x86_cpu_id
Apr 16, 2020
dab0161
x86/cpu: Add 'table' argument to cpu_matches()
Apr 16, 2020
b0f61a0
x86/speculation: Add Special Register Buffer Data Sampling (SRBDS) mi…
Apr 16, 2020
faf187a
x86/speculation: Add SRBDS vulnerability and mitigation documentation
Apr 16, 2020
5904590
x86/speculation: Add Ivy Bridge to affected list
jpoimboe Apr 27, 2020
c06c03b
uprobes: ensure that uprobe->offset and ->ref_ctr_offset are properly…
oleg-nesterov May 4, 2020
9504466
Revert "net/mlx5: Annotate mutex destroy for root ns"
gregkh Jun 9, 2020
5e3c511
Linux 5.4.46
gregkh Jun 10, 2020
c986767
Merge tag 'v5.4.46' into 5.4-1.0.0-imx
zandrey Jun 11, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Documentation/ABI/testing/sysfs-devices-system-cpu
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ What: /sys/devices/system/cpu/vulnerabilities
/sys/devices/system/cpu/vulnerabilities/spec_store_bypass
/sys/devices/system/cpu/vulnerabilities/l1tf
/sys/devices/system/cpu/vulnerabilities/mds
/sys/devices/system/cpu/vulnerabilities/srbds
/sys/devices/system/cpu/vulnerabilities/tsx_async_abort
/sys/devices/system/cpu/vulnerabilities/itlb_multihit
Date: January 2018
Expand Down
1 change: 1 addition & 0 deletions Documentation/admin-guide/hw-vuln/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ are configurable at compile, boot or run time.
mds
tsx_async_abort
multihit.rst
special-register-buffer-data-sampling.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
.. SPDX-License-Identifier: GPL-2.0

SRBDS - Special Register Buffer Data Sampling
=============================================

SRBDS is a hardware vulnerability that allows MDS :doc:`mds` techniques to
infer values returned from special register accesses. Special register
accesses are accesses to off core registers. According to Intel's evaluation,
the special register reads that have a security expectation of privacy are
RDRAND, RDSEED and SGX EGETKEY.

When RDRAND, RDSEED and EGETKEY instructions are used, the data is moved
to the core through the special register mechanism that is susceptible
to MDS attacks.

Affected processors
--------------------
Core models (desktop, mobile, Xeon-E3) that implement RDRAND and/or RDSEED may
be affected.

A processor is affected by SRBDS if its Family_Model and stepping is
in the following list, with the exception of the listed processors
exporting MDS_NO while Intel TSX is available yet not enabled. The
latter class of processors are only affected when Intel TSX is enabled
by software using TSX_CTRL_MSR otherwise they are not affected.

============= ============ ========
common name Family_Model Stepping
============= ============ ========
IvyBridge 06_3AH All

Haswell 06_3CH All
Haswell_L 06_45H All
Haswell_G 06_46H All

Broadwell_G 06_47H All
Broadwell 06_3DH All

Skylake_L 06_4EH All
Skylake 06_5EH All

Kabylake_L 06_8EH <= 0xC
Kabylake 06_9EH <= 0xD
============= ============ ========

Related CVEs
------------

The following CVE entry is related to this SRBDS issue:

============== ===== =====================================
CVE-2020-0543 SRBDS Special Register Buffer Data Sampling
============== ===== =====================================

Attack scenarios
----------------
An unprivileged user can extract values returned from RDRAND and RDSEED
executed on another core or sibling thread using MDS techniques.


Mitigation mechanism
-------------------
Intel will release microcode updates that modify the RDRAND, RDSEED, and
EGETKEY instructions to overwrite secret special register data in the shared
staging buffer before the secret data can be accessed by another logical
processor.

During execution of the RDRAND, RDSEED, or EGETKEY instructions, off-core
accesses from other logical processors will be delayed until the special
register read is complete and the secret data in the shared staging buffer is
overwritten.

This has three effects on performance:

#. RDRAND, RDSEED, or EGETKEY instructions have higher latency.

#. Executing RDRAND at the same time on multiple logical processors will be
serialized, resulting in an overall reduction in the maximum RDRAND
bandwidth.

#. Executing RDRAND, RDSEED or EGETKEY will delay memory accesses from other
logical processors that miss their core caches, with an impact similar to
legacy locked cache-line-split accesses.

The microcode updates provide an opt-out mechanism (RNGDS_MITG_DIS) to disable
the mitigation for RDRAND and RDSEED instructions executed outside of Intel
Software Guard Extensions (Intel SGX) enclaves. On logical processors that
disable the mitigation using this opt-out mechanism, RDRAND and RDSEED do not
take longer to execute and do not impact performance of sibling logical
processors memory accesses. The opt-out mechanism does not affect Intel SGX
enclaves (including execution of RDRAND or RDSEED inside an enclave, as well
as EGETKEY execution).

IA32_MCU_OPT_CTRL MSR Definition
--------------------------------
Along with the mitigation for this issue, Intel added a new thread-scope
IA32_MCU_OPT_CTRL MSR, (address 0x123). The presence of this MSR and
RNGDS_MITG_DIS (bit 0) is enumerated by CPUID.(EAX=07H,ECX=0).EDX[SRBDS_CTRL =
9]==1. This MSR is introduced through the microcode update.

Setting IA32_MCU_OPT_CTRL[0] (RNGDS_MITG_DIS) to 1 for a logical processor
disables the mitigation for RDRAND and RDSEED executed outside of an Intel SGX
enclave on that logical processor. Opting out of the mitigation for a
particular logical processor does not affect the RDRAND and RDSEED mitigations
for other logical processors.

Note that inside of an Intel SGX enclave, the mitigation is applied regardless
of the value of RNGDS_MITG_DS.

Mitigation control on the kernel command line
---------------------------------------------
The kernel command line allows control over the SRBDS mitigation at boot time
with the option "srbds=". The option for this is:

============= =============================================================
off This option disables SRBDS mitigation for RDRAND and RDSEED on
affected platforms.
============= =============================================================

SRBDS System Information
-----------------------
The Linux kernel provides vulnerability status information through sysfs. For
SRBDS this can be accessed by the following sysfs file:
/sys/devices/system/cpu/vulnerabilities/srbds

The possible values contained in this file are:

============================== =============================================
Not affected Processor not vulnerable
Vulnerable Processor vulnerable and mitigation disabled
Vulnerable: No microcode Processor vulnerable and microcode is missing
mitigation
Mitigation: Microcode Processor is vulnerable and mitigation is in
effect.
Mitigation: TSX disabled Processor is only vulnerable when TSX is
enabled while this system was booted with TSX
disabled.
Unknown: Dependent on
hypervisor status Running on virtual guest processor that is
affected but with no way to know if host
processor is mitigated or vulnerable.
============================== =============================================

SRBDS Default mitigation
------------------------
This new microcode serializes processor access during execution of RDRAND,
RDSEED ensures that the shared buffer is overwritten before it is released for
reuse. Use the "srbds=off" kernel command line to disable the mitigation for
RDRAND and RDSEED.
20 changes: 20 additions & 0 deletions Documentation/admin-guide/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4579,6 +4579,26 @@
spia_pedr=
spia_peddr=

srbds= [X86,INTEL]
Control the Special Register Buffer Data Sampling
(SRBDS) mitigation.

Certain CPUs are vulnerable to an MDS-like
exploit which can leak bits from the random
number generator.

By default, this issue is mitigated by
microcode. However, the microcode fix can cause
the RDRAND and RDSEED instructions to become
much slower. Among other effects, this will
result in reduced throughput from /dev/urandom.

The microcode mitigation can be disabled with
the following option:

off: Disable mitigation and remove
performance impact to RDRAND and RDSEED

srcutree.counter_wrap_check [KNL]
Specifies how frequently to check for
grace-period sequence counter wrap for the
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 4
SUBLEVEL = 45
SUBLEVEL = 46
EXTRAVERSION =
NAME = Kleptomaniac Octopus

Expand Down
30 changes: 30 additions & 0 deletions arch/x86/include/asm/cpu_device_id.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,36 @@

#include <linux/mod_devicetable.h>

#define X86_CENTAUR_FAM6_C7_D 0xd
#define X86_CENTAUR_FAM6_NANO 0xf

#define X86_STEPPINGS(mins, maxs) GENMASK(maxs, mins)

/**
* X86_MATCH_VENDOR_FAM_MODEL_STEPPINGS_FEATURE - Base macro for CPU matching
* @_vendor: The vendor name, e.g. INTEL, AMD, HYGON, ..., ANY
* The name is expanded to X86_VENDOR_@_vendor
* @_family: The family number or X86_FAMILY_ANY
* @_model: The model number, model constant or X86_MODEL_ANY
* @_steppings: Bitmask for steppings, stepping constant or X86_STEPPING_ANY
* @_feature: A X86_FEATURE bit or X86_FEATURE_ANY
* @_data: Driver specific data or NULL. The internal storage
* format is unsigned long. The supplied value, pointer
* etc. is casted to unsigned long internally.
*
* Backport version to keep the SRBDS pile consistant. No shorter variants
* required for this.
*/
#define X86_MATCH_VENDOR_FAM_MODEL_STEPPINGS_FEATURE(_vendor, _family, _model, \
_steppings, _feature, _data) { \
.vendor = X86_VENDOR_##_vendor, \
.family = _family, \
.model = _model, \
.steppings = _steppings, \
.feature = _feature, \
.driver_data = (unsigned long) _data \
}

/*
* Match specific microcode revisions.
*
Expand Down
2 changes: 2 additions & 0 deletions arch/x86/include/asm/cpufeatures.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@
#define X86_FEATURE_AVX512_4VNNIW (18*32+ 2) /* AVX-512 Neural Network Instructions */
#define X86_FEATURE_AVX512_4FMAPS (18*32+ 3) /* AVX-512 Multiply Accumulation Single precision */
#define X86_FEATURE_AVX512_VP2INTERSECT (18*32+ 8) /* AVX-512 Intersect for D/Q */
#define X86_FEATURE_SRBDS_CTRL (18*32+ 9) /* "" SRBDS mitigation MSR available */
#define X86_FEATURE_MD_CLEAR (18*32+10) /* VERW clears CPU buffers */
#define X86_FEATURE_TSX_FORCE_ABORT (18*32+13) /* "" TSX_FORCE_ABORT */
#define X86_FEATURE_PCONFIG (18*32+18) /* Intel PCONFIG */
Expand Down Expand Up @@ -401,5 +402,6 @@
#define X86_BUG_SWAPGS X86_BUG(21) /* CPU is affected by speculation through SWAPGS */
#define X86_BUG_TAA X86_BUG(22) /* CPU is affected by TSX Async Abort(TAA) */
#define X86_BUG_ITLB_MULTIHIT X86_BUG(23) /* CPU may incur MCE during certain page attribute changes */
#define X86_BUG_SRBDS X86_BUG(24) /* CPU may leak RNG bits if not mitigated */

#endif /* _ASM_X86_CPUFEATURES_H */
4 changes: 4 additions & 0 deletions arch/x86/include/asm/msr-index.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@
#define TSX_CTRL_RTM_DISABLE BIT(0) /* Disable RTM feature */
#define TSX_CTRL_CPUID_CLEAR BIT(1) /* Disable TSX enumeration */

/* SRBDS support */
#define MSR_IA32_MCU_OPT_CTRL 0x00000123
#define RNGDS_MITG_DIS BIT(0)

#define MSR_IA32_SYSENTER_CS 0x00000174
#define MSR_IA32_SYSENTER_ESP 0x00000175
#define MSR_IA32_SYSENTER_EIP 0x00000176
Expand Down
Loading