All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Albert Cahalan" <acahalan@gmail.com>
To: ak@muc.de, ak@suse.de, linux-kernel@vger.kernel.org
Subject: 32-on-64 (x86-64) siginfo corruption
Date: Wed, 5 Apr 2006 23:20:07 -0400	[thread overview]
Message-ID: <787b0d920604052020rdaa5146q58720e7fd82ce0bb@mail.gmail.com> (raw)

The situation:  32-bit debugger, 32-bit child, 64-bit kernel

The debugger sends an RT signal to the child. (to stop it, with
a queue and siginfo so that non-debugger signals don't get lost)
To do this, the debugger uses tgkill().

Later, the debugger checks the child's siginfo_t before discarding
it. This is to be sure that the child didn't get the RT signal from
some other source. The debugger fills a siginfo_t with 0xff, then
fetches siginfo data via ptrace. The data is corrupt:

FIELD     32-ON-64   NORMAL
si_pid      -1       getpid()
si_uid    getpid()   getuid()

The "getpid" and "getuid" above are done in the debugger, not in
the child. The si_code values are SI_TKILL.

Probably the other ports with 32-on-64 support ought to verify
that this stuff works right.

             reply	other threads:[~2006-04-06  3:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-06  3:20 Albert Cahalan [this message]
2006-04-06  4:41 ` 32-on-64 (x86-64) siginfo corruption David S. Miller

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=787b0d920604052020rdaa5146q58720e7fd82ce0bb@mail.gmail.com \
    --to=acahalan@gmail.com \
    --cc=ak@muc.de \
    --cc=ak@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.