All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Friesen <cfriesen@nortel.com>
To: linux-kernel@vger.kernel.org, linuxppc64-dev@ozlabs.org
Subject: [BUG] in copy_siginfo_to_user32 on ppc64 (and others?) in 2.6.9/2.6.10
Date: Wed, 09 Feb 2005 14:05:09 -0600	[thread overview]
Message-ID: <420A6CF5.9040304@nortel.com> (raw)

I found a bug which has since been fixed, but I'm hoping to save others 
the problems that I had tracking it down.

It was fairly confusing--the information in the siginfo_t struct was 
different based on whether I used a signal handler in the regular way, 
or blocked the signal and retrieved the information using sigtimedwait().

After much instrumentation of the kernel, I tracked it down.

Until recently (Jan 5), ppc64 had its own version of 
compat_sys_rt_sigtimedwait, which simply called sys_rt_sigtimedwait() 
then copied the results to the userspace struct using 
copy_siginfo_to_user32().

Unfortunately, sys_rt_sigtimedwait() only copies the lower 16 bits of 
si_code, and the ppc64 version of copy_siginfo_to_user32() keyed on the 
upper 16 bits to decide what information to copy.  Thus, it always ended 
up in the default case of the switch statement, and only ever copied 
si_pid and si_uid.

Oops.

Chris


                 reply	other threads:[~2005-02-09 20:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=420A6CF5.9040304@nortel.com \
    --to=cfriesen@nortel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc64-dev@ozlabs.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.