All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: siginfo & 32 bits compat, what is the story ?
Date: Mon, 19 Apr 2004 17:35:55 +1000	[thread overview]
Message-ID: <1082360155.1677.31.camel@gaston> (raw)

Hi folks !

So I've been playing around the siginfo copy code for 32 bits
processes on ppc64 and found some interesting stuffs that I don't
know how to fix at this point.

So I rewrote the routine copying a siginfo to a 32 bits one in
a way that is similar to s390 (that's part of the ppc64 message
queue patch I sent earlier). However, I just noticed we also do
the opposite conversion for the sys32_rt_sigqueueinfo syscall,
and we do it "the old way" (based on signal number, which is
apparently incorrect).

Now my question: What to copy ? I suppose I need at least to
be consistent between the 2 functions between what is done for
a userland siginfo. Right now, I am not. I followed Stephen
suggestions and I'm copying the whole padding after the first
3 fields in the 64 -> 32 bits copy, but the opposite conversion
function that I just noticed will explicitely copy/convert some
fields (si_pid, si_uid and si_int).

I looked at x86-64, and they always copy/convert those 3 fields,
never copy the rest of the siginfo. I looked at s390 and they do
the opposite: just copy the rest of the structure...

So I suppose I need to choose between those 2 methods and be
consistent between the 32->64 and 64->32 routines, but which one ?

Ben.



             reply	other threads:[~2004-04-19  7:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-19  7:35 Benjamin Herrenschmidt [this message]
2004-04-19 17:55 ` siginfo & 32 bits compat, what is the story ? Joe Korty
2004-04-19 22:02   ` Benjamin Herrenschmidt
     [not found] <1MBxZ-6l5-37@gated-at.bofh.it>
     [not found] ` <1MLe2-5WC-25@gated-at.bofh.it>
     [not found]   ` <1MP7P-UD-13@gated-at.bofh.it>
2004-04-19 22:44     ` Andi Kleen
2004-04-20  0:30       ` Benjamin Herrenschmidt

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=1082360155.1677.31.camel@gaston \
    --to=benh@kernel.crashing.org \
    --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.