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]
Message-ID: <20090504193624.GB17076@redhat.com>
Date:	Mon, 4 May 2009 21:36:24 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Roland McGrath <roland@...hat.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Jeff Dike <jdike@...toit.com>, utrace-devel@...hat.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] ptrace: do not use task_lock() for attach

On 05/04, Roland McGrath wrote:
>
> This looks good to me overall.  It might be worth slicing it into two or
> more patches, just for bisect paranoia.  (e.g. PF_KTHREAD; task_lock in
> ptrace_attach; task_lock in ptrace_traceme.)

OK,

> I think it merits a comment that the PF_KTHREAD check does not need any
> interlock because daemonize() will detach ptrace via reparent_to_kthreadd()
> after it sets PF_KTHREAD.  (vs the old ->mm check under task_lock.)

Agreed, but actually the patch doesn't make the difference wrt daemonize().
currently ptrace_attach() can take task_lock() just before daemonize() calls
exit_mm().

> It is worth noting that this changes the security_ptrace_traceme() call so
> it's no longer under task_lock().  I can't see any way the LSM hooks care,
> but it is a change.

Yes, good point.

> You also didn't mention the s/|=/=/ changes.  Those are correct, we've
> already agreed, but the commit log should mention that this subtle change
> was intentional.

Yes! Forgot to mention, thanks.

Oleg.

--
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