lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 8 Feb 2009 19:47:27 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Jerome Marchand <jmarchan@...hat.com>,
	Roland McGrath <roland@...hat.com>,
	Denys Vlasenko <dvlasenk@...hat.com>,
	linux-kernel@...r.kernel.org
Subject: [PATCH 2/3] ptrace_untrace: use wake_up_process() instead of bogus
	signal_wake_up()

Both ptrace_stop() and do_signal_stop() pathes always take ->siglock and
do recalc_sigpending() after wakeup.

This means that if the tracer sees task_is_traced(child) == T (perhaps it
it was actually TASK_STOPPED before ptrace_check_attach) under ->siglock,
it can use the plain wake_up_process() instead of signal_wake_up().

(and note that ptrace_resume() does wake_up_process() too).

We also have sys_clone(CLONE_STOPPED), but a) it must set TIF_SIGPENDING
by hand anyway, and b) it is deprecated.

Signed-off-by: Oleg Nesterov <oleg@...hat.com>

--- 6.29-rc3/kernel/ptrace.c~2_KILL_SIGWAKE	2009-02-08 05:11:52.000000000 +0100
+++ 6.29-rc3/kernel/ptrace.c	2009-02-08 06:22:26.000000000 +0100
@@ -60,11 +60,10 @@ static void ptrace_untrace(struct task_s
 {
 	spin_lock(&child->sighand->siglock);
 	if (task_is_traced(child)) {
-		if (child->signal->flags & SIGNAL_STOP_STOPPED) {
+		if (child->signal->flags & SIGNAL_STOP_STOPPED)
 			__set_task_state(child, TASK_STOPPED);
-		} else {
-			signal_wake_up(child, 1);
-		}
+		else
+			wake_up_process(child);
 	}
 	spin_unlock(&child->sighand->siglock);
 }

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ