Commit 7a0171fe authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Linus Torvalds

[PATCH] s390: compat SI_TIMER conversion

tst-timer4 from the glibc fails in the 32bit compat execution environment. 
This is due to a incomplete siginfo structure for POSIX.1b timers in
compat_signal.c.
Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 24386225
......@@ -50,9 +50,10 @@ typedef struct compat_siginfo {
/* POSIX.1b timers */
struct {
unsigned int _timer1;
unsigned int _timer2;
timer_t _tid; /* timer id */
int _overrun; /* overrun count */
sigval_t _sigval; /* same as below */
int _sys_private; /* not to be passed to user */
} _timer;
/* POSIX.1b signals */
......@@ -98,6 +99,8 @@ typedef struct compat_siginfo {
#define si_addr _sifields._sigfault._addr
#define si_band _sifields._sigpoll._band
#define si_fd _sifields._sigpoll._fd
#define si_tid _sifields._timer._tid
#define si_overrun _sifields._timer._overrun
/* asm/sigcontext.h */
typedef union
......
......@@ -95,10 +95,14 @@ int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from)
&to->si_addr);
break;
case __SI_POLL >> 16:
case __SI_TIMER >> 16:
err |= __put_user(from->si_band, &to->si_band);
err |= __put_user(from->si_fd, &to->si_fd);
break;
case __SI_TIMER >> 16:
err |= __put_user(from->si_tid, &to->si_tid);
err |= __put_user(from->si_overrun, &to->si_overrun);
err |= __put_user(from->si_int, &to->si_int);
break;
default:
break;
}
......@@ -142,10 +146,14 @@ int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from)
to->si_addr = (void *)(u64) (tmp & PSW32_ADDR_INSN);
break;
case __SI_POLL >> 16:
case __SI_TIMER >> 16:
err |= __get_user(to->si_band, &from->si_band);
err |= __get_user(to->si_fd, &from->si_fd);
break;
case __SI_TIMER >> 16:
err |= __get_user(to->si_tid, &from->si_tid);
err |= __get_user(to->si_overrun, &from->si_overrun);
err |= __get_user(to->si_int, &from->si_int);
break;
default:
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment