lkml.org 
[lkml]   [2012]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] coredump: add a new elf note with siginfo fields of the signal
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



\
 
 \ /
  Last update: 2012-09-17 13:21    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site