aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/uapi/asm/ucontext.h
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2014-06-11 14:06:12 (GMT)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2014-06-16 08:31:40 (GMT)
commitb9c9a33b765b0dd9279a99fcbb63f54950655e77 (patch)
tree51db83b7f63c1f230fa35ee0f0eac4c92f69d973 /arch/s390/include/uapi/asm/ucontext.h
parent2c3e7e15c7e420e35132aa3c0a614524cb2ab9e2 (diff)
s390/compat: correct ucontext layout for high gprs
The uc_sigmask definition in the kernel differs from the one in the glibc, the kernel uc_sigmask has 64 bits while the glibc verison is 1024 bits. The extension of the ucontext structure for 64-bit register support for 31-bit compat processes added a new field uc_gprs_high which starts 8 bytes after the uc_sigmask field. As the glibc view of the ucontext assumes a size of 128 bytes for uc_sigmask add a 120 byte padding to the kernel structure ucontext_extended after the 8 byte uc_sigmask. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/uapi/asm/ucontext.h')
-rw-r--r--arch/s390/include/uapi/asm/ucontext.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/s390/include/uapi/asm/ucontext.h b/arch/s390/include/uapi/asm/ucontext.h
index 200e063..3e077b2 100644
--- a/arch/s390/include/uapi/asm/ucontext.h
+++ b/arch/s390/include/uapi/asm/ucontext.h
@@ -16,7 +16,9 @@ struct ucontext_extended {
struct ucontext *uc_link;
stack_t uc_stack;
_sigregs uc_mcontext;
- unsigned long uc_sigmask[2];
+ sigset_t uc_sigmask;
+ /* Allow for uc_sigmask growth. Glibc uses a 1024-bit sigset_t. */
+ unsigned char __unused[128 - sizeof(sigset_t)];
unsigned long uc_gprs_high[16];
};
@@ -27,7 +29,9 @@ struct ucontext {
struct ucontext *uc_link;
stack_t uc_stack;
_sigregs uc_mcontext;
- sigset_t uc_sigmask; /* mask last for extensibility */
+ sigset_t uc_sigmask;
+ /* Allow for uc_sigmask growth. Glibc uses a 1024-bit sigset_t. */
+ unsigned char __unused[128 - sizeof(sigset_t)];
};
#endif /* !_ASM_S390_UCONTEXT_H */

Privacy Policy