security-misc/usr/libexec/security-misc/panic-on-oops
Patrick Schleizer 33114f771a
copyright
2024-12-31 13:26:21 -05:00

23 lines
763 B
Bash
Executable file

#!/bin/bash
## Copyright (C) 2019 - 2025 ENCRYPTED SUPPORT LLC <adrelanos@whonix.org>
## See the file COPYING for copying conditions.
set -e
if [ -f /usr/libexec/helper-scripts/pre.bsh ]; then
## pre.bsh would `source` the following folders:
## /etc/panic-on-oops_pre.d/*.conf
## /usr/local/etc/panic-on-oops_pre.d/*.conf
source /usr/libexec/helper-scripts/pre.bsh
fi
## Makes the kernel panic on oopses and warnings. This prevents the
## kernel from continuing to run a flawed processes. Many kernel
## exploits will also cause an oops, these settings will make the
## kernel kill the offending processes.
#sysctl kernel.panic=-1
sysctl kernel.panic_on_oops=1
sysctl kernel.panic_on_warn=1
#sysctl kernel.oops_limit=1
#sysctl kernel.warn_limit=1