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-prev] [day] [month] [year] [list]
Date:	Thu,  6 Mar 2008 00:09:02 -0800 (PST)
From:	Roland McGrath <roland@...hat.com>
To:	Oleg Nesterov <oleg@...sign.ru>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] introduce ptrace_reparented() helper

> I am planning to do some changes in forget_original_parent (fix 2 very
> old minor bugs and _perhaps_ add some improvement). I hit the minor but
> nasty problem: this open coded __ptrace_unlink() in reparent_thread().
> _This_ is the actual reason for this patch.
> 
> So. Would you object if I do
> 
> 	--- kernel/ptrace.c	2008-03-03 17:01:06.000000000 +0300
> 	+++ kernel/ptrace.c	2008-03-05 20:22:44.801142777 +0300
> 	@@ -67,11 +67,12 @@ void ptrace_untrace(struct task_struct *
> 	  * remove it from the ptrace list.
> 	  *
> 	  * Must be called with the tasklist lock write-held.
> 	+ *
> 	+ * Either the caller is ptracer, or the caller is ->real_parent
> 	+ * and the child is not traced.
> 	  */
> 	 void __ptrace_unlink(struct task_struct *child)
> 	 {
> 	-	BUG_ON(!child->ptrace);
> 	-
> 		child->ptrace = 0;
> 		if (ptrace_reparented(child)) {
> 			list_del_init(&child->ptrace_list);
> 
> ?

That seems ok.  The duplication of magic in reparent_thread is indeed bad.
I don't think this BUG_ON is buying us much if we haven't hit it in a long
time.


Thanks,
Roland
--
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