[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5056FDD2.2080906@redhat.com>
Date: Mon, 17 Sep 2012 11:39:14 +0100
From: Pedro Alves <palves@...hat.com>
To: Roland McGrath <roland@...k.frob.com>
CC: Oleg Nesterov <oleg@...hat.com>,
Denys Vlasenko <vda.linux@...glemail.com>,
linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Amerigo Wang <amwang@...hat.com>
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists