]> granicus.if.org Git - strace/commitdiff
s390: fix SIGNAL_FRAMESIZE macro
authorTuan Hoang <tmhoang@linux.ibm.com>
Thu, 14 Mar 2019 09:18:22 +0000 (10:18 +0100)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 15 Mar 2019 20:19:19 +0000 (20:19 +0000)
Since __SIGNAL_FRAMESIZE is in private name space, it is better not to
use it directly. This macro has been stable on s390/s390x so it is safe
to use the integer value.

* linux/s390/arch_sigreturn.c [!SIGNAL_FRAMESIZE] (SIGNAL_FRAMESIZE):
Define to 96.
* linux/s390x/arch_sigreturn.c (arch_sigreturn == s390_arch_sigreturn):
Remove S390_SIGNAL_FRAMESIZE and SIGNAL_FRAMESIZE.
(arch_sigreturn == s390x_arch_sigreturn): Define SIGNAL_FRAMESIZE.
* linux/s390/rt_sigframe.h (SIGNAL_FRAMESIZE): Define.
(struct_rt_sigframe): Replace __SIGNAL_FRAMESIZE with SIGNAL_FRAMESIZE.

Signed-off-by: Tuan Hoang <tmhoang@linux.ibm.com>
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
linux/s390/arch_sigreturn.c
linux/s390/rt_sigframe.h
linux/s390x/arch_sigreturn.c

index 1d0f0e001970db608ecae933db7cfbbb14d9b977..4a9ca8ecccf41d348718964b8d02779ad236eb5b 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef SIGNAL_FRAMESIZE
-# define SIGNAL_FRAMESIZE __SIGNAL_FRAMESIZE
+# define SIGNAL_FRAMESIZE 96
 #endif
 #ifndef PTR_TYPE
 # define PTR_TYPE unsigned long
index e11573a43ff19e5abd9aacc72ccfb7aa4b466f4e..51819b7b33883bc030c3b85f1b311721791b9de7 100644 (file)
 
 # include <signal.h>
 
+#ifdef __s390x__
+# define SIGNAL_FRAMESIZE 160
+#else /* __s390__ */
+# define SIGNAL_FRAMESIZE 96
+#endif
+
 typedef struct {
-       uint8_t         callee_used_stack[__SIGNAL_FRAMESIZE];
+       uint8_t         callee_used_stack[SIGNAL_FRAMESIZE];
        uint16_t        svc_insn;
        siginfo_t       info;
        ucontext_t      uc;
index 55930a35da1e49635630716bad85b5eab463a105..2d75a8c6b476a29322f831c83498380fab0518fa 100644 (file)
@@ -7,9 +7,6 @@
 
 #include <stdint.h>
 
-#define S390_SIGNAL_FRAMESIZE      96
-
-#define SIGNAL_FRAMESIZE       S390_SIGNAL_FRAMESIZE
 #define PTR_TYPE               uint32_t
 #define arch_sigreturn s390_arch_sigreturn
 #include "s390/arch_sigreturn.c"
@@ -17,6 +14,7 @@
 #undef PTR_TYPE
 #undef SIGNAL_FRAMESIZE
 
+#define SIGNAL_FRAMESIZE       160
 #define arch_sigreturn s390x_arch_sigreturn
 #include "s390/arch_sigreturn.c"
 #undef arch_sigreturn