Thread (30 messages) 30 messages, 12 authors, 2022-07-27

Re: [PATCH] Introduce the pkill_on_warn boot parameter

From: Al Viro <viro@zeniv.linux.org.uk>
Date: 2021-10-02 18:22:14
Also in: linux-hardening, lkml

On Wed, Sep 29, 2021 at 09:58:23PM +0300, Alexander Popov wrote:
quoted hunk ↗ jump to hunk
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -53,6 +53,7 @@ static int pause_on_oops_flag;
 static DEFINE_SPINLOCK(pause_on_oops_lock);
 bool crash_kexec_post_notifiers;
 int panic_on_warn __read_mostly;
+int pkill_on_warn __read_mostly;
 unsigned long panic_on_taint;
 bool panic_on_taint_nousertaint = false;
 
@@ -610,6 +611,9 @@ void __warn(const char *file, int line, void *caller, unsigned taint,
 
 	print_oops_end_marker();
 
+	if (pkill_on_warn && system_state >= SYSTEM_RUNNING)
+		do_group_exit(SIGKILL);
+
Wait a sec...  do_group_exit() is very much not locking-neutral.
Aren't you introducing a bunch of potential deadlocks by adding
that?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help