This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Freeze exception for resolv.conf parser changes
- From: Florian Weimer <fweimer at redhat dot com>
- To: Siddhesh Poyarekar <siddhesh at gotplt dot org>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 30 Jun 2017 21:45:31 +0200
- Subject: Freeze exception for resolv.conf parser changes
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fweimer at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 8F2DBD0AAE
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8F2DBD0AAE
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