From: Pedro Alves <palves@redhat.com>
To: Roland McGrath <roland@hack.frob.com>
Cc: Oleg Nesterov <oleg@redhat.com>,
Denys Vlasenko <vda.linux@googlemail.com>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Amerigo Wang <amwang@redhat.com>
Subject: Re: [PATCH 2/2] coredump: add a new elf note with siginfo fields of the signal
Date: Mon, 17 Sep 2012 11:39:14 +0100 [thread overview]
Message-ID: <5056FDD2.2080906@redhat.com> (raw)
In-Reply-To: <20120913172511.A69262C09C@topped-with-meat.com>
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
next prev parent reply other threads:[~2012-09-17 10:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-12 23:38 [PATCH 1/2] coredump: pass siginfo_t* to do_coredump() and below, not merely signr Denys Vlasenko
2012-09-12 23:38 ` [PATCH 2/2] coredump: add a new elf note with siginfo fields of the signal Denys Vlasenko
2012-09-13 15:36 ` Oleg Nesterov
2012-09-13 15:52 ` Oleg Nesterov
2012-09-13 17:25 ` Roland McGrath
2012-09-17 10:39 ` Pedro Alves [this message]
2012-09-14 12:27 ` Denys Vlasenko
2012-09-14 16:38 ` Roland McGrath
2012-09-13 15:08 ` [PATCH 1/2] coredump: pass siginfo_t* to do_coredump() and below, not merely signr Oleg Nesterov
2012-09-13 14:31 [PATCH 2/2] coredump: add a new elf note with siginfo fields of the signal Jonathan M. Foote
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5056FDD2.2080906@redhat.com \
--to=palves@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=amwang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=roland@hack.frob.com \
--cc=vda.linux@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).