This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface)


On 12/21/18 4:05 AM, Adhemerval Zanella wrote:
>> Thing is ARC signal return depends on a restorer. Meaning !SA_RESTORER doesn't
>> effectively exist (between libc and kernel). We currently honor user provided
>> value, instead we could simply overwrite it with default_rt_restorer and on the
>> way out, zero it out to avoid leaking the glibc guts to curious users.
>>
> Yes, this is what I suggest ARC should do.

So I was able to

(1) switch ARC to __sigset_t [2] vs. [128]

(2) create a generic patch to breakout struct sigaction into bits/sigaction-arch.h
(3) update generic __libc_sigaction to avoid itemized copy if sa_mask, sa_flags et
    al offsets matched for struct kernel_signal and struct sigaction
(4) create arc/bits/sigaction-arch.h

However it turned out to be futile as the passthru won't work anyways :-(
@act in sigaction(sig, act, oact) is a const and can't be modified in place for
sticking in sa_restorer for kernel, thus needs to be copied over anyways.

This means we have [1] but have to drop [2-4]. Oh well !


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]