* Re: [PATCH] ppc64: Fix 32 bits conversion of SI_TIMER signals
[not found] <200409260205.i8Q25pGb013827@hera.kernel.org>
@ 2004-09-26 6:58 ` Benjamin Herrenschmidt
2004-09-28 22:22 ` David S. Miller
0 siblings, 1 reply; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2004-09-26 6:58 UTC (permalink / raw)
To: Andrew Morton; +Cc: Linus Torvalds, Linux Kernel list
On Sun, 2004-09-26 at 11:41, Linux Kernel Mailing List wrote:
> ChangeSet 1.1991, 2004/09/25 18:41:38-07:00, benh@kernel.crashing.org
>
> [PATCH] ppc64: Fix 32 bits conversion of SI_TIMER signals
>
> The current 32 bits translation of the SI_TIMER is wrong on ppc64, causing
> the tst-timer4 testcase of glibc to fail in 32 bits. This patch fixes it.
>
> Signed-off-by: Olaf Hering <olh@suse.de>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
>
Agh !
I had two patches, a broken one and a good one and ... of course I sent
the broken one, sorry :(
Can you still back it out ?
Here is the correct one:
ppc64: Fix 32 bits conversion of SI_TIMER signals
The current 32 bits translation of the SI_TIMER is wrong on ppc64, causing
the tst-timer4 testcase of glibc to fail in 32 bits. This patch fixes it.
Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
===== arch/ppc64/kernel/signal32.c 1.57 vs edited =====
--- 1.57/arch/ppc64/kernel/signal32.c 2004-09-14 10:23:15 +10:00
+++ edited/arch/ppc64/kernel/signal32.c 2004-09-26 16:57:11 +10:00
@@ -472,9 +472,13 @@
&d->si_addr);
break;
case __SI_POLL >> 16:
- case __SI_TIMER >> 16:
err |= __put_user(s->si_band, &d->si_band);
err |= __put_user(s->si_fd, &d->si_fd);
+ break;
+ case __SI_TIMER >> 16:
+ err |= __put_user(s->si_tid, &d->si_tid);
+ err |= __put_user(s->si_overrun, &d->si_overrun);
+ err |= __put_user(s->si_int, &d->si_int);
break;
case __SI_RT >> 16: /* This is not generated by the kernel as of now. */
case __SI_MESGQ >> 16:
===== include/asm-ppc64/ppc32.h 1.16 vs edited =====
--- 1.16/include/asm-ppc64/ppc32.h 2004-09-17 16:58:38 +10:00
+++ edited/include/asm-ppc64/ppc32.h 2004-09-26 09:37:49 +10:00
@@ -32,8 +32,10 @@
/* POSIX.1b timers */
struct {
- unsigned int _timer1;
- unsigned int _timer2;
+ timer_t _tid; /* timer id */
+ int _overrun; /* overrun count */
+ compat_sigval_t _sigval; /* same as below */
+ int _sys_private; /* not to be passed to user */
} _timer;
/* POSIX.1b signals */
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] ppc64: Fix 32 bits conversion of SI_TIMER signals
2004-09-26 6:58 ` [PATCH] ppc64: Fix 32 bits conversion of SI_TIMER signals Benjamin Herrenschmidt
@ 2004-09-28 22:22 ` David S. Miller
2004-09-28 23:13 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 8+ messages in thread
From: David S. Miller @ 2004-09-28 22:22 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linux-arch
Ben, have you taken a quick look to see if any other
platforms doing compat stuff need a fix like this as
well? If not, could you do so real quick? Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ppc64: Fix 32 bits conversion of SI_TIMER signals
2004-09-28 22:22 ` David S. Miller
@ 2004-09-28 23:13 ` Benjamin Herrenschmidt
2004-10-03 21:46 ` David S. Miller
0 siblings, 1 reply; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2004-09-28 23:13 UTC (permalink / raw)
To: David S. Miller; +Cc: Linux Arch list
On Wed, 2004-09-29 at 08:22, David S. Miller wrote:
> Ben, have you taken a quick look to see if any other
> platforms doing compat stuff need a fix like this as
> well? If not, could you do so real quick? Thanks.
Olaf signaled me some other failures of glibc make check, so I
need to spend more time on that.
As far as SI_TIMER is concerned, I first copied the sparc64 "fix" and it
appeared to be wrong, I'm not sure at this point if it's a different
alignement of the int and the void * in the union or if the sparc fix
was just wrong in the first place.
Ben.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ppc64: Fix 32 bits conversion of SI_TIMER signals
2004-09-28 23:13 ` Benjamin Herrenschmidt
@ 2004-10-03 21:46 ` David S. Miller
0 siblings, 0 replies; 8+ messages in thread
From: David S. Miller @ 2004-10-03 21:46 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linux-arch
On Wed, 29 Sep 2004 09:13:38 +1000
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> As far as SI_TIMER is concerned, I first copied the sparc64 "fix" and it
> appeared to be wrong, I'm not sure at this point if it's a different
> alignement of the int and the void * in the union or if the sparc fix
> was just wrong in the first place.
Ok, I'm now using the same code as ppc64 on sparc64.
Thanks for working on this and explaining things.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] ppc64: Fix 32 bits conversion of SI_TIMER signals
@ 2004-09-25 23:46 Benjamin Herrenschmidt
2004-09-26 9:40 ` Olaf Hering
0 siblings, 1 reply; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2004-09-25 23:46 UTC (permalink / raw)
To: Andrew Morton; +Cc: Linus Torvalds, Linux Kernel list, Olaf Hering
Hi !
The current 32 bits translation of the SI_TIMER is wrong on ppc64, causing
the tst-timer4 testcase of glibc to fail in 32 bits. This patch fixes it.
Signed-off-by: Olaf Hering <olh@suse.de>
Signed-ogg-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
===== arch/ppc64/kernel/signal32.c 1.57 vs edited =====
--- 1.57/arch/ppc64/kernel/signal32.c 2004-09-14 10:23:15 +10:00
+++ edited/arch/ppc64/kernel/signal32.c 2004-09-26 09:37:48 +10:00
@@ -472,9 +472,13 @@
&d->si_addr);
break;
case __SI_POLL >> 16:
- case __SI_TIMER >> 16:
err |= __put_user(s->si_band, &d->si_band);
err |= __put_user(s->si_fd, &d->si_fd);
+ break;
+ case __SI_TIMER >> 16:
+ err |= __put_user(s->si_tid, &d->si_tid);
+ err |= __put_user(s->si_overrun, &d->si_overrun);
+ err |= __put_user((u32)(u64)s->si_ptr, &d->si_ptr);
break;
case __SI_RT >> 16: /* This is not generated by the kernel as of now. */
case __SI_MESGQ >> 16:
===== include/asm-ppc64/ppc32.h 1.16 vs edited =====
--- 1.16/include/asm-ppc64/ppc32.h 2004-09-17 16:58:38 +10:00
+++ edited/include/asm-ppc64/ppc32.h 2004-09-26 09:37:49 +10:00
@@ -32,8 +32,10 @@
/* POSIX.1b timers */
struct {
- unsigned int _timer1;
- unsigned int _timer2;
+ timer_t _tid; /* timer id */
+ int _overrun; /* overrun count */
+ compat_sigval_t _sigval; /* same as below */
+ int _sys_private; /* not to be passed to user */
} _timer;
/* POSIX.1b signals */
--
Benjamin Herrenschmidt <benh@kernel.crashing.org>
--
Benjamin Herrenschmidt <benh@kernel.crashing.org>
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] ppc64: Fix 32 bits conversion of SI_TIMER signals
2004-09-25 23:46 Benjamin Herrenschmidt
@ 2004-09-26 9:40 ` Olaf Hering
2004-09-26 12:08 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 8+ messages in thread
From: Olaf Hering @ 2004-09-26 9:40 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: Andrew Morton, Linus Torvalds, Linux Kernel list
On Sun, Sep 26, Benjamin Herrenschmidt wrote:
> + err |= __put_user((u32)(u64)s->si_ptr, &d->si_ptr);
That one surely doesnt work. Let me try it again.
--
USB is for mice, FireWire is for men!
sUse lINUX ag, nÜRNBERG
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ppc64: Fix 32 bits conversion of SI_TIMER signals
2004-09-26 9:40 ` Olaf Hering
@ 2004-09-26 12:08 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2004-09-26 12:08 UTC (permalink / raw)
To: Olaf Hering; +Cc: Andrew Morton, Linus Torvalds, Linux Kernel list
On Sun, 2004-09-26 at 19:40, Olaf Hering wrote:
> On Sun, Sep 26, Benjamin Herrenschmidt wrote:
>
> > + err |= __put_user((u32)(u64)s->si_ptr, &d->si_ptr);
>
> That one surely doesnt work. Let me try it again.
Yup, my bad, see my other mail, I sent the wrong patch :(
Ben.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] ppc64: Fix 32 bits conversion of SI_TIMER signals
@ 2004-09-25 23:45 Benjamin Herrenschmidt
0 siblings, 0 replies; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2004-09-25 23:45 UTC (permalink / raw)
To: Andrew Morton; +Cc: Linus Torvalds, Linux Kernel list, Olaf Hering
Hi !
The current 32 bits translation of the SI_TIMER is wrong on ppc64, causing
the tst-timer4 testcase of glibc to fail in 32 bits. This patch fixes it.
Signed-off-by: Olaf Hering <olh@suse.de>
Signed-ogg-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
===== arch/ppc64/kernel/signal32.c 1.57 vs edited =====
--- 1.57/arch/ppc64/kernel/signal32.c 2004-09-14 10:23:15 +10:00
+++ edited/arch/ppc64/kernel/signal32.c 2004-09-26 09:37:48 +10:00
@@ -472,9 +472,13 @@
&d->si_addr);
break;
case __SI_POLL >> 16:
- case __SI_TIMER >> 16:
err |= __put_user(s->si_band, &d->si_band);
err |= __put_user(s->si_fd, &d->si_fd);
+ break;
+ case __SI_TIMER >> 16:
+ err |= __put_user(s->si_tid, &d->si_tid);
+ err |= __put_user(s->si_overrun, &d->si_overrun);
+ err |= __put_user((u32)(u64)s->si_ptr, &d->si_ptr);
break;
case __SI_RT >> 16: /* This is not generated by the kernel as of now. */
case __SI_MESGQ >> 16:
===== include/asm-ppc64/ppc32.h 1.16 vs edited =====
--- 1.16/include/asm-ppc64/ppc32.h 2004-09-17 16:58:38 +10:00
+++ edited/include/asm-ppc64/ppc32.h 2004-09-26 09:37:49 +10:00
@@ -32,8 +32,10 @@
/* POSIX.1b timers */
struct {
- unsigned int _timer1;
- unsigned int _timer2;
+ timer_t _tid; /* timer id */
+ int _overrun; /* overrun count */
+ compat_sigval_t _sigval; /* same as below */
+ int _sys_private; /* not to be passed to user */
} _timer;
/* POSIX.1b signals */
--
Benjamin Herrenschmidt <benh@kernel.crashing.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-10-03 21:49 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200409260205.i8Q25pGb013827@hera.kernel.org>
2004-09-26 6:58 ` [PATCH] ppc64: Fix 32 bits conversion of SI_TIMER signals Benjamin Herrenschmidt
2004-09-28 22:22 ` David S. Miller
2004-09-28 23:13 ` Benjamin Herrenschmidt
2004-10-03 21:46 ` David S. Miller
2004-09-25 23:46 Benjamin Herrenschmidt
2004-09-26 9:40 ` Olaf Hering
2004-09-26 12:08 ` Benjamin Herrenschmidt
-- strict thread matches above, loose matches on Subject: below --
2004-09-25 23:45 Benjamin Herrenschmidt
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.