linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Anton Blanchard <anton@samba.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: sizeof (siginfo_t) problem
Date: Mon, 21 Jul 2003 10:08:19 +1000	[thread overview]
Message-ID: <20030721100819.11584560.sfr@canb.auug.org.au> (raw)
In-Reply-To: <20030719183254.GE25703@krispykreme>

Hi Anton,

On Sun, 20 Jul 2003 04:32:54 +1000 Anton Blanchard <anton@samba.org> wrote:
>
> Hi Stephen,
> 
> > I am not sure if the s390 fix is correct (since s390x has been merged) or
> > if x86_64 needs this (as I cannot remember the alignment needs of the
> > x86_64 compiler - though I suspect it is needed).
> 
> I didnt follow this thread very carefully :) Is ppc64 broken?

It is broken subtly (but noone would probably notice :-)).  It is OK
on the structure size, but copy_siginfo will copy sizeof(int) bytes less
than necessary sometimes (particularly in the case of a SIGCHILD).

You need the following patch (against 2.6.0-test1-bk2 but should apply
to just about anything).
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff -ruN 2.6.0-test1-bk2/include/asm-ppc64/siginfo.h 2.6.0-test1-bk2-sfr.1/include/asm-ppc64/siginfo.h
--- 2.6.0-test1-bk2/include/asm-ppc64/siginfo.h	2002-11-05 17:00:34.000000000 +1100
+++ 2.6.0-test1-bk2-sfr.1/include/asm-ppc64/siginfo.h	2003-07-21 09:59:04.000000000 +1000
@@ -8,8 +8,8 @@
  * 2 of the License, or (at your option) any later version.
  */
 
-#define SI_PAD_SIZE    ((SI_MAX_SIZE/sizeof(int)) - 4)
-#define SI_PAD_SIZE32  ((SI_MAX_SIZE/sizeof(int)) - 3)
+#define __ARCH_SI_PREAMBLE_SIZE	(4 * sizeof(int))
+#define SI_PAD_SIZE32		((SI_MAX_SIZE/sizeof(int)) - 3)
 
 #include <asm-generic/siginfo.h>
 

  reply	other threads:[~2003-07-20 23:53 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-14 12:40 sizeof (siginfo_t) problem Jakub Jelinek
2003-07-14 13:55 ` Jamie Lokier
2003-07-14 15:02   ` Andreas Schwab
2003-07-14 15:48 ` David Mosberger
2003-07-14 15:57   ` Jakub Jelinek
2003-07-14 16:52 ` Stephen Rothwell
2003-07-14 17:00   ` Jakub Jelinek
2003-07-14 17:11     ` Stephen Rothwell
2003-07-14 17:14       ` Jakub Jelinek
2003-07-14 17:25         ` Stephen Rothwell
2003-07-14 17:45           ` Jakub Jelinek
2003-07-19 18:32   ` Anton Blanchard
2003-07-21  0:08     ` Stephen Rothwell [this message]
2003-07-22 13:42       ` Russell King
2003-07-22 13:57         ` Stephen Rothwell
2003-07-14 18:31 Ulrich Weigand
2003-07-14 18:35 ` Jakub Jelinek
2003-07-14 18:52 Ulrich Weigand
2003-07-15 11:58 Martin Schwidefsky

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=20030721100819.11584560.sfr@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=anton@samba.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 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).