Skip to content

Commit 5a477e9

Browse files
committed
sysctl: Move sysctl_panic_on_stackoverflow to kernel/panic.c
This is part of a greater effort to move ctl tables into their respective subsystems which will reduce the merge conflicts in kernel/sysctl.c. Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Joel Granados <[email protected]>
1 parent e054bcb commit 5a477e9

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

kernel/panic.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,16 @@ static const struct ctl_table kern_panic_table[] = {
183183
.mode = 0644,
184184
.proc_handler = proc_douintvec,
185185
},
186+
#if (defined(CONFIG_X86_32) || defined(CONFIG_PARISC)) && \
187+
defined(CONFIG_DEBUG_STACKOVERFLOW)
188+
{
189+
.procname = "panic_on_stackoverflow",
190+
.data = &sysctl_panic_on_stackoverflow,
191+
.maxlen = sizeof(int),
192+
.mode = 0644,
193+
.proc_handler = proc_dointvec,
194+
},
195+
#endif
186196
};
187197

188198
static __init int kernel_panic_sysctls_init(void)

kernel/sysctl.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1552,16 +1552,6 @@ static const struct ctl_table kern_table[] = {
15521552
.mode = 0444,
15531553
.proc_handler = proc_dointvec,
15541554
},
1555-
#if (defined(CONFIG_X86_32) || defined(CONFIG_PARISC)) && \
1556-
defined(CONFIG_DEBUG_STACKOVERFLOW)
1557-
{
1558-
.procname = "panic_on_stackoverflow",
1559-
.data = &sysctl_panic_on_stackoverflow,
1560-
.maxlen = sizeof(int),
1561-
.mode = 0644,
1562-
.proc_handler = proc_dointvec,
1563-
},
1564-
#endif
15651555
#ifdef CONFIG_SYSCTL_ARCH_UNALIGN_NO_WARN
15661556
{
15671557
.procname = "ignore-unaligned-usertrap",

0 commit comments

Comments
 (0)