]> git.proxmox.com Git - pve-kernel.git/blob - patches/kernel/0022-init-Remove-check_bugs-leftovers.patch
add fixes for downfall
[pve-kernel.git] / patches / kernel / 0022-init-Remove-check_bugs-leftovers.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Thomas Gleixner <tglx@linutronix.de>
3 Date: Wed, 14 Jun 2023 01:39:38 +0200
4 Subject: [PATCH] init: Remove check_bugs() leftovers
5
6 Everything is converted over to arch_cpu_finalize_init(). Remove the
7 check_bugs() leftovers including the empty stubs in asm-generic, alpha,
8 parisc, powerpc and xtensa.
9
10 Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
11 Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
12 Link: https://lore.kernel.org/r/20230613224545.553215951@linutronix.de
13
14 (cherry picked from commit 61235b24b9cb37c13fcad5b9596d59a1afdcec30)
15 CVE-2022-40982
16 Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
17 Acked-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
18 Acked-by: Stefan Bader <stefan.bader@canonical.com>
19 Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
20 (cherry picked from commit f6914d2bea4df361881adc56f02dde9bddfa1b0a)
21 Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
22 ---
23 arch/alpha/include/asm/bugs.h | 20 --------------------
24 arch/parisc/include/asm/bugs.h | 20 --------------------
25 arch/powerpc/include/asm/bugs.h | 15 ---------------
26 arch/xtensa/include/asm/bugs.h | 18 ------------------
27 include/asm-generic/bugs.h | 11 -----------
28 init/main.c | 5 -----
29 6 files changed, 89 deletions(-)
30 delete mode 100644 arch/alpha/include/asm/bugs.h
31 delete mode 100644 arch/parisc/include/asm/bugs.h
32 delete mode 100644 arch/powerpc/include/asm/bugs.h
33 delete mode 100644 arch/xtensa/include/asm/bugs.h
34 delete mode 100644 include/asm-generic/bugs.h
35
36 diff --git a/arch/alpha/include/asm/bugs.h b/arch/alpha/include/asm/bugs.h
37 deleted file mode 100644
38 index 78030d1c7e7e..000000000000
39 --- a/arch/alpha/include/asm/bugs.h
40 +++ /dev/null
41 @@ -1,20 +0,0 @@
42 -/*
43 - * include/asm-alpha/bugs.h
44 - *
45 - * Copyright (C) 1994 Linus Torvalds
46 - */
47 -
48 -/*
49 - * This is included by init/main.c to check for architecture-dependent bugs.
50 - *
51 - * Needs:
52 - * void check_bugs(void);
53 - */
54 -
55 -/*
56 - * I don't know of any alpha bugs yet.. Nice chip
57 - */
58 -
59 -static void check_bugs(void)
60 -{
61 -}
62 diff --git a/arch/parisc/include/asm/bugs.h b/arch/parisc/include/asm/bugs.h
63 deleted file mode 100644
64 index 0a7f9db6bd1c..000000000000
65 --- a/arch/parisc/include/asm/bugs.h
66 +++ /dev/null
67 @@ -1,20 +0,0 @@
68 -/* SPDX-License-Identifier: GPL-2.0 */
69 -/*
70 - * include/asm-parisc/bugs.h
71 - *
72 - * Copyright (C) 1999 Mike Shaver
73 - */
74 -
75 -/*
76 - * This is included by init/main.c to check for architecture-dependent bugs.
77 - *
78 - * Needs:
79 - * void check_bugs(void);
80 - */
81 -
82 -#include <asm/processor.h>
83 -
84 -static inline void check_bugs(void)
85 -{
86 -// identify_cpu(&boot_cpu_data);
87 -}
88 diff --git a/arch/powerpc/include/asm/bugs.h b/arch/powerpc/include/asm/bugs.h
89 deleted file mode 100644
90 index 01b8f6ca4dbb..000000000000
91 --- a/arch/powerpc/include/asm/bugs.h
92 +++ /dev/null
93 @@ -1,15 +0,0 @@
94 -/* SPDX-License-Identifier: GPL-2.0-or-later */
95 -#ifndef _ASM_POWERPC_BUGS_H
96 -#define _ASM_POWERPC_BUGS_H
97 -
98 -/*
99 - */
100 -
101 -/*
102 - * This file is included by 'init/main.c' to check for
103 - * architecture-dependent bugs.
104 - */
105 -
106 -static inline void check_bugs(void) { }
107 -
108 -#endif /* _ASM_POWERPC_BUGS_H */
109 diff --git a/arch/xtensa/include/asm/bugs.h b/arch/xtensa/include/asm/bugs.h
110 deleted file mode 100644
111 index 69b29d198249..000000000000
112 --- a/arch/xtensa/include/asm/bugs.h
113 +++ /dev/null
114 @@ -1,18 +0,0 @@
115 -/*
116 - * include/asm-xtensa/bugs.h
117 - *
118 - * This is included by init/main.c to check for architecture-dependent bugs.
119 - *
120 - * Xtensa processors don't have any bugs. :)
121 - *
122 - * This file is subject to the terms and conditions of the GNU General
123 - * Public License. See the file "COPYING" in the main directory of
124 - * this archive for more details.
125 - */
126 -
127 -#ifndef _XTENSA_BUGS_H
128 -#define _XTENSA_BUGS_H
129 -
130 -static void check_bugs(void) { }
131 -
132 -#endif /* _XTENSA_BUGS_H */
133 diff --git a/include/asm-generic/bugs.h b/include/asm-generic/bugs.h
134 deleted file mode 100644
135 index 69021830f078..000000000000
136 --- a/include/asm-generic/bugs.h
137 +++ /dev/null
138 @@ -1,11 +0,0 @@
139 -/* SPDX-License-Identifier: GPL-2.0 */
140 -#ifndef __ASM_GENERIC_BUGS_H
141 -#define __ASM_GENERIC_BUGS_H
142 -/*
143 - * This file is included by 'init/main.c' to check for
144 - * architecture-dependent bugs.
145 - */
146 -
147 -static inline void check_bugs(void) { }
148 -
149 -#endif /* __ASM_GENERIC_BUGS_H */
150 diff --git a/init/main.c b/init/main.c
151 index e39055c8698f..0370df27746f 100644
152 --- a/init/main.c
153 +++ b/init/main.c
154 @@ -104,7 +104,6 @@
155 #include <net/net_namespace.h>
156
157 #include <asm/io.h>
158 -#include <asm/bugs.h>
159 #include <asm/setup.h>
160 #include <asm/sections.h>
161 #include <asm/cacheflush.h>
162 @@ -1139,10 +1138,6 @@ asmlinkage __visible void __init __no_sanitize_address start_kernel(void)
163 delayacct_init();
164
165 arch_cpu_finalize_init();
166 - /* Temporary conditional until everything has been converted */
167 -#ifndef CONFIG_ARCH_HAS_CPU_FINALIZE_INIT
168 - check_bugs();
169 -#endif
170
171 acpi_subsystem_init();
172 arch_post_acpi_subsys_init();