Skip to contentSkip to conversation

ptrace: system call number interpretation during PTRACE_SET_SYSCALL request handling

RFC New Kirill A. Shutemov 2 participants 4 messages Sep 15, 2009 – Sep 17, 2009 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 8 lines · Russell King - ARM Linux
Quoted 3 lines · Volodymyr G. Lukiianyk

I've encountered a problem while running strace on the kernel with CONFIG_AEABI not set. This problem can be worked around in userspace, but it looks like the correct place for a fix is the kernel.

I'm really nervous about this. ?I need to check what my own strace patches do - and if they don't suffer from this problem I'd say that the bug lies in userspace.

Any results? Do we need to workaround it in user space or it will be fixed in kernel?

Quoted 9 lines

Yes, for a long time I've had patches to strace to add proper ARM support and fix a load of issues with it, but I've never been able to get them integrated into strace itself.

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ: ? ? ? ?http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette: ?http://www.arm.linux.org.uk/mailinglists/etiquette.php

#3 lore raw
Quoted 7 lines · Kirill A. Shutemov
Quoted 5 lines · Russell King - ARM Linux
Quoted 3 lines · Volodymyr G. Lukiianyk

I've encountered a problem while running strace on the kernel with CONFIG_AEABI not set. This problem can be worked around in userspace, but it looks like the correct place for a fix is the kernel.

Quoted 6 lines
Quoted 3 lines

I'm really nervous about this. ?I need to check what my own strace patches do - and if they don't suffer from this problem I'd say that the bug lies in userspace.

Any results? Do we need to workaround it in user space or it will be fixed in kernel?

Russell?

#4 lore raw
Quoted 9 lines · Kirill A. Shutemov
Quoted 7 lines · Kirill A. Shutemov
Quoted 5 lines · Russell King - ARM Linux
Quoted 3 lines · Volodymyr G. Lukiianyk

I've encountered a problem while running strace on the kernel with CONFIG_AEABI not set. This problem can be worked around in userspace, but it looks like the correct place for a fix is the kernel.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

I'm really nervous about this. ?I need to check what my own strace patches do - and if they don't suffer from this problem I'd say that the bug lies in userspace.

Any results? Do we need to workaround it in user space or it will be fixed in kernel?

Russell?

I've not really been around much the last three days.

What was the issue again?

#5 lore raw

RFC 1/1 ptrace: system call number interpretation during PTRACE_SET_SYSCALL request handling

Quoted 14 lines · Russell King - ARM Linux
Quoted 13 lines · Kirill A. Shutemov
Quoted 11 lines · Kirill A. Shutemov
Quoted 8 lines · Russell King - ARM Linux
Quoted 3 lines · Volodymyr G. Lukiianyk

I've encountered a problem while running strace on the kernel with CONFIG_AEABI not set. This problem can be worked around in userspace, but it looks like the correct place for a fix is the kernel.

I'm really nervous about this. ?I need to check what my own strace patches do - and if they don't suffer from this problem I'd say that the bug lies in userspace.

Quoted 9 lines
Quoted 4 lines
Quoted 2 lines

Any results? Do we need to workaround it in user space or it will be fixed in kernel?

Russell?

I've not really been around much the last three days.

What was the issue again?

It's about this patch for strace:

Syscall numbers do not start at 0 for OABI, so need to mask off the high order bits when changing syscall

process.c +1 -1
index 23bd413..dd5464f 100644
@@ -792,7 +792,7 @@ change_syscall(struct tcb *tcp, int new)
 #  define PTRACE_SET_SYSCALL 23
 # endif
 
-       if (ptrace (PTRACE_SET_SYSCALL, tcp->pid, 0, new) != 0)
+       if (ptrace (PTRACE_SET_SYSCALL, tcp->pid, 0, new & 0xFFFF) != 0)
               return -1;
 
       return 0;

--

Should it be applied or kernel will be fixed?