This is the mail archive of the 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: [RFC PATCH 0/5] arm64: Signal context expansion

On 09/09/2016 05:21 PM, Dave Martin wrote:

Do you add this extra information only if the stack is sufficiently large?

x86_64 adds the new information even for small stacks set up with
sigaltstack, leading to memory corruption on bleeding-edge hardware:


Hmmm, not yet.  We already check that the whole frame is writable user
memory, but this isn't sufficient to avoid user corruption in the case
of alternate signal stacks.  I'll fix this -- thanks for flagging it.

If the stack isn't large enough, we'll still have to SEGV the task

You could skip copying the data and not install a pointer to it in the existing signal context.

We can (and should) bump up the SIG{,MIN}STKSZ constants when adding
the SVE support proper to the kernel,

That's a userspace ABI change (libraries use these constants to size struct members), and not a good idea. You might get away with at this stage, but you can't do this every time you add some new process state you want to add to signal handlers.

I wonder whether we should make the signal stack size runtime
discoverable through sysconf() instead...

That might be a good idea, yes.


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