9dd7462461
by cherry-picking the relevant commits from launchpad/lunar [0]. (relevant commits are based on k.o/stable commits for this) minimally tested by booting my (ryzen) machine with this kernel and skimming through dmesg after boot. [0] git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/lunar Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
45 lines
1.6 KiB
Diff
45 lines
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Thomas Gleixner <tglx@linutronix.de>
|
|
Date: Wed, 14 Jun 2023 01:39:45 +0200
|
|
Subject: [PATCH] x86/fpu: Mark init functions __init
|
|
|
|
No point in keeping them around.
|
|
|
|
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|
Link: https://lore.kernel.org/r/20230613224545.841685728@linutronix.de
|
|
|
|
(cherry picked from commit 1703db2b90c91b2eb2d699519fc505fe431dde0e)
|
|
CVE-2022-40982
|
|
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
|
|
Acked-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
|
|
Acked-by: Stefan Bader <stefan.bader@canonical.com>
|
|
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
|
|
(cherry picked from commit 368569c00f730c2f530d3d5431fd3fe8ca81cba3)
|
|
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
|
|
---
|
|
arch/x86/kernel/fpu/init.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/arch/x86/kernel/fpu/init.c b/arch/x86/kernel/fpu/init.c
|
|
index 5001df943828..998a08f17e33 100644
|
|
--- a/arch/x86/kernel/fpu/init.c
|
|
+++ b/arch/x86/kernel/fpu/init.c
|
|
@@ -53,7 +53,7 @@ void fpu__init_cpu(void)
|
|
fpu__init_cpu_xstate();
|
|
}
|
|
|
|
-static bool fpu__probe_without_cpuid(void)
|
|
+static bool __init fpu__probe_without_cpuid(void)
|
|
{
|
|
unsigned long cr0;
|
|
u16 fsw, fcw;
|
|
@@ -71,7 +71,7 @@ static bool fpu__probe_without_cpuid(void)
|
|
return fsw == 0 && (fcw & 0x103f) == 0x003f;
|
|
}
|
|
|
|
-static void fpu__init_system_early_generic(void)
|
|
+static void __init fpu__init_system_early_generic(void)
|
|
{
|
|
if (!boot_cpu_has(X86_FEATURE_CPUID) &&
|
|
!test_bit(X86_FEATURE_FPU, (unsigned long *)cpu_caps_cleared)) {
|