This is the start of the stable review cycle for the 4.9.306 release.
There are 24 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 Fri, 11 Mar 2022 15:58:48 +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/v4.x/stable-review/patch-4.9.306-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.9.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.9.306-rc1
Emmanuel Gil Peyrot <linkmauve(a)linkmauve.fr>
ARM: fix build error when BPF_SYSCALL is disabled
Russell King (Oracle) <rmk+kernel(a)armlinux.org.uk>
ARM: include unprivileged BPF status in Spectre V2 reporting
Russell King (Oracle) <rmk+kernel(a)armlinux.org.uk>
ARM: Spectre-BHB workaround
Russell King (Oracle) <rmk+kernel(a)armlinux.org.uk>
ARM: use LOADADDR() to get load address of sections
Russell King (Oracle) <rmk+kernel(a)armlinux.org.uk>
ARM: early traps initialisation
Russell King (Oracle) <rmk+kernel(a)armlinux.org.uk>
ARM: report Spectre v2 status through sysfs
Mark Rutland <mark.rutland(a)arm.com>
arm/arm64: smccc/psci: add arm_smccc_1_1_get_conduit()
Steven Price <steven.price(a)arm.com>
arm/arm64: Provide a wrapper for SMCCC 1.1 calls
Josh Poimboeuf <jpoimboe(a)redhat.com>
x86/speculation: Warn about eIBRS + LFENCE + Unprivileged eBPF + SMT
Josh Poimboeuf <jpoimboe(a)redhat.com>
x86/speculation: Warn about Spectre v2 LFENCE mitigation
Kim Phillips <kim.phillips(a)amd.com>
x86/speculation: Update link to AMD speculation whitepaper
Kim Phillips <kim.phillips(a)amd.com>
x86/speculation: Use generic retpoline by default on AMD
Josh Poimboeuf <jpoimboe(a)redhat.com>
x86/speculation: Include unprivileged eBPF status in Spectre v2 mitigation reporting
Peter Zijlstra <peterz(a)infradead.org>
Documentation/hw-vuln: Update spectre doc
Peter Zijlstra <peterz(a)infradead.org>
x86/speculation: Add eIBRS + Retpoline options
Peter Zijlstra (Intel) <peterz(a)infradead.org>
x86/speculation: Rename RETPOLINE_AMD to RETPOLINE_LFENCE
Peter Zijlstra <peterz(a)infradead.org>
x86,bugs: Unconditionally allow spectre_v2=retpoline,amd
Borislav Petkov <bp(a)suse.de>
x86/speculation: Merge one test in spectre_v2_user_select_mitigation()
Lukas Bulwahn <lukas.bulwahn(a)gmail.com>
Documentation: refer to config RANDOMIZE_BASE for kernel address-space randomization
Josh Poimboeuf <jpoimboe(a)redhat.com>
Documentation: Add swapgs description to the Spectre v1 documentation
Tim Chen <tim.c.chen(a)linux.intel.com>
Documentation: Add section about CPU vulnerabilities for Spectre
Zhenzhong Duan <zhenzhong.duan(a)oracle.com>
x86/retpoline: Remove minimal retpoline support
Zhenzhong Duan <zhenzhong.duan(a)oracle.com>
x86/retpoline: Make CONFIG_RETPOLINE depend on compiler support
Zhenzhong Duan <zhenzhong.duan(a)oracle.com>
x86/speculation: Add RETPOLINE_AMD support to the inline asm CALL_NOSPEC variant
-------------
Diffstat:
Documentation/hw-vuln/index.rst | 1 +
Documentation/hw-vuln/spectre.rst | 785 +++++++++++++++++++++++++++++++
Documentation/kernel-parameters.txt | 8 +-
Makefile | 4 +-
arch/arm/include/asm/assembler.h | 10 +
arch/arm/include/asm/spectre.h | 32 ++
arch/arm/kernel/Makefile | 2 +
arch/arm/kernel/entry-armv.S | 79 +++-
arch/arm/kernel/entry-common.S | 24 +
arch/arm/kernel/spectre.c | 71 +++
arch/arm/kernel/traps.c | 65 ++-
arch/arm/kernel/vmlinux-xip.lds.S | 37 +-
arch/arm/kernel/vmlinux.lds.S | 37 +-
arch/arm/mm/Kconfig | 11 +
arch/arm/mm/proc-v7-bugs.c | 198 ++++++--
arch/x86/Kconfig | 4 -
arch/x86/Makefile | 5 +-
arch/x86/include/asm/cpufeatures.h | 2 +-
arch/x86/include/asm/nospec-branch.h | 41 +-
arch/x86/kernel/cpu/bugs.c | 223 ++++++---
drivers/firmware/psci.c | 15 +
include/linux/arm-smccc.h | 74 +++
include/linux/bpf.h | 11 +
kernel/sysctl.c | 8 +
tools/arch/x86/include/asm/cpufeatures.h | 2 +-
25 files changed, 1596 insertions(+), 153 deletions(-)
This is the start of the stable review cycle for the 5.10.105 release.
There are 43 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 Fri, 11 Mar 2022 15:58:48 +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.105-r…
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 <gregkh(a)linuxfoundation.org>
Linux 5.10.105-rc1
Emmanuel Gil Peyrot <linkmauve(a)linkmauve.fr>
ARM: fix build error when BPF_SYSCALL is disabled
James Morse <james.morse(a)arm.com>
arm64: proton-pack: Include unprivileged eBPF status in Spectre v2 mitigation reporting
James Morse <james.morse(a)arm.com>
arm64: Use the clearbhb instruction in mitigations
James Morse <james.morse(a)arm.com>
KVM: arm64: Allow SMCCC_ARCH_WORKAROUND_3 to be discovered and migrated
James Morse <james.morse(a)arm.com>
arm64: Mitigate spectre style branch history side channels
James Morse <james.morse(a)arm.com>
KVM: arm64: Allow indirect vectors to be used without SPECTRE_V3A
James Morse <james.morse(a)arm.com>
arm64: proton-pack: Report Spectre-BHB vulnerabilities as part of Spectre-v2
James Morse <james.morse(a)arm.com>
arm64: Add percpu vectors for EL1
James Morse <james.morse(a)arm.com>
arm64: entry: Add macro for reading symbol addresses from the trampoline
James Morse <james.morse(a)arm.com>
arm64: entry: Add vectors that have the bhb mitigation sequences
James Morse <james.morse(a)arm.com>
arm64: entry: Add non-kpti __bp_harden_el1_vectors for mitigations
James Morse <james.morse(a)arm.com>
arm64: entry: Allow the trampoline text to occupy multiple pages
James Morse <james.morse(a)arm.com>
arm64: entry: Make the kpti trampoline's kpti sequence optional
James Morse <james.morse(a)arm.com>
arm64: entry: Move trampoline macros out of ifdef'd section
James Morse <james.morse(a)arm.com>
arm64: entry: Don't assume tramp_vectors is the start of the vectors
James Morse <james.morse(a)arm.com>
arm64: entry: Allow tramp_alias to access symbols after the 4K boundary
James Morse <james.morse(a)arm.com>
arm64: entry: Move the trampoline data page before the text page
James Morse <james.morse(a)arm.com>
arm64: entry: Free up another register on kpti's tramp_exit path
James Morse <james.morse(a)arm.com>
arm64: entry: Make the trampoline cleanup optional
James Morse <james.morse(a)arm.com>
arm64: spectre: Rename spectre_v4_patch_fw_mitigation_conduit
James Morse <james.morse(a)arm.com>
arm64: entry.S: Add ventry overflow sanity checks
Joey Gouly <joey.gouly(a)arm.com>
arm64: cpufeature: add HWCAP for FEAT_RPRES
Joey Gouly <joey.gouly(a)arm.com>
arm64: cpufeature: add HWCAP for FEAT_AFP
Joey Gouly <joey.gouly(a)arm.com>
arm64: add ID_AA64ISAR2_EL1 sys register
Marc Zyngier <maz(a)kernel.org>
arm64: Add HWCAP for self-synchronising virtual counter
Anshuman Khandual <anshuman.khandual(a)arm.com>
arm64: Add Cortex-A510 CPU part definition
Anshuman Khandual <anshuman.khandual(a)arm.com>
arm64: Add Cortex-X2 CPU part definition
Suzuki K Poulose <suzuki.poulose(a)arm.com>
arm64: Add Neoverse-N2, Cortex-A710 CPU part definition
Hector Martin <marcan(a)marcan.st>
arm64: cputype: Add CPU implementor & types for the Apple M1 cores
Russell King (Oracle) <rmk+kernel(a)armlinux.org.uk>
ARM: include unprivileged BPF status in Spectre V2 reporting
Russell King (Oracle) <rmk+kernel(a)armlinux.org.uk>
ARM: Spectre-BHB workaround
Russell King (Oracle) <rmk+kernel(a)armlinux.org.uk>
ARM: use LOADADDR() to get load address of sections
Russell King (Oracle) <rmk+kernel(a)armlinux.org.uk>
ARM: early traps initialisation
Russell King (Oracle) <rmk+kernel(a)armlinux.org.uk>
ARM: report Spectre v2 status through sysfs
Josh Poimboeuf <jpoimboe(a)redhat.com>
x86/speculation: Warn about eIBRS + LFENCE + Unprivileged eBPF + SMT
Josh Poimboeuf <jpoimboe(a)redhat.com>
x86/speculation: Warn about Spectre v2 LFENCE mitigation
Kim Phillips <kim.phillips(a)amd.com>
x86/speculation: Update link to AMD speculation whitepaper
Kim Phillips <kim.phillips(a)amd.com>
x86/speculation: Use generic retpoline by default on AMD
Josh Poimboeuf <jpoimboe(a)redhat.com>
x86/speculation: Include unprivileged eBPF status in Spectre v2 mitigation reporting
Peter Zijlstra <peterz(a)infradead.org>
Documentation/hw-vuln: Update spectre doc
Peter Zijlstra <peterz(a)infradead.org>
x86/speculation: Add eIBRS + Retpoline options
Peter Zijlstra (Intel) <peterz(a)infradead.org>
x86/speculation: Rename RETPOLINE_AMD to RETPOLINE_LFENCE
Peter Zijlstra <peterz(a)infradead.org>
x86,bugs: Unconditionally allow spectre_v2=retpoline,amd
-------------
Diffstat:
Documentation/admin-guide/hw-vuln/spectre.rst | 48 ++--
Documentation/admin-guide/kernel-parameters.txt | 8 +-
Documentation/arm64/cpu-feature-registers.rst | 29 +-
Documentation/arm64/elf_hwcaps.rst | 12 +
Makefile | 4 +-
arch/arm/include/asm/assembler.h | 10 +
arch/arm/include/asm/spectre.h | 32 +++
arch/arm/include/asm/vmlinux.lds.h | 35 ++-
arch/arm/kernel/Makefile | 2 +
arch/arm/kernel/entry-armv.S | 79 +++++-
arch/arm/kernel/entry-common.S | 24 ++
arch/arm/kernel/spectre.c | 71 +++++
arch/arm/kernel/traps.c | 65 ++++-
arch/arm/mm/Kconfig | 11 +
arch/arm/mm/proc-v7-bugs.c | 207 +++++++++++---
arch/arm64/Kconfig | 9 +
arch/arm64/include/asm/assembler.h | 33 +++
arch/arm64/include/asm/cpu.h | 1 +
arch/arm64/include/asm/cpucaps.h | 3 +-
arch/arm64/include/asm/cpufeature.h | 28 ++
arch/arm64/include/asm/cputype.h | 22 ++
arch/arm64/include/asm/fixmap.h | 6 +-
arch/arm64/include/asm/hwcap.h | 3 +
arch/arm64/include/asm/insn.h | 1 +
arch/arm64/include/asm/kvm_asm.h | 8 +
arch/arm64/include/asm/kvm_mmu.h | 3 +-
arch/arm64/include/asm/mmu.h | 6 +
arch/arm64/include/asm/sections.h | 5 +
arch/arm64/include/asm/spectre.h | 4 +
arch/arm64/include/asm/sysreg.h | 18 ++
arch/arm64/include/asm/vectors.h | 73 +++++
arch/arm64/include/uapi/asm/hwcap.h | 3 +
arch/arm64/include/uapi/asm/kvm.h | 5 +
arch/arm64/kernel/cpu_errata.c | 7 +
arch/arm64/kernel/cpufeature.c | 28 +-
arch/arm64/kernel/cpuinfo.c | 4 +
arch/arm64/kernel/entry.S | 213 ++++++++++----
arch/arm64/kernel/proton-pack.c | 359 +++++++++++++++++++++++-
arch/arm64/kernel/vmlinux.lds.S | 2 +-
arch/arm64/kvm/arm.c | 3 +-
arch/arm64/kvm/hyp/hyp-entry.S | 4 +
arch/arm64/kvm/hyp/smccc_wa.S | 75 +++++
arch/arm64/kvm/hyp/vhe/switch.c | 9 +-
arch/arm64/kvm/hypercalls.c | 12 +
arch/arm64/kvm/psci.c | 18 +-
arch/arm64/kvm/sys_regs.c | 2 +-
arch/arm64/mm/mmu.c | 12 +-
arch/x86/include/asm/cpufeatures.h | 2 +-
arch/x86/include/asm/nospec-branch.h | 16 +-
arch/x86/kernel/cpu/bugs.c | 205 ++++++++++----
include/linux/arm-smccc.h | 5 +
include/linux/bpf.h | 12 +
kernel/sysctl.c | 7 +
tools/arch/x86/include/asm/cpufeatures.h | 2 +-
54 files changed, 1651 insertions(+), 214 deletions(-)
[PROBLEM]
Patch "btrfs: don't let new writes to trigger autodefrag on the same
inode" now makes autodefrag really only to scan one inode once
per autodefrag run.
That patch works mostly fine, as the trace events show their intervals
are almost 30s:
(only showing the root 257 ino 329891 start 0)
486.810041: defrag_file_start: root=257 ino=329891 start=0 len=754728960
506.407089: defrag_file_start: root=257 ino=329891 start=0 len=754728960
536.463320: defrag_file_start: root=257 ino=329891 start=0 len=754728960
539.721309: defrag_file_start: root=257 ino=329891 start=0 len=754728960
569.741417: defrag_file_start: root=257 ino=329891 start=0 len=754728960
594.832649: defrag_file_start: root=257 ino=329891 start=0 len=754728960
624.258214: defrag_file_start: root=257 ino=329891 start=0 len=754728960
654.856264: defrag_file_start: root=257 ino=329891 start=0 len=754728960
684.943029: defrag_file_start: root=257 ino=329891 start=0 len=754728960
715.288662: defrag_file_start: root=257 ino=329891 start=0 len=754728960
But there are some outlawers, like 536s->539s, it's only 3s, not the 30s
default commit interval.
[CAUSE]
There are several call sites which can wake up transaction kthread
early, while transaction kthread itself can skip transaction if its
timer doesn't reach commit interval, but cleaner is always woken up.
This means each time transaction ktreahd gets woken up, we also trigger
autodefrag, even transaction kthread chooses to skip its work.
This is not a good behavior for files under heavy write load, as we
waste extra IO/CPU while the defragged extents can easily get fragmented
again.
[FIX]
In btrfs_run_defrag_inodes(), we check if our current time is larger
than last run + commit_interval.
If not, skip this run and wait for next opportunity.
This patch along with patch "btrfs: don't let new writes to trigger
autodefrag on the same inode" are mostly for backport to v5.16.
This is just to reduce the unnecessary IO/CPU caused by autodefrag, the
final solution would be allowing users to change autodefrag scan
interval and target extent size.
Cc: stable(a)vger.kernel.org # 5.16+
Signed-off-by: Qu Wenruo <wqu(a)suse.com>
---
fs/btrfs/ctree.h | 1 +
fs/btrfs/file.c | 11 +++++++++++
2 files changed, 12 insertions(+)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index a8a3de10cead..44116a47307e 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -899,6 +899,7 @@ struct btrfs_fs_info {
/* auto defrag inodes go here */
spinlock_t defrag_inodes_lock;
+ u64 defrag_last_run_ksec;
struct rb_root defrag_inodes;
atomic_t defrag_running;
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index abba1871e86e..a852754f5601 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -312,9 +312,20 @@ int btrfs_run_defrag_inodes(struct btrfs_fs_info *fs_info)
{
struct inode_defrag *defrag;
struct rb_root defrag_inodes;
+ u64 ksec = ktime_get_seconds();
u64 first_ino = 0;
u64 root_objectid = 0;
+ /*
+ * If cleaner get woken up early, skip this run to avoid frequent
+ * re-dirty, which is not really useful for heavy writes.
+ *
+ * TODO: Make autodefrag to happen in its own thread.
+ */
+ if (ksec - fs_info->defrag_last_run_ksec < fs_info->commit_interval)
+ return 0;
+ fs_info->defrag_last_run_ksec = ksec;
+
atomic_inc(&fs_info->defrag_running);
spin_lock(&fs_info->defrag_inodes_lock);
/*
--
2.35.1
This is the start of the stable review cycle for the 5.15.28 release.
There are 43 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 Fri, 11 Mar 2022 15:58:48 +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.15.28-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.15.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 5.15.28-rc1
Christoph Hellwig <hch(a)lst.de>
block: drop unused includes in <linux/genhd.h>
Huang Pei <huangpei(a)loongson.cn>
slip: fix macro redefine warning
Emmanuel Gil Peyrot <linkmauve(a)linkmauve.fr>
ARM: fix build error when BPF_SYSCALL is disabled
James Morse <james.morse(a)arm.com>
arm64: proton-pack: Include unprivileged eBPF status in Spectre v2 mitigation reporting
James Morse <james.morse(a)arm.com>
arm64: Use the clearbhb instruction in mitigations
James Morse <james.morse(a)arm.com>
KVM: arm64: Allow SMCCC_ARCH_WORKAROUND_3 to be discovered and migrated
James Morse <james.morse(a)arm.com>
arm64: Mitigate spectre style branch history side channels
James Morse <james.morse(a)arm.com>
arm64: proton-pack: Report Spectre-BHB vulnerabilities as part of Spectre-v2
James Morse <james.morse(a)arm.com>
arm64: Add percpu vectors for EL1
James Morse <james.morse(a)arm.com>
arm64: entry: Add macro for reading symbol addresses from the trampoline
James Morse <james.morse(a)arm.com>
arm64: entry: Add vectors that have the bhb mitigation sequences
James Morse <james.morse(a)arm.com>
arm64: entry: Add non-kpti __bp_harden_el1_vectors for mitigations
James Morse <james.morse(a)arm.com>
arm64: entry: Allow the trampoline text to occupy multiple pages
James Morse <james.morse(a)arm.com>
arm64: entry: Make the kpti trampoline's kpti sequence optional
James Morse <james.morse(a)arm.com>
arm64: entry: Move trampoline macros out of ifdef'd section
James Morse <james.morse(a)arm.com>
arm64: entry: Don't assume tramp_vectors is the start of the vectors
James Morse <james.morse(a)arm.com>
arm64: entry: Allow tramp_alias to access symbols after the 4K boundary
James Morse <james.morse(a)arm.com>
arm64: entry: Move the trampoline data page before the text page
James Morse <james.morse(a)arm.com>
arm64: entry: Free up another register on kpti's tramp_exit path
James Morse <james.morse(a)arm.com>
arm64: entry: Make the trampoline cleanup optional
James Morse <james.morse(a)arm.com>
KVM: arm64: Allow indirect vectors to be used without SPECTRE_V3A
James Morse <james.morse(a)arm.com>
arm64: spectre: Rename spectre_v4_patch_fw_mitigation_conduit
James Morse <james.morse(a)arm.com>
arm64: entry.S: Add ventry overflow sanity checks
Joey Gouly <joey.gouly(a)arm.com>
arm64: cpufeature: add HWCAP for FEAT_RPRES
Joey Gouly <joey.gouly(a)arm.com>
arm64: cpufeature: add HWCAP for FEAT_AFP
Joey Gouly <joey.gouly(a)arm.com>
arm64: add ID_AA64ISAR2_EL1 sys register
Anshuman Khandual <anshuman.khandual(a)arm.com>
arm64: Add Cortex-X2 CPU part definition
Marc Zyngier <maz(a)kernel.org>
arm64: Add HWCAP for self-synchronising virtual counter
Suzuki K Poulose <suzuki.poulose(a)arm.com>
arm64: Add Neoverse-N2, Cortex-A710 CPU part definition
Russell King (Oracle) <rmk+kernel(a)armlinux.org.uk>
ARM: include unprivileged BPF status in Spectre V2 reporting
Russell King (Oracle) <rmk+kernel(a)armlinux.org.uk>
ARM: Spectre-BHB workaround
Russell King (Oracle) <rmk+kernel(a)armlinux.org.uk>
ARM: use LOADADDR() to get load address of sections
Russell King (Oracle) <rmk+kernel(a)armlinux.org.uk>
ARM: early traps initialisation
Russell King (Oracle) <rmk+kernel(a)armlinux.org.uk>
ARM: report Spectre v2 status through sysfs
Josh Poimboeuf <jpoimboe(a)redhat.com>
x86/speculation: Warn about eIBRS + LFENCE + Unprivileged eBPF + SMT
Josh Poimboeuf <jpoimboe(a)redhat.com>
x86/speculation: Warn about Spectre v2 LFENCE mitigation
Kim Phillips <kim.phillips(a)amd.com>
x86/speculation: Update link to AMD speculation whitepaper
Kim Phillips <kim.phillips(a)amd.com>
x86/speculation: Use generic retpoline by default on AMD
Josh Poimboeuf <jpoimboe(a)redhat.com>
x86/speculation: Include unprivileged eBPF status in Spectre v2 mitigation reporting
Peter Zijlstra <peterz(a)infradead.org>
Documentation/hw-vuln: Update spectre doc
Peter Zijlstra <peterz(a)infradead.org>
x86/speculation: Add eIBRS + Retpoline options
Peter Zijlstra (Intel) <peterz(a)infradead.org>
x86/speculation: Rename RETPOLINE_AMD to RETPOLINE_LFENCE
Peter Zijlstra <peterz(a)infradead.org>
x86,bugs: Unconditionally allow spectre_v2=retpoline,amd
-------------
Diffstat:
Documentation/admin-guide/hw-vuln/spectre.rst | 48 ++-
Documentation/admin-guide/kernel-parameters.txt | 8 +-
Documentation/arm64/cpu-feature-registers.rst | 29 +-
Documentation/arm64/elf_hwcaps.rst | 12 +
Makefile | 4 +-
arch/arm/include/asm/assembler.h | 10 +
arch/arm/include/asm/spectre.h | 32 ++
arch/arm/include/asm/vmlinux.lds.h | 35 ++-
arch/arm/kernel/Makefile | 2 +
arch/arm/kernel/entry-armv.S | 79 ++++-
arch/arm/kernel/entry-common.S | 24 ++
arch/arm/kernel/spectre.c | 71 +++++
arch/arm/kernel/traps.c | 65 +++-
arch/arm/mm/Kconfig | 11 +
arch/arm/mm/proc-v7-bugs.c | 207 ++++++++++---
arch/arm64/Kconfig | 9 +
arch/arm64/include/asm/assembler.h | 53 ++++
arch/arm64/include/asm/cpu.h | 1 +
arch/arm64/include/asm/cpufeature.h | 29 ++
arch/arm64/include/asm/cputype.h | 14 +
arch/arm64/include/asm/fixmap.h | 6 +-
arch/arm64/include/asm/hwcap.h | 3 +
arch/arm64/include/asm/insn.h | 1 +
arch/arm64/include/asm/kvm_host.h | 5 +
arch/arm64/include/asm/sections.h | 5 +
arch/arm64/include/asm/spectre.h | 4 +
arch/arm64/include/asm/sysreg.h | 18 ++
arch/arm64/include/asm/vectors.h | 73 +++++
arch/arm64/include/uapi/asm/hwcap.h | 3 +
arch/arm64/include/uapi/asm/kvm.h | 5 +
arch/arm64/kernel/cpu_errata.c | 7 +
arch/arm64/kernel/cpufeature.c | 28 +-
arch/arm64/kernel/cpuinfo.c | 4 +
arch/arm64/kernel/entry.S | 214 +++++++++----
arch/arm64/kernel/image-vars.h | 4 +
arch/arm64/kernel/proton-pack.c | 391 +++++++++++++++++++++++-
arch/arm64/kernel/vmlinux.lds.S | 2 +-
arch/arm64/kvm/arm.c | 5 +-
arch/arm64/kvm/hyp/hyp-entry.S | 9 +
arch/arm64/kvm/hyp/nvhe/mm.c | 4 +-
arch/arm64/kvm/hyp/vhe/switch.c | 9 +-
arch/arm64/kvm/hypercalls.c | 12 +
arch/arm64/kvm/psci.c | 18 +-
arch/arm64/kvm/sys_regs.c | 2 +-
arch/arm64/mm/mmu.c | 12 +-
arch/arm64/tools/cpucaps | 1 +
arch/um/drivers/ubd_kern.c | 1 +
arch/x86/include/asm/cpufeatures.h | 2 +-
arch/x86/include/asm/nospec-branch.h | 16 +-
arch/x86/kernel/cpu/bugs.c | 205 +++++++++----
arch/x86/lib/retpoline.S | 2 +-
block/genhd.c | 1 +
block/holder.c | 1 +
block/partitions/core.c | 1 +
drivers/block/amiflop.c | 1 +
drivers/block/ataflop.c | 1 +
drivers/block/floppy.c | 1 +
drivers/block/swim.c | 1 +
drivers/block/xen-blkfront.c | 1 +
drivers/md/md.c | 1 +
drivers/net/slip/slip.h | 2 +
drivers/s390/block/dasd_genhd.c | 1 +
drivers/scsi/sd.c | 1 +
drivers/scsi/sg.c | 1 +
drivers/scsi/sr.c | 1 +
drivers/scsi/st.c | 1 +
include/linux/arm-smccc.h | 5 +
include/linux/bpf.h | 12 +
include/linux/genhd.h | 14 +-
include/linux/part_stat.h | 1 +
kernel/sysctl.c | 7 +
tools/arch/x86/include/asm/cpufeatures.h | 2 +-
72 files changed, 1642 insertions(+), 229 deletions(-)
On 09.03.22 17:46, Reinhold Mannsberger wrote:
> Dear Thorsten!
>
> Thank you for your quick response!
>
> Now that you gave me the advice to check dmesg I found out that the
> messages are the same with kernel version 5.16.10 and 5.16.12. But - as
> I described - with kernel version 5.16.10 I had to press the power
> button to resume from suspend. So I my conclusion that my laptop does
> not go to suspend ist apparently wrong.
Good. :-D
> In any case you find excerpts
> from dmesg with both kernel versions attached.
>
> Now there is one thing I really would like to understand. Concluding
> from the time stamps in dmesg it seems that my laptop goes to suspend
> only for a moment right before I re-open the lid. Of course I did not
> close my laptop lid only for 3 seconds - as it could be concluded from
> the time stamps for "PM: suspend entry (s2idle)" and "PM: suspend exit"
> - but for a longer period of time. Can you please enlighten me about that?
I have no idea, I'm just tracking regressions and sadly don't known much
about this. To me it looks a bit like s2idle is not working properly,
but I might be totally wrong with that. Maybe google might tell you; or
some measurements where you check how quickly the batter drains in
sleep. Oof you ask the PM developers -- but as this is not a regression
neither the regressions list nor the stable list care, so I guess you do
it in a separate mail.
Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
P.S.: As the Linux kernel's regression tracker I'm getting a lot of
reports on my table. I can only look briefly into most of them and lack
knowledge about most of the areas they concern. I thus unfortunately
will sometimes get things wrong or miss something important. I hope
that's not the case here; if you think it is, don't hesitate to tell me
in a public reply, it's in everyone's interest to set the public record
straight.
> Am Mittwoch, dem 09.03.2022 um 07:51 +0100 schrieb Thorsten Leemhuis:
>> Hi!
>>
>> On 08.03.22 19:21, Reinhold Mannsberger wrote:
>>>
>>> I am using Linux Mint Xfce 20.3 with kernel version 5.16. I had to use
>>> kernel 5.16 because with the standard kernel version of Linux mit 20.3
>>> (which is 5.13) my laptop did not correctly resume, when I closed the
>>> lid.
>>>
>>> With kernel 5.16 my laptop perfectly went to to suspend when I closed
>>> the lid and it perfectly resumed, when I opened the lid again. This
>>> means: I had to press the power button once
>>
>> That sounds odd to me, as most modern Laptops wake up automatically when
>> you open the lid. It's unlikely, but maybe that just that started to
>> work now?
>>
>>> when I reopened the lid -
>>> and then the laptop resumed (to the login screen). This was true until
>>> kernel version 5.16.10. With kernel version > 5.16.10 my laptop does
>>> not go into suspend anymore. This means: When I open the lid I am back
>>> at the login screen immediately (I don't have to press the power button
>>> anymore).
>>
>> You want to check dmesg if the system really didn't go to sleep; it will
>> likely also provide a hint of what went wrong. Just upload the output
>> (generated after a fresh start and where you suspend and resume once the
>> system booted) somewhere and send us a link or sent it as an attachment
>> in a reply. If that doesn't provide any hints of what might be wrong,
>> you might need to find the change that introduced the problem using a
>> bisection.
>>
>> HTH, Ciao, Thorsten
>>
>>> System information for my laptop:
>>> ----------------------------------------------------------------------
>>> System: Kernel: 5.16.10-051610-generic x86_64 bits: 64 compiler: N/A
>>> Desktop: Xfce 4.16.0
>>> tk: Gtk 3.24.20 wm: xfwm4 dm: LightDM Distro: Linux Mint
>>> 20.3 Una
>>> base: Ubuntu 20.04 focal
>>> Machine: Type: Laptop System: HP product: HP ProBook 455 G8 Notebook
>>> PC v: N/A serial: <filter>
>>> Chassis: type: 10 serial: <filter>
>>> Mobo: HP model: 8864 v: KBC Version 41.1E.00 serial:
>>> <filter> UEFI: HP
>>> v: T78 Ver. 01.07.00 date: 10/08/2021
>>> Battery: ID-1: BAT0 charge: 43.8 Wh condition: 44.5/45.0 Wh (99%)
>>> volts: 13.0/11.4
>>> model: Hewlett-Packard Primary serial: <filter> status:
>>> Unknown
>>> CPU: Topology: 8-Core model: AMD Ryzen 7 5800U with Radeon
>>> Graphics bits: 64 type: MT MCP
>>> arch: Zen 3 L2 cache: 4096 KiB
>>> flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a
>>> ssse3 svm bogomips: 60685
>>> Speed: 3497 MHz min/max: 1600/1900 MHz Core speeds (MHz): 1:
>>> 3474 2: 3464 3: 3473
>>> 4: 3471 5: 4362 6: 4332 7: 3478 8: 3455 9: 3459 10: 3452 11:
>>> 3462 12: 3468 13: 3468
>>> 14: 3468 15: 3467 16: 3472
>>> Graphics: Device-1: AMD vendor: Hewlett-Packard driver: amdgpu v:
>>> kernel bus ID: 05:00.0
>>> chip ID: 1002:1638
>>> Display: x11 server: X.Org 1.20.13 driver: amdgpu,ati
>>> unloaded: fbdev,modesetting,vesa
>>> resolution: 1920x1080~60Hz
>>> OpenGL: renderer: AMD RENOIR (DRM 3.44.0 5.16.10-051610-
>>> generic LLVM 12.0.0)
>>> v: 4.6 Mesa 21.2.6 direct render: Yes
>>> ----------------------------------------------------------------------
>>>
>>>
>>> Best regards,
>>>
>>> Reinhold Mannsberger
>>>
>>>
>>>