5.10.123-rc1 review
Subsystems (3)
Greg Kroah-Hartman
maintainercover 5.10.123-rc1 review
This is the start of the stable review cycle for the 5.10.123 release. There are 11 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 16 Jun 2022 18:37:02 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.123-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 5.10.123-rc1
Josh Poimboeuf <[email protected]>
x86/speculation/mmio: Print SMT warning
Pawan Gupta <[email protected]>
KVM: x86/speculation: Disable Fill buffer clear within guests
Pawan Gupta <[email protected]>
x86/speculation/mmio: Reuse SRBDS mitigation for SBDS
Pawan Gupta <[email protected]>
x86/speculation/srbds: Update SRBDS mitigation selection
Pawan Gupta <[email protected]>
x86/speculation/mmio: Add sysfs reporting for Processor MMIO Stale Data
Pawan Gupta <[email protected]>
x86/speculation/mmio: Enable CPU Fill buffer clearing on idle
Pawan Gupta <[email protected]>
x86/bugs: Group MDS, TAA & Processor MMIO Stale Data mitigations
Pawan Gupta <[email protected]>
x86/speculation/mmio: Add mitigation for Processor MMIO Stale Data
Pawan Gupta <[email protected]>
x86/speculation: Add a common function for MD_CLEAR mitigation update
Pawan Gupta <[email protected]>
x86/speculation/mmio: Enumerate Processor MMIO Stale Data bug
Pawan Gupta <[email protected]>
Documentation: Add documentation for Processor MMIO Stale Data
-------------
Diffstat:
Documentation/ABI/testing/sysfs-devices-system-cpu | 1 + Documentation/admin-guide/hw-vuln/index.rst | 1 + .../hw-vuln/processor_mmio_stale_data.rst | 246 +++++++++++++++++++++ Documentation/admin-guide/kernel-parameters.txt | 36 +++ Makefile | 4 +- arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/msr-index.h | 25 +++ arch/x86/include/asm/nospec-branch.h | 2 + arch/x86/kernel/cpu/bugs.c | 235 +++++++++++++++++--- arch/x86/kernel/cpu/common.c | 52 ++++- arch/x86/kvm/vmx/vmx.c | 72 ++++++ arch/x86/kvm/vmx/vmx.h | 2 + arch/x86/kvm/x86.c | 3 + drivers/base/cpu.c | 8 + include/linux/cpu.h | 3 + tools/arch/x86/include/asm/cpufeatures.h | 1 + tools/arch/x86/include/asm/msr-index.h | 25 +++ 17 files changed, 676 insertions(+), 41 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/11 Documentation: Add documentation for Processor MMIO Stale Data
From: Pawan Gupta <[email protected]>
commit 4419470191386456e0b8ed4eb06a70b0021798a6 upstream
Add the admin guide for Processor MMIO stale data vulnerabilities.
--- Documentation/admin-guide/hw-vuln/index.rst | 1 Documentation/admin-guide/hw-vuln/processor_mmio_stale_data.rst | 246 ++++++++++ 2 files changed, 247 insertions(+) create mode 100644 Documentation/admin-guide/hw-vuln/processor_mmio_stale_data.rst
Documentation/admin-guide/hw-vuln/index.rst +1 -0
@@ -15,3 +15,4 @@ are configurable at compile, boot or run tsx_async_abort multihit.rst special-register-buffer-data-sampling.rst + processor_mmio_stale_data.rst
Documentation/admin-guide/hw-vuln/processor_mmio_stale_data.rst new file +246 -0
246 lines not on this page · raw message
Greg Kroah-Hartman
maintainerPATCH 2/11 x86/speculation/mmio: Enumerate Processor MMIO Stale Data bug
In reply to Greg Kroah-HartmanFrom: Pawan Gupta <[email protected]>
commit 51802186158c74a0304f51ab963e7c2b3a2b046f upstream
Processor MMIO Stale Data is a class of vulnerabilities that may expose data after an MMIO operation. For more details please refer to Documentation/admin-guide/hw-vuln/processor_mmio_stale_data.rst
Add the Processor MMIO Stale Data bug enumeration. A microcode update adds new bits to the MSR IA32_ARCH_CAPABILITIES, define them.
--- arch/x86/include/asm/cpufeatures.h | 1 arch/x86/include/asm/msr-index.h | 19 +++++++++++++ arch/x86/kernel/cpu/common.c | 43 +++++++++++++++++++++++++++++-- tools/arch/x86/include/asm/cpufeatures.h | 1 tools/arch/x86/include/asm/msr-index.h | 19 +++++++++++++ 5 files changed, 81 insertions(+), 2 deletions(-)
arch/x86/include/asm/cpufeatures.h +1 -0
@@ -417,5 +417,6 @@#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 */ +#define X86_BUG_MMIO_STALE_DATA X86_BUG(25)/* CPU is affected by Processor MMIO Stale Data vulnerabilities */ #endif /* _ASM_X86_CPUFEATURES_H */
arch/x86/include/asm/msr-index.h +19 -0
@@ -114,6 +114,25 @@* Not susceptible to * TSX Async Abort (TAA) vulnerabilities. */ +#define ARCH_CAP_SBDR_SSDP_NO BIT(13)/* +* Not susceptible to SBDR and SSDP +* variants of Processor MMIO stale data +* vulnerabilities. +*/ +#define ARCH_CAP_FBSDP_NO BIT(14)/* +* Not susceptible to FBSDP variant of +* Processor MMIO stale data +* vulnerabilities. +*/ +#define ARCH_CAP_PSDP_NO BIT(15)/* +* Not susceptible to PSDP variant of +* Processor MMIO stale data +* vulnerabilities. +*/ +#define ARCH_CAP_FB_CLEAR BIT(17)/* +* VERW clears CPU fill buffer +* even on MDS_NO CPUs. +*/ #define MSR_IA32_FLUSH_CMD 0x0000010b#define L1D_FLUSH BIT(0)/*
arch/x86/kernel/cpu/common.c +41 -2
71 lines not on this page · raw message
tools/arch/x86/include/asm/cpufeatures.h +1 -0
@@ -417,5 +417,6 @@#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 */ +#define X86_BUG_MMIO_STALE_DATA X86_BUG(25)/* CPU is affected by Processor MMIO Stale Data vulnerabilities */ #endif /* _ASM_X86_CPUFEATURES_H */
tools/arch/x86/include/asm/msr-index.h +19 -0
@@ -114,6 +114,25 @@* Not susceptible to * TSX Async Abort (TAA) vulnerabilities. */ +#define ARCH_CAP_SBDR_SSDP_NO BIT(13)/* +* Not susceptible to SBDR and SSDP +* variants of Processor MMIO stale data +* vulnerabilities. +*/ +#define ARCH_CAP_FBSDP_NO BIT(14)/* +* Not susceptible to FBSDP variant of +* Processor MMIO stale data +* vulnerabilities. +*/ +#define ARCH_CAP_PSDP_NO BIT(15)/* +* Not susceptible to PSDP variant of +* Processor MMIO stale data +* vulnerabilities. +*/ +#define ARCH_CAP_FB_CLEAR BIT(17)/* +* VERW clears CPU fill buffer +* even on MDS_NO CPUs. +*/ #define MSR_IA32_FLUSH_CMD 0x0000010b#define L1D_FLUSH BIT(0)/*
Greg Kroah-Hartman
maintainerPATCH 3/11 x86/speculation: Add a common function for MD_CLEAR mitigation update
In reply to Greg Kroah-HartmanFrom: Pawan Gupta <[email protected]>
commit f52ea6c26953fed339aa4eae717ee5c2133c7ff2 upstream
Processor MMIO Stale Data mitigation uses similar mitigation as MDS and TAA. In preparation for adding its mitigation, add a common function to update all mitigations that depend on MD_CLEAR.
[ bp: Add a newline in md_clear_update_mitigation() to separate
statements better. ]
--- arch/x86/kernel/cpu/bugs.c | 59 +++++++++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 26 deletions(-)
arch/x86/kernel/cpu/bugs.c +33 -26
@@ -41,7 +41,7 @@ static void __init spectre_v2_select_mitstatic void __init ssb_select_mitigation (void );static void __init l1tf_select_mitigation (void );static void __init mds_select_mitigation (void ); -static void __init mds_print_mitigation (void ); +static void __init md_clear_update_mitigation (void );static void __init taa_select_mitigation (void );static void __init srbds_select_mitigation (void );
@@ -114,10 +114,10 @@ void __init check_bugs(void)srbds_select_mitigation ();/* -* As MDS and TAA mitigations are inter-related, print MDS -* mitigation until after TAA mitigation selection is done. +* As MDS and TAA mitigations are inter-related, update and print their +* mitigation after TAA mitigation selection is done. */ -mds_print_mitigation (); +md_clear_update_mitigation ();arch_smt_update ();
@@ -258,14 +258,6 @@ static void __init mds_select_mitigation } } -static void __init mds_print_mitigation (void ) -{ -if (!boot_cpu_has_bug (X86_BUG_MDS ) ||cpu_mitigations_off ()) -return ; - -pr_info ("%s\n" , mds_strings[mds_mitigation]); -} -static int __init mds_cmdline (char *str) {if (!boot_cpu_has_bug (X86_BUG_MDS ))
@@ -320,7 +312,7 @@ static void __init taa_select_mitigation/* TSX previously disabled by tsx=off */ if (!boot_cpu_has (X86_FEATURE_RTM )) { taa_mitigation =TAA_MITIGATION_TSX_DISABLED ; - goto out; +return ; }if (cpu_mitigations_off ()) {
@@ -334,7 +326,7 @@ static void __init taa_select_mitigation*/ if (taa_mitigation ==TAA_MITIGATION_OFF && mds_mitigation ==MDS_MITIGATION_OFF ) - goto out; +return ;if (boot_cpu_has (X86_FEATURE_MD_CLEAR )) taa_mitigation =TAA_MITIGATION_VERW ;
@@ -366,18 +358,6 @@ static void __init taa_select_mitigationif (taa_nosmt ||cpu_mitigations_auto_nosmt ())cpu_smt_disable (false); - -/* -* Update MDS mitigation, if necessary, as the mds_user_clear is -* now enabled for TAA mitigation. -*/ -if (mds_mitigation ==MDS_MITIGATION_OFF && -boot_cpu_has_bug (X86_BUG_MDS )) { - mds_mitigation =MDS_MITIGATION_FULL ; -mds_select_mitigation (); - } -out: -pr_info ("%s\n" , taa_strings[taa_mitigation]); }static int __init tsx_async_abort_parse_cmdline (char *str)
@@ -402,6 +382,33 @@ static int __init tsx_async_abort_parse_early_param ("tsx_async_abort" , tsx_async_abort_parse_cmdline);#undef pr_fmt +#define pr_fmt (fmt) "" fmt + +static void __init md_clear_update_mitigation (void ) +{ +if (cpu_mitigations_off ()) +return ; + +if (!static_key_enabled (&mds_user_clear)) + goto out; + +/* +* mds_user_clear is now enabled. Update MDS mitigation, if +* necessary. +*/ +if (mds_mitigation ==MDS_MITIGATION_OFF && +boot_cpu_has_bug (X86_BUG_MDS )) { + mds_mitigation =MDS_MITIGATION_FULL ; +mds_select_mitigation (); + } +out: +if (boot_cpu_has_bug (X86_BUG_MDS )) +pr_info ("MDS: %s\n" , mds_strings[mds_mitigation]); +if (boot_cpu_has_bug (X86_BUG_TAA )) +pr_info ("TAA: %s\n" , taa_strings[taa_mitigation]); +} + +#undef pr_fmt#define pr_fmt (fmt) "SRBDS: " fmtenum srbds_mitigations {
Greg Kroah-Hartman
maintainerPATCH 4/11 x86/speculation/mmio: Add mitigation for Processor MMIO Stale Data
In reply to Greg Kroah-HartmanFrom: Pawan Gupta <[email protected]>
commit 8cb861e9e3c9a55099ad3d08e1a3b653d29c33ca upstream
Processor MMIO Stale Data is a class of vulnerabilities that may expose data after an MMIO operation. For details please refer to Documentation/admin-guide/hw-vuln/processor_mmio_stale_data.rst.
These vulnerabilities are broadly categorized as:
Device Register Partial Write (DRPW):
Some endpoint MMIO registers incorrectly handle writes that are smaller than the register size. Instead of aborting the write or only copying the correct subset of bytes (for example, 2 bytes for a 2-byte write), more bytes than specified by the write transaction may be written to the register. On some processors, this may expose stale data from the fill buffers of the core that created the write transaction.
Shared Buffers Data Sampling (SBDS):
After propagators may have moved data around the uncore and copied stale data into client core fill buffers, processors affected by MFBDS can leak data from the fill buffer.
Shared Buffers Data Read (SBDR):
It is similar to Shared Buffer Data Sampling (SBDS) except that the data is directly read into the architectural software-visible state.
An attacker can use these vulnerabilities to extract data from CPU fill buffers using MDS and TAA methods. Mitigate it by clearing the CPU fill buffers using the VERW instruction before returning to a user or a guest.
On CPUs not affected by MDS and TAA, user application cannot sample data from CPU fill buffers using MDS or TAA. A guest with MMIO access can still use DRPW or SBDR to extract data architecturally. Mitigate it with VERW instruction to clear fill buffers before VMENTER for MMIO capable guests.
Add a kernel parameter mmio_stale_data={off|full|full,nosmt} to control the mitigation.
--- Documentation/admin-guide/kernel-parameters.txt | 36 +++++++ arch/x86/include/asm/nospec-branch.h | 2 arch/x86/kernel/cpu/bugs.c | 111 +++++++++++++++++++++++- arch/x86/kvm/vmx/vmx.c | 3 4 files changed, 148 insertions(+), 4 deletions(-)
Documentation/admin-guide/kernel-parameters.txt +36 -0
@@ -2872,6 +2872,7 @@ kvm.nx_huge_pages=off [X86] no_entry_flush [PPC] no_uaccess_flush [PPC] + mmio_stale_data=off [X86] Exceptions: This does not have any effect on
@@ -2893,6 +2894,7 @@ Equivalent to: l1tf=flush,nosmt [X86] mds=full,nosmt [X86] tsx_async_abort=full,nosmt [X86] + mmio_stale_data=full,nosmt [X86] mminit_loglevel= [KNL] When CONFIG_DEBUG_MEMORY_INIT is set, this
@@ -2902,6 +2904,40 @@ log everything. Information is printed at KERN_DEBUG so loglevel=8 may also need to be specified. + mmio_stale_data= + [X86,INTEL] Control mitigation for the Processor + MMIO Stale Data vulnerabilities. + + Processor MMIO Stale Data is a class of + vulnerabilities that may expose data after an MMIO + operation. Exposed data could originate or end in + the same CPU buffers as affected by MDS and TAA. + Therefore, similar to MDS and TAA, the mitigation + is to clear the affected CPU buffers. + + This parameter controls the mitigation. The + options are: + + full - Enable mitigation on vulnerable CPUs + + full,nosmt - Enable mitigation and disable SMT on + vulnerable CPUs. + + off - Unconditionally disable mitigation + + On MDS or TAA affected machines, + mmio_stale_data=off can be prevented by an active + MDS or TAA mitigation as these vulnerabilities are + mitigated with the same mechanism so in order to + disable this mitigation, you need to specify + mds=off and tsx_async_abort=off too. + + Not specifying this option is equivalent to + mmio_stale_data=full. + + For details see: + Documentation/admin-guide/hw-vuln/processor_mmio_stale_data.rst + module.sig_enforce [KNL] When CONFIG_MODULE_SIG is set, this means that modules without (valid) signatures will fail to load.
arch/x86/include/asm/nospec-branch.h +2 -0
@@ -255,6 +255,8 @@ DECLARE_STATIC_KEY_FALSE(switch_mm_alwayDECLARE_STATIC_KEY_FALSE (mds_user_clear);DECLARE_STATIC_KEY_FALSE (mds_idle_clear); +DECLARE_STATIC_KEY_FALSE (mmio_stale_data_clear); +#include <asm/segment.h> /**
arch/x86/kernel/cpu/bugs.c +107 -4
155 lines not on this page · raw message
arch/x86/kvm/vmx/vmx.c +3 -0
@@ -6654,6 +6654,9 @@ static noinstr void vmx_vcpu_enter_exit(vmx_l1d_flush (vcpu); else if (static_branch_unlikely(&mds_user_clear)) mds_clear_cpu_buffers(); + else if (static_branch_unlikely(&mmio_stale_data_clear) && + kvm_arch_has_assigned_device(vcpu->kvm)) + mds_clear_cpu_buffers();if (vcpu->arch.cr2 !=native_read_cr2 ())native_write_cr2 (vcpu->arch.cr2);
Greg Kroah-Hartman
maintainerPATCH 5/11 x86/bugs: Group MDS, TAA & Processor MMIO Stale Data mitigations
In reply to Greg Kroah-HartmanFrom: Pawan Gupta <[email protected]>
commit e5925fb867290ee924fcf2fe3ca887b792714366 upstream
MDS, TAA and Processor MMIO Stale Data mitigations rely on clearing CPU buffers. Moreover, status of these mitigations affects each other. During boot, it is important to maintain the order in which these mitigations are selected. This is especially true for md_clear_update_mitigation() that needs to be called after MDS, TAA and Processor MMIO Stale Data mitigation selection is done.
Introduce md_clear_select_mitigation(), and select all these mitigations from there. This reflects relationships between these mitigations and ensures proper ordering.
--- arch/x86/kernel/cpu/bugs.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-)
arch/x86/kernel/cpu/bugs.c +16 -10
@@ -42,6 +42,7 @@ static void __init ssb_select_mitigationstatic void __init l1tf_select_mitigation (void );static void __init mds_select_mitigation (void );static void __init md_clear_update_mitigation (void ); +static void __init md_clear_select_mitigation (void );static void __init taa_select_mitigation (void );static void __init mmio_select_mitigation (void );static void __init srbds_select_mitigation (void );
@@ -114,18 +115,9 @@ void __init check_bugs(void)spectre_v2_select_mitigation ();ssb_select_mitigation ();l1tf_select_mitigation (); -mds_select_mitigation (); -taa_select_mitigation (); -mmio_select_mitigation (); +md_clear_select_mitigation ();srbds_select_mitigation (); -/* -* As MDS, TAA and MMIO Stale Data mitigations are inter-related, update -* and print their mitigation after MDS, TAA and MMIO Stale Data -* mitigation selection is done. -*/ -md_clear_update_mitigation (); -arch_smt_update ();#ifdef CONFIG_X86_32
@@ -511,6 +503,20 @@ out:pr_info ("MMIO Stale Data: %s\n" , mmio_strings[mmio_mitigation]); } +static void __init md_clear_select_mitigation (void ) +{ +mds_select_mitigation (); +taa_select_mitigation (); +mmio_select_mitigation (); + +/* +* As MDS, TAA and MMIO Stale Data mitigations are inter-related, update +* and print their mitigation after MDS, TAA and MMIO Stale Data +* mitigation selection is done. +*/ +md_clear_update_mitigation (); +} +#undef pr_fmt#define pr_fmt (fmt) "SRBDS: " fmt
Greg Kroah-Hartman
maintainerPATCH 6/11 x86/speculation/mmio: Enable CPU Fill buffer clearing on idle
In reply to Greg Kroah-HartmanFrom: Pawan Gupta <[email protected]>
commit 99a83db5a605137424e1efe29dc0573d6a5b6316 upstream
When the CPU is affected by Processor MMIO Stale Data vulnerabilities, Fill Buffer Stale Data Propagator (FBSDP) can propagate stale data out of Fill buffer to uncore buffer when CPU goes idle. Stale data can then be exploited with other variants using MMIO operations.
Mitigate it by clearing the Fill buffer before entering idle state.
--- arch/x86/kernel/cpu/bugs.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)
arch/x86/kernel/cpu/bugs.c +14 -2
@@ -425,6 +425,14 @@ static void __init mmio_select_mitigatiostatic_branch_enable (&mmio_stale_data_clear);/* +* If Processor-MMIO-Stale-Data bug is present and Fill Buffer data can +* be propagated to uncore buffers, clearing the Fill buffers on idle +* is required irrespective of SMT state. +*/ +if (!(ia32_cap &ARCH_CAP_FBSDP_NO )) +static_branch_enable (&mds_idle_clear); + +/* * Check if the system has the right microcode. * * CPU Fill buffer clear mitigation is enumerated by either an explicit
@@ -1188,6 +1196,8 @@ static void update_indir_branch_cond(voi/* Update the static key controlling the MDS CPU buffer clear in idle */ static void update_mds_branch_idle (void ) { +u64 ia32_cap =x86_read_arch_cap_msr (); +/* * Enable the idle clearing if SMT is active on CPUs which are * affected only by MSBDS and not any other MDS variant.
@@ -1199,10 +1209,12 @@ static void update_mds_branch_idle(void)if (!boot_cpu_has_bug (X86_BUG_MSBDS_ONLY ))return ; -if (sched_smt_active ()) +if (sched_smt_active ()) {static_branch_enable (&mds_idle_clear); -else + }else if (mmio_mitigation ==MMIO_MITIGATION_OFF || + (ia32_cap &ARCH_CAP_FBSDP_NO )) {static_branch_disable (&mds_idle_clear); + } }#define MDS_MSG_SMT "MDS CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/mds.html for more details.\n"
Greg Kroah-Hartman
maintainerPATCH 7/11 x86/speculation/mmio: Add sysfs reporting for Processor MMIO Stale Data
In reply to Greg Kroah-HartmanFrom: Pawan Gupta <[email protected]>
commit 8d50cdf8b8341770bc6367bce40c0c1bb0e1d5b3 upstream
Add the sysfs reporting file for Processor MMIO Stale Data vulnerability. It exposes the vulnerability and mitigation state similar to the existing files for the other hardware vulnerabilities.
--- Documentation/ABI/testing/sysfs-devices-system-cpu | 1 arch/x86/kernel/cpu/bugs.c | 22 +++++++++++++++++++++ drivers/base/cpu.c | 8 +++++++ include/linux/cpu.h | 3 ++ 4 files changed, 34 insertions(+)
Documentation/ABI/testing/sysfs-devices-system-cpu +1 -0
@@ -510,6 +510,7 @@ What: /sys/devices/system/cpu/vulnerabi /sys/devices/system/cpu/vulnerabilities/srbds /sys/devices/system/cpu/vulnerabilities/tsx_async_abort /sys/devices/system/cpu/vulnerabilities/itlb_multihit + /sys/devices/system/cpu/vulnerabilities/mmio_stale_data Date: January 2018 Contact: Linux kernel mailing list <[email protected]> Description: Information about CPU vulnerabilities
arch/x86/kernel/cpu/bugs.c +22 -0
@@ -1832,6 +1832,20 @@ static ssize_t tsx_async_abort_show_stat sched_smt_active() ? "vulnerable" : "disabled"); } +static ssize_t mmio_stale_data_show_state (char *buf) +{ +if (mmio_mitigation ==MMIO_MITIGATION_OFF ) +return sysfs_emit (buf,"%s\n" , mmio_strings[mmio_mitigation]); + +if (boot_cpu_has (X86_FEATURE_HYPERVISOR )) { +return sysfs_emit (buf,"%s; SMT Host state unknown\n" , + mmio_strings[mmio_mitigation]); + } + +return sysfs_emit (buf,"%s; SMT %s\n" , mmio_strings[mmio_mitigation], +sched_smt_active () ?"vulnerable" :"disabled" ); +} +static char *stibp_state (void ) {if (spectre_v2_in_eibrs_mode (spectre_v2_enabled))
@@ -1932,6 +1946,9 @@ static ssize_t cpu_show_common(struct decase X86_BUG_SRBDS :return srbds_show_state (buf); +case X86_BUG_MMIO_STALE_DATA : +return mmio_stale_data_show_state (buf); +default :break ; }
@@ -1983,4 +2000,9 @@ ssize_t cpu_show_srbds(struct device *de {return cpu_show_common (dev, attr, buf,X86_BUG_SRBDS ); } + +ssize_t cpu_show_mmio_stale_data (struct device *dev,struct device_attribute *attr,char *buf) +{ +return cpu_show_common (dev, attr, buf,X86_BUG_MMIO_STALE_DATA ); +}#endif
drivers/base/cpu.c +8 -0
@@ -566,6 +566,12 @@ ssize_t __weak cpu_show_srbds(struct devreturn sysfs_emit (buf,"Not affected\n" ); } +ssize_t __weak cpu_show_mmio_stale_data (struct device *dev, +struct device_attribute *attr,char *buf) +{ +return sysfs_emit (buf,"Not affected\n" ); +} + static DEVICE_ATTR(meltdown, 0444, cpu_show_meltdown, NULL); static DEVICE_ATTR(spectre_v1, 0444, cpu_show_spectre_v1, NULL); static DEVICE_ATTR(spectre_v2, 0444, cpu_show_spectre_v2, NULL);
@@ -575,6 +581,7 @@ static DEVICE_ATTR(mds, 0444, cpu_show_m static DEVICE_ATTR(tsx_async_abort, 0444, cpu_show_tsx_async_abort, NULL); static DEVICE_ATTR(itlb_multihit, 0444, cpu_show_itlb_multihit, NULL); static DEVICE_ATTR(srbds, 0444, cpu_show_srbds, NULL); +static DEVICE_ATTR(mmio_stale_data, 0444, cpu_show_mmio_stale_data, NULL);static struct attribute *cpu_root_vulnerabilities_attrs[] = { &dev_attr_meltdown.attr,
@@ -586,6 +593,7 @@ static struct attribute *cpu_root_vulner &dev_attr_tsx_async_abort.attr, &dev_attr_itlb_multihit.attr, &dev_attr_srbds.attr, + &dev_attr_mmio_stale_data.attr, NULL };
include/linux/cpu.h +3 -0
@@ -65,6 +65,9 @@ extern ssize_t cpu_show_tsx_async_abort(extern ssize_t cpu_show_itlb_multihit (struct device *dev,struct device_attribute *attr,char *buf);extern ssize_t cpu_show_srbds (struct device *dev,struct device_attribute *attr,char *buf); +extern ssize_t cpu_show_mmio_stale_data (struct device *dev, +struct device_attribute *attr, +char *buf); extern __printf(4, 5) struct device *cpu_device_create(struct device *parent, void *drvdata,
Greg Kroah-Hartman
maintainerPATCH 8/11 x86/speculation/srbds: Update SRBDS mitigation selection
In reply to Greg Kroah-HartmanFrom: Pawan Gupta <[email protected]>
commit 22cac9c677c95f3ac5c9244f8ca0afdc7c8afb19 upstream
Currently, Linux disables SRBDS mitigation on CPUs not affected by MDS and have the TSX feature disabled. On such CPUs, secrets cannot be extracted from CPU fill buffers using MDS or TAA. Without SRBDS mitigation, Processor MMIO Stale Data vulnerabilities can be used to extract RDRAND, RDSEED, and EGETKEY data.
Do not disable SRBDS mitigation by default when CPU is also affected by Processor MMIO Stale Data vulnerabilities.
--- arch/x86/kernel/cpu/bugs.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
arch/x86/kernel/cpu/bugs.c +5 -3
@@ -586,11 +586,13 @@ static void __init srbds_select_mitigatireturn ;/* -* Check to see if this is one of the MDS_NO systems supporting -* TSX that are only exposed to SRBDS when TSX is enabled. +* Check to see if this is one of the MDS_NO systems supporting TSX that +* are only exposed to SRBDS when TSX is enabled or when CPU is affected +* by Processor MMIO Stale Data vulnerability. */ ia32_cap =x86_read_arch_cap_msr (); -if ((ia32_cap &ARCH_CAP_MDS_NO ) && !boot_cpu_has (X86_FEATURE_RTM )) +if ((ia32_cap &ARCH_CAP_MDS_NO ) && !boot_cpu_has (X86_FEATURE_RTM ) && + !boot_cpu_has_bug (X86_BUG_MMIO_STALE_DATA )) srbds_mitigation =SRBDS_MITIGATION_TSX_OFF ;else if (boot_cpu_has (X86_FEATURE_HYPERVISOR )) srbds_mitigation =SRBDS_MITIGATION_HYPERVISOR ;
Greg Kroah-Hartman
maintainerPATCH 9/11 x86/speculation/mmio: Reuse SRBDS mitigation for SBDS
In reply to Greg Kroah-HartmanFrom: Pawan Gupta <[email protected]>
commit a992b8a4682f119ae035a01b40d4d0665c4a2875 upstream
The Shared Buffers Data Sampling (SBDS) variant of Processor MMIO Stale Data vulnerabilities may expose RDRAND, RDSEED and SGX EGETKEY data. Mitigation for this is added by a microcode update.
As some of the implications of SBDS are similar to SRBDS, SRBDS mitigation infrastructure can be leveraged by SBDS. Set X86_BUG_SRBDS and use SRBDS mitigation.
Mitigation is enabled by default; use srbds=off to opt-out. Mitigation status can be checked from below file:
/sys/devices/system/cpu/vulnerabilities/srbds
--- arch/x86/kernel/cpu/common.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)
arch/x86/kernel/cpu/common.c +14 -7
@@ -1100,6 +1100,8 @@ static const __initconst struct x86_cpu_#define SRBDS BIT(0)/* CPU is affected by X86_BUG_MMIO_STALE_DATA */ #define MMIO BIT(1) +/* CPU is affected by Shared Buffers Data Sampling (SBDS), a variant of X86_BUG_MMIO_STALE_DATA */ +#define MMIO_SBDS BIT(2)static const struct x86_cpu_id cpu_vuln_blacklist[]__initconst = {VULNBL_INTEL_STEPPINGS (IVYBRIDGE ,X86_STEPPING_ANY ,SRBDS ),
@@ -1121,16 +1123,17 @@ static const struct x86_cpu_id cpu_vuln_VULNBL_INTEL_STEPPINGS (KABYLAKE_L ,X86_STEPPINGS (0x0 ,0x8 ),SRBDS ),VULNBL_INTEL_STEPPINGS (KABYLAKE ,X86_STEPPINGS (0x9 ,0xD ),SRBDS |MMIO ),VULNBL_INTEL_STEPPINGS (KABYLAKE ,X86_STEPPINGS (0x0 ,0x8 ),SRBDS ), -VULNBL_INTEL_STEPPINGS (ICELAKE_L ,X86_STEPPINGS (0x5 ,0x5 ),MMIO ), +VULNBL_INTEL_STEPPINGS (ICELAKE_L ,X86_STEPPINGS (0x5 ,0x5 ),MMIO |MMIO_SBDS ),VULNBL_INTEL_STEPPINGS (ICELAKE_D ,X86_STEPPINGS (0x1 ,0x1 ),MMIO ),VULNBL_INTEL_STEPPINGS (ICELAKE_X ,X86_STEPPINGS (0x4 ,0x6 ),MMIO ), -VULNBL_INTEL_STEPPINGS (COMETLAKE ,BIT (2 ) |BIT (3 ) |BIT (5 ),MMIO ), -VULNBL_INTEL_STEPPINGS (COMETLAKE_L ,X86_STEPPINGS (0x0 ,0x1 ),MMIO ), -VULNBL_INTEL_STEPPINGS (LAKEFIELD ,X86_STEPPINGS (0x1 ,0x1 ),MMIO ), +VULNBL_INTEL_STEPPINGS (COMETLAKE ,BIT (2 ) |BIT (3 ) |BIT (5 ),MMIO |MMIO_SBDS ), +VULNBL_INTEL_STEPPINGS (COMETLAKE_L ,X86_STEPPINGS (0x1 ,0x1 ),MMIO |MMIO_SBDS ), +VULNBL_INTEL_STEPPINGS (COMETLAKE_L ,X86_STEPPINGS (0x0 ,0x0 ),MMIO ), +VULNBL_INTEL_STEPPINGS (LAKEFIELD ,X86_STEPPINGS (0x1 ,0x1 ),MMIO |MMIO_SBDS ),VULNBL_INTEL_STEPPINGS (ROCKETLAKE ,X86_STEPPINGS (0x1 ,0x1 ),MMIO ), -VULNBL_INTEL_STEPPINGS (ATOM_TREMONT ,X86_STEPPINGS (0x1 ,0x1 ),MMIO ), +VULNBL_INTEL_STEPPINGS (ATOM_TREMONT ,X86_STEPPINGS (0x1 ,0x1 ),MMIO |MMIO_SBDS ),VULNBL_INTEL_STEPPINGS (ATOM_TREMONT_D ,X86_STEPPING_ANY ,MMIO ), - VULNBL_INTEL_STEPPINGS(ATOM_TREMONT_L, X86_STEPPINGS(0x0, 0x0), MMIO), + VULNBL_INTEL_STEPPINGS(ATOM_TREMONT_L, X86_STEPPINGS(0x0, 0x0), MMIO | MMIO_SBDS), {} };
@@ -1211,10 +1214,14 @@ static void __init cpu_set_bug_bits(stru/* * SRBDS affects CPUs which support RDRAND or RDSEED and are listed * in the vulnerability blacklist. +* +* Some of the implications and mitigation of Shared Buffers Data +* Sampling (SBDS) are similar to SRBDS. Give SBDS same treatment as +* SRBDS. */ if ((cpu_has (c,X86_FEATURE_RDRAND ) ||cpu_has (c,X86_FEATURE_RDSEED )) && -cpu_matches (cpu_vuln_blacklist,SRBDS )) +cpu_matches (cpu_vuln_blacklist,SRBDS |MMIO_SBDS ))setup_force_cpu_bug (X86_BUG_SRBDS );/*
Greg Kroah-Hartman
maintainerPATCH 10/11 KVM: x86/speculation: Disable Fill buffer clear within guests
In reply to Greg Kroah-HartmanFrom: Pawan Gupta <[email protected]>
commit 027bbb884be006b05d9c577d6401686053aa789e upstream
The enumeration of MD_CLEAR in CPUID(EAX=7,ECX=0).EDX{bit 10} is not an accurate indicator on all CPUs of whether the VERW instruction will overwrite fill buffers. FB_CLEAR enumeration in IA32_ARCH_CAPABILITIES{bit 17} covers the case of CPUs that are not vulnerable to MDS/TAA, indicating that microcode does overwrite fill buffers.
Guests running in VMM environments may not be aware of all the capabilities/vulnerabilities of the host CPU. Specifically, a guest may apply MDS/TAA mitigations when a virtual CPU is enumerated as vulnerable to MDS/TAA even when the physical CPU is not. On CPUs that enumerate FB_CLEAR_CTRL the VMM may set FB_CLEAR_DIS to skip overwriting of fill buffers by the VERW instruction. This is done by setting FB_CLEAR_DIS during VMENTER and resetting on VMEXIT. For guests that enumerate FB_CLEAR (explicitly asking for fill buffer clear capability) the VMM will not use FB_CLEAR_DIS.
Irrespective of guest state, host overwrites CPU buffers before VMENTER to protect itself from an MMIO capable guest, as part of mitigation for MMIO Stale Data vulnerabilities.
--- arch/x86/include/asm/msr-index.h | 6 ++ arch/x86/kvm/vmx/vmx.c | 69 +++++++++++++++++++++++++++++++++ arch/x86/kvm/vmx/vmx.h | 2 arch/x86/kvm/x86.c | 3 + tools/arch/x86/include/asm/msr-index.h | 6 ++ 5 files changed, 86 insertions(+)
arch/x86/include/asm/msr-index.h +6 -0
@@ -133,6 +133,11 @@* VERW clears CPU fill buffer * even on MDS_NO CPUs. */ +#define ARCH_CAP_FB_CLEAR_CTRL BIT(18)/* +* MSR_IA32_MCU_OPT_CTRL[FB_CLEAR_DIS] +* bit available to control VERW +* behavior. +*/ #define MSR_IA32_FLUSH_CMD 0x0000010b#define L1D_FLUSH BIT(0)/*
@@ -150,6 +155,7 @@/* SRBDS support */ #define MSR_IA32_MCU_OPT_CTRL 0x00000123#define RNGDS_MITG_DIS BIT(0) +#define FB_CLEAR_DIS BIT(3)/* CPU Fill buffer clear disable */ #define MSR_IA32_SYSENTER_CS 0x00000174#define MSR_IA32_SYSENTER_ESP 0x00000175
arch/x86/kvm/vmx/vmx.c +69 -0
111 lines not on this page · raw message
arch/x86/kvm/vmx/vmx.h +2 -0
@@ -300,6 +300,8 @@ struct vcpu_vmx {u64 msr_ia32_feature_control;u64 msr_ia32_feature_control_valid_bits;u64 ept_pointer; +u64 msr_ia32_mcu_opt_ctrl; +bool disable_fb_clear;struct pt_desc pt_desc;
arch/x86/kvm/x86.c +3 -0
@@ -1415,6 +1415,9 @@ static u64 kvm_get_arch_capabilities(voi*/ } +/* Guests don't need to know "Fill buffer clear control" exists */ + data &= ~ARCH_CAP_FB_CLEAR_CTRL ; +return data; }
tools/arch/x86/include/asm/msr-index.h +6 -0
@@ -133,6 +133,11 @@* VERW clears CPU fill buffer * even on MDS_NO CPUs. */ +#define ARCH_CAP_FB_CLEAR_CTRL BIT(18)/* +* MSR_IA32_MCU_OPT_CTRL[FB_CLEAR_DIS] +* bit available to control VERW +* behavior. +*/ #define MSR_IA32_FLUSH_CMD 0x0000010b#define L1D_FLUSH BIT(0)/*
@@ -150,6 +155,7 @@/* SRBDS support */ #define MSR_IA32_MCU_OPT_CTRL 0x00000123#define RNGDS_MITG_DIS BIT(0) +#define FB_CLEAR_DIS BIT(3)/* CPU Fill buffer clear disable */ #define MSR_IA32_SYSENTER_CS 0x00000174#define MSR_IA32_SYSENTER_ESP 0x00000175
Greg Kroah-Hartman
maintainerPATCH 11/11 x86/speculation/mmio: Print SMT warning
In reply to Greg Kroah-HartmanFrom: Josh Poimboeuf <[email protected]>
commit 1dc6ff02c8bf77d71b9b5d11cbc9df77cfb28626 upstream
Similar to MDS and TAA, print a warning if SMT is enabled for the MMIO Stale Data vulnerability.
--- arch/x86/kernel/cpu/bugs.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/x86/kernel/cpu/bugs.c +11 -0
@@ -1221,6 +1221,7 @@ static void update_mds_branch_idle(void)#define MDS_MSG_SMT "MDS CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/mds.html for more details.\n"#define TAA_MSG_SMT "TAA CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/tsx_async_abort.html for more details.\n" +#define MMIO_MSG_SMT "MMIO Stale Data CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/processor_mmio_stale_data.html for more details.\n"void cpu_bugs_smt_update (void ) {
@@ -1265,6 +1266,16 @@ void cpu_bugs_smt_update(void)break ; } +switch (mmio_mitigation) { +case MMIO_MITIGATION_VERW : +case MMIO_MITIGATION_UCODE_NEEDED : +if (sched_smt_active ()) +pr_warn_once (MMIO_MSG_SMT ); +break ; +case MMIO_MITIGATION_OFF : +break ; + } +mutex_unlock (&spec_ctrl_mutex); }
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.123 release. There are 11 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 16 Jun 2022 18:37:02 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.123-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels:
Signature · 1 line
Florian
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.123 release. There are 11 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 16 Jun 2022 18:37:02 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.123-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.123 release. There are 11 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 16 Jun 2022 18:37:02 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.123-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
5.10.123-rc1 Successfully Compiled and booted on my Raspberry PI 4b (8g) (bcm2711)
Hi Greg,
Quoted 7 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.123 release. There are 11 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 16 Jun 2022 18:37:02 +0000. Anything received after that time might be too late.
Build test (gcc version 11.3.1 20220612):
mips: 63 configs -> no failure
arm: 104 configs -> no failure
arm64: 3 configs -> no failurex86_64: 4 configs -> no failure alpha allmodconfig -> no failure powerpc allmodconfig -> no failure riscv allmodconfig -> no failure s390 allmodconfig -> no failure xtensa allmodconfig -> no failure
Boot test:x86_64: Booted on my test laptop. No regression.x86_64: Booted on qemu. No regression. [1]
arm64: Booted on rpi4b (4GB model). No regression. [2]
[1]. https://openqa.qa.codethink.co.uk/tests/1339
[2]. https://openqa.qa.codethink.co.uk/tests/1343
--
Regards
Sudip
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.123 release. There are 11 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 16 Jun 2022 18:37:02 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.123-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
## Build
* kernel: 5.10.123-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-5.10.y
* git commit: f67ea0f670870facb37c20f19e483ec74a2cba63
* git describe: v5.10.122-12-gf67ea0f67087
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.10.y/build/v5.10.122-12-gf67ea0f67087
## Test Regressions (compared to v5.10.118)
No test regressions found.
## Metric Regressions (compared to v5.10.118)
No metric regressions found.
## Test Fixes (compared to v5.10.118)
No test fixes found.
## Metric Fixes (compared to v5.10.118)
No metric fixes found.
## Test result summary
total: 123351, pass: 110941, fail: 243, skip: 11563, xfail: 604
## Build Summary
* arc: 10 total, 10 passed, 0 failed
* arm: 314 total, 314 passed, 0 failed
* arm64: 58 total, 58 passed, 0 failed
* i386: 52 total, 49 passed, 3 failed
* mips: 37 total, 37 passed, 0 failed
* parisc: 12 total, 12 passed, 0 failed
* powerpc: 51 total, 51 passed, 0 failed
* riscv: 27 total, 27 passed, 0 failed
* s390: 21 total, 21 passed, 0 failed
* sh: 24 total, 24 passed, 0 failed
* sparc: 12 total, 12 passed, 0 failed
* x86_64: 56 total, 55 passed, 1 failed
## Test suites summary
* fwts
* igt-gpu-tools
* kunit
* kvm-unit-tests
* libgpiod
* libhugetlbfs
* log-parser-boot
* log-parser-test
* ltp-cap_bounds
* ltp-cap_bounds-tests
* ltp-commands
* ltp-commands-tests
* ltp-containers
* ltp-containers-tests
* ltp-controllers-tests
* ltp-cpuhotplug-tests
* ltp-crypto
* ltp-crypto-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-fcntl-locktests
* ltp-fcntl-locktests-tests
* ltp-filecaps
* ltp-filecaps-tests
* ltp-fs
* ltp-fs-tests
* ltp-fs_bind
* ltp-fs_bind-tests
* ltp-fs_perms_simple
* ltp-fs_perms_simple-tests
* ltp-fsx
* ltp-fsx-tests
* ltp-hugetlb
* ltp-hugetlb-tests
* ltp-io
* ltp-io-tests
* ltp-ipc
* ltp-ipc-tests
* ltp-math-tests
* ltp-mm-tests
* ltp-nptl
* ltp-nptl-tests
* ltp-open-posix-tests
* ltp-pty
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits
* ltp-securebits-tests
* ltp-smoke
* ltp-syscalls-tests
* ltp-tracing-tests
* network-basic-tests
* packetdrill
* perf
* perf/Zstd-perf.data-compression
* rcutorture
* ssuite
* v4l2-compliance
* vdso
--
Linaro LKFT
https://lkft.linaro.org
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.123 release. There are 11 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 16 Jun 2022 18:37:02 +0000. Anything received after that time might be too late.
Build results:
total: 163 pass: 163 fail: 0 Qemu test results: total: 477 pass: 477 fail: 0
Guenter
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.123 release. There are 11 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 16 Jun 2022 18:37:02 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.123-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
Tested on arm64 and x86 for 5.10.123-rc1,
Kernel repo:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Branch: linux-5.10.y
Version: 5.10.123-rc1
Commit: f67ea0f670870facb37c20f19e483ec74a2cba63
Compiler: gcc version 7.3.0 (GCC)
arm64:
--------------------------------------------------------------------
Testcase Result Summary:
total: 9033
passed: 9033
failed: 0
timeout: 0
--------------------------------------------------------------------
x86:
--------------------------------------------------------------------
Testcase Result Summary:
total: 9033
passed: 9033
failed: 0
timeout: 0
--------------------------------------------------------------------
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.123 release. There are 11 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 16 Jun 2022 18:37:02 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.123-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
Hi Greg - I successfully tested this release candidate in x86_64 Hyper-V Azure VMs with speculation controls both enabled and disabled. Speculation controls are passed through to the guest and, of particular interest for this release candidate, set the FB_CLEAR bit in the IA32_ARCH_CAPABILITIES MSR.
The FB_CLEAR bit's presence is accurately conveyed in the kernel log messages during boot and in the /sys/devices/system/cpu/vulnerabilities/mmio_stale_data file.
I did a full LTP run in both scenarios (the results were the same) and also compared the results to a previous run against the v5.10.118 release (there were no regressions).
Tyler
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.123 release. There are 11 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 16 Jun 2022 18:37:02 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.123-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
No new regressions for Tegra. I am seeing the following kernel warning that is causing a boot test to fail, but this has been happening for a few releases now (I would have reported it earlier but we have been having some infrastructure issues) ...
WARNING KERN urandom_read_iter: 82 callbacks suppressed
This appears to be introduced by commit "random: convert to using fops->read_iter()" [0]. Interestingly, I am not seeing this in the mainline as far as I can tell and so I am not sure if there is something else that is missing?
Test results for stable-v5.10:
10 builds: 10 pass, 0 fail
28 boots: 28 pass, 0 fail
75 tests: 74 pass, 1 failLinux version: 5.10.123-rc1-gf67ea0f67087
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000,
tegra20-ventana, tegra210-p2371-2180,
tegra210-p3450-0000, tegra30-cardhu-a04Test failures: tegra194-p2972-0000: boot.py
Jon
[0] https://lore.kernel.org/lkml/[email protected]/
Signature · 1 line
nvpublic
Quoted 19 lines · Jon Hunter
Quoted 17 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.123 release. There are 11 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 16 Jun 2022 18:37:02 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.123-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y and the diffstat can be found below.thanks,
Quoted 8 lines
Quoted 1 line
greg k-h
No new regressions for Tegra. I am seeing the following kernel warning that is causing a boot test to fail, but this has been happening for a few releases now (I would have reported it earlier but we have been having some infrastructure issues) ...
WARNING KERN
urandom_read_iter: 82 callbacks suppressedThis appears to be introduced by commit "random: convert to using
fops->read_iter()" [0]. Interestingly, I am not seeing this in the mainline as far as I can tell and so I am not sure if there is something else that is missing?
I'm also seeing this on RISC-V. 5.15 and 5.17, but not 5.18.
Jon Hunter
maintainerQuoted 22 lines · Ron Economos
Quoted 21 lines · Jon Hunter
Quoted 18 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.123 release. There are 11 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 16 Jun 2022 18:37:02 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.123-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y and the diffstat can be found below.thanks,
greg k-h
Quoted 8 lines
Quoted 6 lines
No new regressions for Tegra. I am seeing the following kernel warning that is causing a boot test to fail, but this has been happening for a few releases now (I would have reported it earlier but we have been having some infrastructure issues) ...
WARNING KERN
urandom_read_iter: 82 callbacks suppressedThis appears to be introduced by commit "random: convert to using
fops->read_iter()" [0]. Interestingly, I am not seeing this in the mainline as far as I can tell and so I am not sure if there is something else that is missing?I'm also seeing this on RISC-V. 5.15 and 5.17, but not 5.18.
That's good to know. I don't see this on 5.18 either, just 5.10, 5.15 and 5.17.
Jon
Signature · 1 line
nvpublic
Jason A. Donenfeld
maintainerHi Jon,
Quoted 5 lines · Jon Hunter
Quoted 2 lines · Ron Economos
On 6/16/22 1:48 AM, Jon Hunter wrote:
I'm also seeing this on RISC-V. 5.15 and 5.17, but not 5.18.That's good to know. I don't see this on 5.18 either, just 5.10, 5.15 and 5.17.
Right. 5.18 has
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=48bff1053c172e6c7f340e506027d118147c8b7f
which I thought was a bit too risky to backport. So on 5.18 you're not seeing this behavior because /dev/urandom is always seeded magically and hence there is never an opportunity to warn about unseeded randomness. Maybe we can think about backporting that if no issues come up after several months, but I'd rather tread lightly with that one.
Anyway, as mentioned in the other message, I've got a patch I'll send out in a minute for the unwanted pr_warn().
Jason
Jason A. Donenfeld
maintainerHi Jon,
Quoted 24 lines · Jon Hunter
No new regressions for Tegra. I am seeing the following kernel warning that is causing a boot test to fail, but this has been happening for a few releases now (I would have reported it earlier but we have been having some infrastructure issues) ...
WARNING KERN
urandom_read_iter: 82 callbacks suppressedThis appears to be introduced by commit "random: convert to using
fops->read_iter()" [0]. Interestingly, I am not seeing this in the mainline as far as I can tell and so I am not sure if there is something else that is missing?Test results for stable-v5.10:
10 builds: 10 pass, 0 fail 28 boots: 28 pass, 0 fail 75 tests: 74 pass, 1 failLinux version: 5.10.123-rc1-gf67ea0f67087
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000, tegra20-ventana, tegra210-p2371-2180, tegra210-p3450-0000, tegra30-cardhu-a04
Quoted 8 lines
Test failures: tegra194-p2972-0000:
boot.pyTested-by Jon Hunter <[email protected]>Jon
Please CC me on RNG issues.
I'm surprised that this message results in a failure. It's not a WARN_ON() or a BUG() that's being triggered here. This is just the simple pr_warn("%s: %d callbacks suppressed\n") in lib/ratelimit.c, which really shouldn't be causing your CI to fail. Sounds like your harness could use some adjusting.
Nonetheless, you have found a 4 year old bug in the urandom warning accounting that was recently made more easily triggerable by a newer commit, though not the one you mentioned. I'll fix this up and keep you CC'd on the patch, which should make it into stable as well.
Jason
Jon Hunter
maintainerHi Jason,
Quoted 29 lines · Jason A. Donenfeld
Hi Jon,
Quoted 26 lines · Jon Hunter
No new regressions for Tegra. I am seeing the following kernel warning that is causing a boot test to fail, but this has been happening for a few releases now (I would have reported it earlier but we have been having some infrastructure issues) ...
WARNING KERN
urandom_read_iter: 82 callbacks suppressedThis appears to be introduced by commit "random: convert to using
fops->read_iter()" [0]. Interestingly, I am not seeing this in the mainline as far as I can tell and so I am not sure if there is something else that is missing?Test results for stable-v5.10:
10 builds: 10 pass, 0 fail 28 boots: 28 pass, 0 fail 75 tests: 74 pass, 1 failLinux version: 5.10.123-rc1-gf67ea0f67087
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000, tegra20-ventana, tegra210-p2371-2180, tegra210-p3450-0000, tegra30-cardhu-a04Test failures: tegra194-p2972-0000:
boot.py
Quoted 8 lines
Quoted 6 lines
Tested-by Jon Hunter <[email protected]>Jon
Please CC me on RNG issues.
Yes no problem.
Quoted 5 lines
I'm surprised that this message results in a failure. It's not a
WARN_ON()or aBUG()that's being triggered here. This is just the simplepr_warn("%s: %d callbacks suppressed\n")inlib/ratelimit.c, which really shouldn't be causing your CI to fail. Sounds like your harness could use some adjusting.
It is not a hard failure, but any new warning will be flagged and cause this particular test to fail. So all I could see is that a new warning was occurring and wanted to understand what was going on. We can ignore the warning if necessary.
Quoted 4 lines
Nonetheless, you have found a 4 year old bug in the urandom warning accounting that was recently made more easily triggerable by a newer commit, though not the one you mentioned. I'll fix this up and keep you CC'd on the patch, which should make it into stable as well.
OK, great! Happy to test anything on my end.
Cheers
Jon
Signature · 1 line
nvpublic
Jason A. Donenfeld
maintainerPATCH 1/1 random: quiet urandom warning ratelimit suppression message
random.c ratelimits how much it warns about uninitialized urandom reads using __ratelimit. When the RNG is finally initialized, it prints the number of missed messages due to ratelimiting.
It has been this way since that functionality was introduced back in 2018. Recently, cc1e127bfa95 ("random: remove ratelimiting for in-kernel unseeded randomness") put a bit more stress on the urandom ratelimiting, which teased out a bug in the implementation.
Specifically, when under pressure, __ratelimit() will print its own message and reset the count back to 0, making the final message at the end less useful. Secondly, it does so as a pr_warn(), which apparently is undesirable for people's CI.
Fortunately, __ratelimit() has the RATELIMIT_MSG_ON_RELEASE flag exactly for this purpose, so we set the flag.
--- drivers/char/random.c | 2 +- include/linux/ratelimit_types.h | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-)
drivers/char/random.c +1 -1
@@ -87,7 +87,7 @@ static struct fasync_struct *fasync;/* Control how we warn userspace. */ static struct ratelimit_state urandom_warning = -RATELIMIT_STATE_INIT ("warn_urandom_randomness" ,HZ ,3 ); +RATELIMIT_STATE_INIT_FLAGS ("urandom_warning" ,HZ ,3 ,RATELIMIT_MSG_ON_RELEASE );static int ratelimit_disable__read_mostly =IS_ENABLED (CONFIG_WARN_ALL_UNSEEDED_RANDOM );module_param_named (ratelimit_disable, ratelimit_disable, int,0644 );
include/linux/ratelimit_types.h +8 -4
@@ -23,12 +23,16 @@ struct ratelimit_state {unsigned long flags; }; -#define RATELIMIT_STATE_INIT (name, interval_init, burst_init) { \ - .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \ - .interval = interval_init, \ - .burst = burst_init, \ +#define RATELIMIT_STATE_INIT_FLAGS (name, interval_init, burst_init, flags_init) { \ + .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \ + .interval = interval_init, \ + .burst = burst_init, \ + .flags = flags_init, \ } +#define RATELIMIT_STATE_INIT (name, interval_init, burst_init) \ + RATELIMIT_STATE_INIT_FLAGS(name, interval_init, burst_init, 0) +#define RATELIMIT_STATE_INIT_DISABLED \ RATELIMIT_STATE_INIT(ratelimit_state, 0, DEFAULT_RATELIMIT_BURST)
Signature · 1 line
2.35.1
Re: [PATCH] random: quiet urandom warning ratelimit suppression message
Quoted 55 lines · Jason A. Donenfeld
random.cratelimits how much it warns about uninitialized urandom reads using__ratelimit. When the RNG is finally initialized, it prints the number of missed messages due to ratelimiting.It has been this way since that functionality was introduced back in 2018. Recently,
cc1e127bfa95("random: remove ratelimiting for in-kernel unseeded randomness") put a bit more stress on the urandom ratelimiting, which teased out a bug in the implementation.Specifically, when under pressure,
__ratelimit()will print its own message and reset the count back to 0, making the final message at the end less useful. Secondly, it does so as apr_warn(), which apparently is undesirable for people's CI.Fortunately,
__ratelimit()has theRATELIMIT_MSG_ON_RELEASEflag exactly for this purpose, so we set the flag.Fixes 4e00b339e264 ("random: rate limit unseeded randomness warnings")Reported-by Jon Hunter <[email protected]>Reported-by Ron Economos <[email protected]>Signed-off-by Jason A. Donenfeld <[email protected]>--- drivers/char/random.c | 2 +- include/linux/ratelimit_types.h | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-)drivers/char/random.c +1
-1@@ -87,7 +87,7 @@ static struct fasync_struct *fasync;/* Control how we warn userspace. */ static struct ratelimit_state urandom_warning = -RATELIMIT_STATE_INIT ("warn_urandom_randomness" ,HZ ,3 ); +RATELIMIT_STATE_INIT_FLAGS ("urandom_warning" ,HZ ,3 ,RATELIMIT_MSG_ON_RELEASE );static int ratelimit_disable__read_mostly =IS_ENABLED (CONFIG_WARN_ALL_UNSEEDED_RANDOM );module_param_named (ratelimit_disable, ratelimit_disable, int,0644 );include/linux/ratelimit_types.h +3
-4@@ -23,12 +23,16 @@ struct ratelimit_state {unsigned long flags; }; -#define RATELIMIT_STATE_INIT (name, interval_init, burst_init) { \ - .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \ - .interval = interval_init, \ - .burst = burst_init, \ +#define RATELIMIT_STATE_INIT_FLAGS (name, interval_init, burst_init, flags_init) { \ + .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \ + .interval = interval_init, \
include/linux/ratelimit_types.h struct ratelimit_state { · line 38
Quoted 10 lines
include/linux/ratelimit_types.h +5
-0+ .burst = burst_init, \ + .flags = flags_init, \ } +#define RATELIMIT_STATE_INIT (name, interval_init, burst_init) \ + RATELIMIT_STATE_INIT_FLAGS(name, interval_init, burst_init, 0) +#define RATELIMIT_STATE_INIT_DISABLED \ RATELIMIT_STATE_INIT(ratelimit_state, 0, DEFAULT_RATELIMIT_BURST)
Tested on 5.15.48 kernel for RISC-V RV64. Works good, urandom_read_iter warnings are suppressed.
Hi!
Quoted 4 lines
This is the start of the stable review cycle for the 5.10.123 release. There are 11 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
CIP testing did not find any problems here:
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/tree/linux-5.10.y
Best regards,
Pavel
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany