Freeze exception for resolv.conf parser changes
Florian Weimer
fweimer@redhat.com
Fri Jun 30 19:45:00 GMT 2017
I've just posted my resolv.conf changes. They address two long-standing
problems with the stub resolver: automatic reloading of struct
resolv_conf, and the hard search list limit (6 domains). Both issues
have seen quite a bit of user interest over the years.
I think these patches are ready to go in now. The whole construction is
a bit baroque, but that's the price we pay for ABI compatibility and
support for applications which patch _res today.
But I would like to continue working on this during the first week of
the freeze. I see the following five immediate improvements:
* More test coverage. (I tested resolv.conf reloading only manually.)
* Lazy allocation of the main state in resolv/resolv_conf.c, to conserve
data segment space for programs which do not use the stub resolver.
* Eliminate some locking in resolv/resolv_conf.c.
* Use a free list for indexes into the resolv_conf array (speeds
up _res object allocation/resolv_conf attachment).
* Reimplement the libresolv compat gethostname on top of NSS.
I think these changes are low risk.
There are some additional to-do items, but I don't think they need to
get into the release.
* Clean up the nssocks array (we do not need it).
* Support arbitrarily many name servers.
* Lazily initialize _res on first access. (Then if *_res is NULL,
the application obviously has not patched _res.)
* Lazily allocate _res (like global-dynamic TLS). This frees about ~500
bytes in the TCB.
Thanks,
Florian
More information about the Libc-alpha
mailing list