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] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 28 Jan 2008 01:45:34 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Pavel Emelyanov <xemul@...nvz.org>
Cc:	Vinay Sridhar <vinay@...ux.vnet.ibm.com>,
	linux-kernel@...r.kernel.org, libc-alpha@...rceware.org,
	drepper@...hat.com, wli@...omorphy.com, sripathik@...ibm.com,
	"Eric W. Biederman" <ebiederm@...ssion.com>
Subject: Re: [RFC] Per-thread getrusage

On Mon, 28 Jan 2008 12:38:17 +0300 Pavel Emelyanov <xemul@...nvz.org> wrote:

> > If the code was using find_task_by_vpid() then OK (I guess).  But it is
> 
> Yup, find_task_by_vpid() will find the proper (i.e. in your namespace) task.
> 
> > looking the tids up in the init_pid_ns.  Which I assume means that if it's
> > in a new namespace and is looking up a sibling thread it will simply fail?
> 
> If it looks in the init_pid_ns, then it can either fail or obtain a task 
> from different namespace. The find_task_by_pid_ns() was intended to be used
> in proc mainly, to get tasks from the namespace pointed by the super-block
> being explored.
> 
> Please excuse my lamentable ignorance, but which code does such things with
> init_pid_ns? I followed the 'per-thread rusage' thread and didn't find any.

From: Vinay Sridhar <vinay@...ux.vnet.ibm.com>
To: linux-kernel@...r.kernel.org, libc-alpha@...rceware.org
Cc: drepper@...hat.com, wli@...omorphy.com, akpm@...ux-foundation.org, sripathik@...ibm.com
Subject: [RFC] Per-thread getrusage
...
+asmlinkage long sys_thread_getrusage(int tid, struct rusage __user *ru)
+{
+	struct task_struct *tsk;
+	tsk = find_task_by_pid(tid);
+	return getrusage(tsk, RUSAGE_THREAD, ru);
+}


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