[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221117234328.594699-1-keescook@chromium.org>
Date: Thu, 17 Nov 2022 15:43:21 -0800
From: Kees Cook <keescook@...omium.org>
To: Jann Horn <jannh@...gle.com>
Cc: Kees Cook <keescook@...omium.org>, Petr Mladek <pmladek@...e.com>,
Andrew Morton <akpm@...ux-foundation.org>,
tangmeng <tangmeng@...ontech.com>,
"Guilherme G. Piccoli" <gpiccoli@...lia.com>,
Tiezhu Yang <yangtiezhu@...ngson.cn>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Luis Chamberlain <mcgrof@...nel.org>,
Seth Jenkins <sethjenkins@...gle.com>,
Greg KH <gregkh@...uxfoundation.org>,
Linus Torvalds <torvalds@...uxfoundation.org>,
Andy Lutomirski <luto@...nel.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Arnd Bergmann <arnd@...db.de>,
Dmitry Vyukov <dvyukov@...gle.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Valentin Schneider <vschneid@...hat.com>,
Andrey Ryabinin <ryabinin.a.a@...il.com>,
Alexander Potapenko <glider@...gle.com>,
Andrey Konovalov <andreyknvl@...il.com>,
Vincenzo Frascino <vincenzo.frascino@....com>,
David Gow <davidgow@...gle.com>,
"Paul E. McKenney" <paulmck@...nel.org>,
Jonathan Corbet <corbet@....net>,
Baolin Wang <baolin.wang@...ux.alibaba.com>,
"Jason A. Donenfeld" <Jason@...c4.com>,
Eric Biggers <ebiggers@...gle.com>,
Huang Ying <ying.huang@...el.com>,
Anton Vorontsov <anton@...msg.org>,
Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
Laurent Dufour <ldufour@...ux.ibm.com>,
Rob Herring <robh@...nel.org>, linux-kernel@...r.kernel.org,
kasan-dev@...glegroups.com, linux-mm@...ck.org,
linux-doc@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: [PATCH v3 1/6] panic: Separate sysctl logic from CONFIG_SMP
In preparation for adding more sysctls directly in kernel/panic.c, split
CONFIG_SMP from the logic that adds sysctls.
Cc: Petr Mladek <pmladek@...e.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: tangmeng <tangmeng@...ontech.com>
Cc: "Guilherme G. Piccoli" <gpiccoli@...lia.com>
Cc: Tiezhu Yang <yangtiezhu@...ngson.cn>
Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Reviewed-by: Luis Chamberlain <mcgrof@...nel.org>
Signed-off-by: Kees Cook <keescook@...omium.org>
---
kernel/panic.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/panic.c b/kernel/panic.c
index da323209f583..d843d036651e 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -75,8 +75,9 @@ ATOMIC_NOTIFIER_HEAD(panic_notifier_list);
EXPORT_SYMBOL(panic_notifier_list);
-#if defined(CONFIG_SMP) && defined(CONFIG_SYSCTL)
+#ifdef CONFIG_SYSCTL
static struct ctl_table kern_panic_table[] = {
+#ifdef CONFIG_SMP
{
.procname = "oops_all_cpu_backtrace",
.data = &sysctl_oops_all_cpu_backtrace,
@@ -86,6 +87,7 @@ static struct ctl_table kern_panic_table[] = {
.extra1 = SYSCTL_ZERO,
.extra2 = SYSCTL_ONE,
},
+#endif
{ }
};
--
2.34.1
Powered by blists - more mailing lists