This is the mail archive of the
mailing list for the glibc project.
Re: FD_SET and FORTIFY_SOURCE
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: KOSAKI Motohiro <kosaki dot motohiro at gmail dot com>
- Cc: libc-alpha <libc-alpha at sourceware dot org>
- Date: Mon, 25 Mar 2013 13:04:41 -0400
- Subject: Re: FD_SET and FORTIFY_SOURCE
- References: <512F0CC6 dot 8080302 at redhat dot com> <20130228134139 dot GL20323 at brightrain dot aerifal dot cx> <512F84B2 dot 1000501 at redhat dot com> <512FCFD0 dot 5050108 at gmail dot com> <CAHGf_=pYJKnSbMu-N0_OLg7X+oNBa3527BbOXLeuiWzEZ1MPAg at mail dot gmail dot com>
On 03/24/2013 04:17 PM, KOSAKI Motohiro wrote:
> 1. only turn on __FD_ELT check when running on hurd.
> 2. only turn on __FD_ELT check when defined some specific macro. (e.g.
> likes darwin,
> but disable by default)
> 2-2. make FORTIFY_SOURCE variant and check POSIX compliance if enabled.
> 3. provide select_large_fdset() likes solaris. (I strongly don't
> recommend. all application
> need to modify and recompilation)
> What do you think?
The value of __FD_SETSIZE is part of the ABI and can't be changed.
Imagine one library using a value >1024 while another uses one
that has a value ==1024. You would have to recompile all of userspace
to ensure it works reliable and that's what we call an ABI breakage.
Therefore #1, #2, and #2-2 would break the ABI.
The only option is #3, as Solaris did, and they probably did it
exactly for this reason.
Alternatively rewrite using poll/epoll.
Does that make sense?