This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 3/6] Reinstantiate fd range check if and only if defined _STRICT_FD_SIZE_CHECK=1
- From: Florian Weimer <fweimer at redhat dot com>
- To: kosaki dot motohiro at gmail dot com
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 02 Apr 2013 10:53:20 +0200
- Subject: Re: [PATCH 3/6] Reinstantiate fd range check if and only if defined _STRICT_FD_SIZE_CHECK=1
- References: <1364570244-2088-1-git-send-email-kosaki dot motohiro at gmail dot com> <1364570244-2088-4-git-send-email-kosaki dot motohiro at gmail dot com>
On 03/29/2013 04:17 PM, kosaki.motohiro@gmail.com wrote:
/* Define some inlines helping to catch common problems. */
-#if __USE_FORTIFY_LEVEL > 0 && defined __GNUC__
+#if __USE_FORTIFY_LEVEL > 0 && defined __GNUC__ && _STRICT_FD_SIZE_CHECK > 0
# include <bits/select2.h>
#endif
I think this is backwards. The default with _FORTIFY_SOURCE should be
to check, but having a way to disable the checks if needed might be
helpful in some cases. (Porting to poll/epoll/glib event loop is almost
always preferable, though.)
--
Florian Weimer / Red Hat Product Security Team