[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221109200050.3400857-1-keescook@chromium.org>
Date: Wed, 9 Nov 2022 12:00:44 -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>,
Greg KH <gregkh@...uxfoundation.org>,
Linus Torvalds <torvalds@...uxfoundation.org>,
Seth Jenkins <sethjenkins@...gle.com>,
Andy Lutomirski <luto@...nel.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Arnd Bergmann <arnd@...db.de>, Marco Elver <elver@...gle.com>,
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>, Mel Gorman <mgorman@...e.de>,
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>,
Luis Chamberlain <mcgrof@...nel.org>,
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 v2 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>
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..129936511380 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)
+#if CONFIG_SYSCTL
static struct ctl_table kern_panic_table[] = {
+#if defined(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