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:	Fri, 10 Feb 2012 03:02:51 +0000
From:	Jamie Lokier <jamie@...reable.org>
To:	Jan Kratochvil <jan.kratochvil@...hat.com>
Cc:	Andrew Vagin <avagin@...il.com>, Pedro Alves <palves@...hat.com>,
	Oleg Nesterov <oleg@...hat.com>,
	Pavel Emelyanov <xemul@...allels.com>,
	Tejun Heo <tj@...nel.org>, Andrew Vagin <avagin@...nvz.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Cyrill Gorcunov <gorcunov@...nvz.org>
Subject: Re: [PATCH] ptrace: add ability to get clear_tid_address

Jan Kratochvil wrote:
> On Wed, 08 Feb 2012 14:41:45 +0100, Andrew Vagin wrote:
> > I want to say, that when you have trouble with child_tid_address,
> > you may want to get it.
> > If the code is your, you may get it via prctl, but if it's not, what
> > will you do?
> 
> GDB does PTRACE_ARCH_PRCTL (amd64-linux-nat.c) - without inserting any code
> into the debuggee.  How it can be simplified more?

That's x86-64 only, (although bizarrely it looks like 32-bit tasks can
use it too, if running on a 64-bit kernel).

Whereas child_tid_address is for all architectures.

We've already got a whole syscall, get_robust_list(), which fetches
that address from a remote process if you have ptrace permission, and
you don't even need to be ptracing it!  get_robust_list() is quite
large, and most of it is permission checks.  How often is that useful?

I don't see why getting the child_tid_address should be a big deal.

On the other hand, lots of little bits of info would be handy to a
ptracer sometimes, such as the current signal mask and prctl settings.

Maybe what's needed is a generic PTRACE_PRCTL, allowed to call a
subset of prctl() functions from outside, or maybe even all of them.

Then add child_tid_address as a prctl.

( Then again maybe just skip the messing around that everyone does with
"parasite" code, and go straight for PTRACE_CALL_SYSCALL.  It'd save a
lot of bother :-) )

All the best,
-- Jamie
--
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