sigset_t for new arches

Vineet Gupta Vineet.Gupta1@synopsys.com
Tue Nov 14 00:09:00 GMT 2017


On 11/13/2017 03:18 PM, Joseph Myers wrote:
> On Mon, 13 Nov 2017, Vineet Gupta wrote:
>
>> Hi,
>>
>> This came to light when initial testing ARC port to glibc.
>>
>> ARC glibc sigaction wrapper was failing as Linux kernel expects sa_mask
>> (sigset_t) to be 2 words (for the asm-generic syscall ABI mandated for newer
>> arches) while glibc defines it to be 32 words.
> I think the userspace sigset_t is deliberately much larger, to allow for
> possible increase in the number of signals in future without breaking the
> glibc ABI.

But a new signal added would imply an ABI change anyways ? Anyhow it seems H.J has 
some bits in flight which seem to tend to this for setjmp/longjmp atleast.
My concern was to elide any extraneous user-to-kernel (and vice versa) copies in 
frequently uses syscallas such as sigaction, for which even the new code needs to 
use these NSIG / 8 hacks lookalike (vs. using well defined interface / macros).

-Vineet



More information about the Libc-alpha mailing list