[PATCH v2] s390: fix SIGNAL_FRAMESIZE macro

Dmitry V. Levin ldv at altlinux.org
Fri Mar 15 23:00:21 UTC 2019


On Thu, Mar 14, 2019 at 10:18:22AM +0100, Tuan Hoang wrote:
> 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.
> 
> Signed-off-by: Tuan Hoang <tmhoang at linux.ibm.com>
> ---
>  linux/s390/arch_sigreturn.c  | 2 +-
>  linux/s390/rt_sigframe.h     | 8 +++++++-
>  linux/s390x/arch_sigreturn.c | 4 +---
>  3 files changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/linux/s390/arch_sigreturn.c b/linux/s390/arch_sigreturn.c
> index 1d0f0e00..4a9ca8ec 100644
> --- a/linux/s390/arch_sigreturn.c
> +++ b/linux/s390/arch_sigreturn.c
> @@ -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
> diff --git a/linux/s390/rt_sigframe.h b/linux/s390/rt_sigframe.h
> index e11573a4..f243f5e7 100644
> --- a/linux/s390/rt_sigframe.h
> +++ b/linux/s390/rt_sigframe.h
> @@ -10,8 +10,14 @@
>  
>  # include <signal.h>
>  
> +#if defined __s390__
> +# define SIGNAL_FRAMESIZE 96
> +#elif defined __s390x__
> +# define SIGNAL_FRAMESIZE 160
> +#endif

Thanks for the patch, but this hunk is definitely wrong:
it defines SIGNAL_FRAMESIZE to 160 on s390x.
If you run "make check", you'd see "FAIL: rt_sigreturn.gen" on s390x.

I've changed this to

+#ifdef __s390x__
+# define SIGNAL_FRAMESIZE 160
+#else /* __s390__ */
+# define SIGNAL_FRAMESIZE 96
+#endif

and pushed to master.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20190316/87163599/attachment.bin>


More information about the Strace-devel mailing list