Skip to contentSkip to conversation

ia64: fix ptrace inside a namespace

PATCH In review [email protected] 3 participants 3 messages Mar 4, 2008 – Mar 6, 2008 ptrace support

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 ia64: fix ptrace inside a namespace

From: Pavel Emelyanov <[email protected]>

The ia64 has its own sys_ptrace implementation and it was overlooked when the pid namespaces patches were sent.

Use find_task_by_vpid() in it.

Cc "Eric W. Biederman" <[email protected]>
Cc "Luck, Tony" <[email protected]>

---

 arch/ia64/kernel/ptrace.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/ia64/kernel/ptrace.c renamed from arch/ia64/kernel/ptrace.c~ia64-fix-ptrace-inside-a-namespace +1 -1
diff -puN arch/ia64/kernel/ptrace.c~ia64-fix-ptrace-inside-a-namespace arch/ia64/kernel/ptrace.c
@@ -1561,7 +1561,7 @@ sys_ptrace (long request, pid_t pid, uns
 	ret = -ESRCH;
 	read_lock(&tasklist_lock);
 	{
-		child = find_task_by_pid(pid);
+		child = find_task_by_vpid(pid);
 		if (child) {
 			if (peek_or_poke)
 				child = find_thread_for_addr(child, addr);

_

#1 lore raw
Quoted 6 lines · On Tue, 2008-03-04 at 15:14 -0800, [email protected] wrote:

From: Pavel Emelyanov <[email protected]>

The ia64 has its own sys_ptrace implementation and it was overlooked when the pid namespaces patches were sent.

Use find_task_by_vpid() in it.

And there we are. If we don't push the ptrace() changes into mainline soon, mainline will drift away from us. :(

Cheers,
Petr Tesarik

Quoted 26 lines
Cc "Eric W. Biederman" <[email protected]>
Cc "Luck, Tony" <[email protected]>

---

 arch/ia64/kernel/ptrace.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN arch/ia64/kernel/ptrace.c~ia64-fix-ptrace-inside-a-namespace arch/ia64/kernel/ptrace.c

arch/ia64/kernel/ptrace.c renamed from arch/ia64/kernel/ptrace.c~ia64-fix-ptrace-inside-a-namespace +1 -1
@@ -1561,7 +1561,7 @@ sys_ptrace (long request, pid_t pid, uns
 	ret = -ESRCH;
 	read_lock(&tasklist_lock);
 	{
-		child = find_task_by_pid(pid);
+		child = find_task_by_vpid(pid);
 		if (child) {
 			if (peek_or_poke)
 				child = find_thread_for_addr(child, addr);

_
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
In reply to [email protected]
Quoted 2 lines

And there we are. If we don't push the ptrace() changes into mainline soon, mainline will drift away from us. :(

I staged your patches into my tree yesterday ... I'll push to Linus soon.

-Tony