This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Saving errno around signal handlers
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Rich Felker <dalias at aerifal dot cx>, Florian Weimer <fweimer at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Sat, 01 Mar 2014 03:05:05 -0500
- Subject: Re: Saving errno around signal handlers
- Authentication-results: sourceware.org; auth=none
- References: <531077D9 dot 2000308 at redhat dot com> <20140301003048 dot GX184 at brightrain dot aerifal dot cx>
On 02/28/2014 07:30 PM, Rich Felker wrote:
> Of course I don't see why you even want to do this. The direction
> POSIX is taking is to require applications to save and restore errno
> if they might clobber it in the signal handler. There is no reason to
> introduce lots of complexity, overhead, and runtime latency to signal
> handling in glibc to accommodate programs which do not follow this
> requirement.
Would it be OK if the program was compiled specifically with some
security hardening options? The point being to prevent any possibility
of a signal handler from modifying the thread errno.
Cheers,
Carlos.