On 09/13/2012 06:25 PM, Roland McGrath wrote: > I agree with Oleg. If there is an NT_SIGINFO note, it should contain > exactly the siginfo_t layout and data that we otherwise expose to userland > already. That is, it must match what PTRACE_GETSIGINFO reports, which (I > think) also matches exactly what appears on the stack for a signal > delivery.
Agreed. Please. One note though: PTRACE_GETSIGINFO always returns the siginfo_t in the architecture/bitness of the kernel. IOW, PTRACE_GETSIGINFO on a 32-bit debuggee, running on a 64-bit kernel, returns the siginfo_t in 64-bit layout. IOW, copy_siginfo_to_user32 doesn't apply). Or maybe that's the architecture of the tracer, instead of the kernel. Haven't really checked. In any case, GDB has to basically duplicate the kernel's copy_siginfo_to_user/from_user for each supported arch (that does biarch) because of this, for "(gdb) print $_siginfo". I wish we had a PTRACE_GETSIGINFO variant that returned the siginfo_t in layout of the program, not the kernel's.. > Note also that compat_binfmt_elf must deliver the 32-bit version > of siginfo_t, i.e. as copy_siginfo_to_user32 does. -- Pedro Alves -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/