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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 28 May 2009 01:05:23 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Roland McGrath <roland@...hat.com>
Cc:	Christoph Hellwig <hch@...radead.org>, Ingo Molnar <mingo@...e.hu>,
	linux-kernel@...r.kernel.org
Subject: ptrace && task->exit_code

I didn't realize this until yesterday, but perhaps it makes sense
to decouple ptrace && task_struct->exit_code?

If not - do not read further.

This is not completely trivial, needs another short series.

And. I spent a lot of time, but I can't see how to solve the problems
with TASK_STOPPED tasks if we do this change.

For the moment, forget that ->exit_code is used by do_exit/etc. Suppose
we just move task->exit_code into ptrace_task->xxx.

Now. The never traced task (->ptrace_task == NULL) stops and sleeps in
TASK_STOPPED.

The tracer attaches, and then ptrace_check_attach() changes its ->state
to TASK_TRACED. But what should we do to ensure do_wait() will succeed
later?

Currently wait_task_stopped(ptrace => 1) needs ->exit_code != 0. Perhaps
we can change ptrace_check_attach() to set ptrace_task->xxx if it is zero.

But can't we just change wait_task_stopped() to return success when
ptrace == T regardless of ->exit_code == 0 ? I guess, the answer is
"we can break things".

What do you think?

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