[PATCH] s390: fix SIGNAL_FRAMESIZE macro

Tuan Hoang tmhoang at linux.ibm.com
Thu Mar 14 09:15:33 UTC 2019


On 3/13/19 11:49 PM, Dmitry V. Levin wrote:
> On Wed, Mar 13, 2019 at 11:32:12PM +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.
> 
> I thought we can rely on the macro defined in
> arch/s390/include/uapi/asm/sigcontext.h but if you say we should rather
> not use it, I don't mind using the integer value instead.
>
Hi, thanks for understanding.

>> 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..101ca79c 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
> 
> If we are getting picky about name space issues, let's avoid introduction
> of new macros starting with "__".  We could use a more regular name
> for the new macro, e.g. SIGNAL_FRAMESIZE.
> 

Yes, agreed. I'm sending v2.

Cheers,



More information about the Strace-devel mailing list