[lkml]   [2012]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Compat 32-bit syscall entry from 64-bit task!?
On 01/26/2012 12:59 AM, Jamie Lokier wrote:
> Tracers mainly want to know if it's a 32-bit or 64-bit syscall, not
> whether it's compat as such.

Another idea, avoiding new PTRACE_EVENTs per arch, would be to make
the abi32/abi64/compat/whatnot discriminator retrievable with PTRACE_GETEVENTMSG
instead. So you'd get PTRACE_EVENT_SYSCALL_ENTRY|EXIT, or the regular old
0x80|SIGTRAP, you'd still fetch the syscall number from $orig_ax (or whatever means
for other archs), as usual, then have extra syscall info in PTRACE_GETEVENTMSG.
I don't know if it'd be simple to make it possible to do PTRACE_GETEVENTMSG
on a 0x80|SIGTRAP trap, but I imagine it so.

-> wait
-> read regs, find out syscall number
-> PTRACE_GETEVENTMSG, figure out which entry mode was used.

Pedro Alves

 \ /
  Last update: 2012-01-26 09:29    [W:0.240 / U:1.272 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site