357 Commits

Author SHA1 Message Date
Petr Špaček
283ac230b9 Update BIND version for release 2024-12-03 13:30:02 +01:00
Michal Nowak
22f3037d06 Update BIND version to 9.20.4-dev 2024-10-08 10:34:31 +02:00
Nicki Křížek
314ba3898d Update BIND version to 9.20.3-dev 2024-09-09 19:21:41 +02:00
Ondřej Surý
5255843f9b Follow the number of CPU set by taskset/cpuset
Administrators may wish to constrain the set of cores that BIND 9 runs
on via the 'taskset', 'cpuset' or 'numactl' programs (or equivalent on
other O/S), for example to achieve higher (or more stable) performance
by more closely associating threads with individual NIC rx queues. If
the admin has used taskset, it follows that BIND ought to
automatically use the given number of CPUs rather than the system wide
count.

Co-Authored-By: Ray Bellis <ray@isc.org>
(cherry picked from commit 5a2df8caf5)
2024-09-03 13:52:10 +00:00
Ondřej Surý
619d21b57c Stop using malloc_usable_size and malloc_size
Although the nanual page of malloc_usable_size says:

    Although the excess bytes can be over‐written by the application
    without ill effects, this is not good programming practice: the
    number of excess bytes in an allocation depends on the underlying
    implementation.

it looks like the premise is broken with _FORTIFY_SOURCE=3 on newer
systems and it might return a value that causes program to stop with
"buffer overflow" detected from the _FORTIFY_SOURCE.  As we do have own
implementation that tracks the allocation size that we can use to track
the allocation size, we can stop relying on this introspection function.

Also the newer manual page for malloc_usable_size changed the NOTES to:

    The value returned by malloc_usable_size() may be greater than the
    requested size of the allocation because of various internal
    implementation details, none of which the programmer should rely on.
    This function is intended to only be used for diagnostics and
    statistics; writing to the excess memory without first calling
    realloc(3) to resize the allocation is not supported.  The returned
    value is only valid at the time of the call.

Remove usage of both malloc_usable_size() and malloc_size() to be on the
safe size and only use the internal size tracking mechanism when
jemalloc is not available.

(cherry picked from commit d61712d14e)
2024-08-26 18:27:01 +00:00
Ondřej Surý
1a657766c3 Use seteuid()/setegid() instead of setreseuid()/setresgid()
It looks like that all supported systems now have support for
_POSIX_SAVED_IDS, so it's safe to use setegid() and setegid() because
those will not change saved used/group IDs.

(cherry picked from commit ab517fc6e4)
2024-08-20 17:36:27 +00:00
Nicki Křížek
f6656c801c Update BIND version to 9.20.2-dev 2024-08-19 18:10:05 +02:00
Aram Sargsyan
62f68ff71d Add -Wno-psabi to CFLAGS for x86 (32-bit) builds
GCC 11.1+ emits a note during compilation when there are 64-bit
atomic fields in a structure, because it fixed a compiler bug
by changing the alignment of such fields, which caused ABI change.

Add -Wno-psabi to CFLAGS for such builds in order to silence the
warning. That shouldn't be a problem since we don't expose our
structures to the outside.

(cherry picked from commit 867066aa53)
2024-08-15 12:52:39 +00:00
Ondřej Surý
80738e98bd Fix PTHREAD_MUTEX_ADAPTIVE_NP and PTHREAD_MUTEX_ERRORCHECK_NP usage
The PTHREAD_MUTEX_ADAPTIVE_NP and PTHREAD_MUTEX_ERRORCHECK_NP are
usually not defines, but enum values, so simple preprocessor check
doesn't work.

Check for PTHREAD_MUTEX_ADAPTIVE_NP from the autoconf AS_COMPILE_IFELSE
block and define HAVE_PTHREAD_MUTEX_ADAPTIVE_NP.  This should enable
adaptive mutex on Linux and FreeBSD.

As PTHREAD_MUTEX_ERRORCHECK actually comes from POSIX and Linux glibc
does define it when compatibility macros are being set, we can just use
PTHREAD_MUTEX_ERRORCHECK instead of PTHREAD_MUTEX_ERRORCHECK_NP.

(cherry picked from commit cc4f99bc6d)
2024-08-05 09:13:07 +00:00
Ondřej Surý
34847e7e32 Remove defunct --with-locktype configure option
The --with-locktype configure option was no-op, so it was removed.

(cherry picked from commit c33bf0de8d)
2024-08-05 09:13:07 +00:00
Nicki Křížek
e9780d55bf Update docs and processes to use the new changelog
(cherry picked from commit bcc99213a5)
2024-07-29 14:44:59 +02:00
Nicki Křížek
71d137939d Update BIND version to 9.20.1-dev 2024-07-23 17:49:28 +02:00
Tom Krizek
2a09f632ab Use a dedicated file for each autoconf variable
To avoid any escaping issues or messing with a language-specific format
when the variable has to be parsed, create a dedicated file for each
variable that is obtained from autoconf.
2024-05-09 17:08:10 +02:00
Tom Krizek
ab27f504ca Move environment variables from conf.sh to pytest
Remove conf.sh.in and move the environment variables into isctest/vars
python package. This enabled the removal of an ugly pytest hack which
loaded and parsed these variables from the environment.
2024-05-09 17:08:08 +02:00
Michal Nowak
fd880c29f2 Update BIND version to 9.19.25-dev 2024-05-03 15:51:53 +02:00
Petr Špaček
b0b4ea3975 Update BIND version to 9.19.24-dev 2024-04-04 19:35:03 +02:00
Ondřej Surý
304b5ec1ad Deprecate fixed value for the rrset-order option
Mark the "fixed" value for the "rrset-order" option deprecated, so we
can remove it in the future.
2024-04-02 15:21:00 +00:00
Michał Kępień
df0229e7ee Update BIND version to 9.19.23-dev 2024-03-13 09:51:24 +01:00
Evan Hunt
5709f7bad9 rename qpdb to qpcache
move qpdb.c to qpcache.c and rename the "qp" database implementation
to "qpcache", in order to make it more clearly distinguishable from
"qpzone".
2024-03-08 15:36:56 -08:00
Evan Hunt
ab084d8c4f remove qp-zonedb.c and associated code
now that "qpzone" databases are available for use in zones, we no
longer need to retain the zone semantics in the "qp" database.

all zone-specific code has been removed from QPDB, and "configure
--with-zonedb" once again takes two values, rbt and qp.

some database API methods that are never used with a cache have
been removed from qpdb.c and qp-cachedb.c; these include newversion,
closeversion, subtractrdataset, and nodefullname.
2024-03-08 15:36:56 -08:00
Evan Hunt
2b4133a32c switch default zone database from "qp" to "qpzone"
use the dns_qpmulti-based "qpzone" by default throughout BIND,
instead of the existing dns_qp-based "qp", when creating zone
databases. (cache databases still use "qp".)

the "--with-zonedb" option has been updated in configure.ac to permit
the use of both "qp" and "qpzone" databases.

in zone.c there was a test that prevented any database type other than
"qp" from hosting an RPZ. this was outdated, and has been removed.
2024-03-08 15:36:56 -08:00
Evan Hunt
92b305be4b add a compile-time option to select default zone and cache DB
by default, QPDB is the database used by named and all tools and
unit tests. the old default of RBTDB can now be restored by using
"configure --with-zonedb=rbt --with-cachedb=rbt".

some tests have been fixed so they will work correctly with either
database.

CHANGES and release notes have been updated to reflect this change.
2024-03-06 10:49:02 +01:00
Ondřej Surý
2463e5232d Use proper padding instead of using alignas()
As it was pointed out, the alignas() can't be used on objects larger
than `max_align_t` otherwise the compiler might miscompile the code to
use auto-vectorization on unaligned memory.

As we were only using alignas() as a way to prevent false memory
sharing, we can use manual padding in the affected structures.
2024-02-08 10:54:35 +01:00
Ondřej Surý
2c98ccbdba Use error checking mutex in developer mode on Linux
When developer mode is enabled, use error checking mutex type, so we can
discover wrong use of mutexes faster.
2024-02-07 20:54:05 +01:00
Ondřej Surý
01038d894f Always use adaptive mutexes on Linux
When adaptive mutexes are available (with glibc), always use them.
Remove the autoconf switch and also fix the static initializer.
2024-02-07 20:54:05 +01:00
Michał Kępień
055802e77e Update BIND version to 9.19.22-dev 2024-01-15 15:39:46 +01:00
Artem Boldariev
9d052522a0 Add TLS cipher-suites related low-level functionality
This commits adds low-level wrappers on top of
'SSL_CTX_set_ciphersuites()'. These are going to be a foundation
behind the 'cipher-suites' option of the 'tls' statement.
2024-01-12 13:27:59 +02:00
Michal Nowak
168438c215 Update BIND version to 9.19.21-dev 2024-01-08 12:40:52 +01:00
Tom Krizek
2964019558 Update BIND version to 9.19.20-dev 2023-12-08 15:51:48 +01:00
Tom Krizek
910440d9b6 Remove legacy runner control scripts
These scripts have been used exclusively by the legacy test runner and
they're no longer needed.
2023-12-01 13:47:27 +01:00
Ondřej Surý
17da9fed58 Remove AES algorithm for DNS cookies
The AES algorithm for DNS cookies was being kept for legacy reasons, and
it can be safely removed in the next major release.  Remove both the AES
usage for DNS cookies and the AES implementation itself.
2023-11-15 10:31:16 +01:00
Petr Špaček
f5a91e2f49 Update BIND version to 9.19.19-dev 2023-11-10 13:50:32 +01:00
Michał Kępień
bf518ba490 Always use default RCU variant in pairwise builds
Commit 42d43aa075 made --with-liburcu
depend on --enable-developer.  This broke pairwise testing as this new
dependency was not codified in configure.ac.  Since the --with-liburcu
option is currently just a convenience for developers, there is no need
to test building against all possible RCU variants in GitLab CI until
they actually work with BIND 9.  Update the pairwise testing
"configuration" in configure.ac so that builds with non-standard RCU
variants are not tested.
2023-10-27 13:19:03 +02:00
Ondřej Surý
17f1d0e862 Remove Userspace-RCU signal variant
The signal variant of Userspace-RCU has been deprecated upstream.
Remove the support for compiling with it from configure.ac.
2023-10-26 10:20:29 +02:00
Ondřej Surý
42d43aa075 Allowing changing Userspace-RCU variant only in developer mode
The Userspace-RCU variants other than membarrier is untested and at
least in QSBR case it's broken.  Allow changing the Userspace-RCU
variant only in the developer's mode.
2023-10-26 10:20:29 +02:00
Michał Kępień
561a83a291 Remove PDF-related bits from the build system
Read the Docs is capable of building the PDF version of the BIND 9 ARM
using just the contents of the doc/arm/ directory - it does not need the
build system to facilitate that.  Since the BIND 9 ARM is also built in
other formats when "make doc" is run, drop the parts of the build system
that enable building the PDF version as they pull in complexity without
bringing much added value in return.  Update related files accordingly.
2023-10-12 14:24:42 +02:00
Tom Krizek
0538b7e0da Use prereq.sh for rpzrecurse system test 2023-09-19 14:47:48 +02:00
Tom Krizek
c3abedc0a2 Use prereq.sh for serve-stale system test 2023-09-19 14:47:48 +02:00
Tom Krizek
5d9a09c086 Use prereq.sh for chain system test 2023-09-19 14:47:48 +02:00
Tom Krizek
587129b4c0 Use prereq.sh for xfer system test 2023-09-19 14:47:48 +02:00
Tom Krizek
27281955af Use prereq.sh for statschannel system test 2023-09-19 14:47:48 +02:00
Michal Nowak
ee46748eea Update BIND version to 9.19.18-dev 2023-09-12 08:11:52 +02:00
Ondřej Surý
2e99dcefa8 Print the used jemalloc version in autoconf and named -V output
The autoconf and named -V now prints used version of jemalloc.  This
doesn't work with system supplied jemalloc, so in it prints `system`
instead in the autoconf and nothing in named -V output.
2023-09-05 18:47:21 +02:00
Ondřej Surý
784d055809 Add support for User Statically Defined Tracing (USDT) probes
This adds support for User Statically Defined Tracing (USDT).  On
Linux, this uses the header from SystemTap and dtrace utility, but the
support is universal as long as dtrace is available.

Also add the required infrastructure to add probes to libisc, libdns and
libns libraries, where most of the probes will be.
2023-08-21 18:39:53 +02:00
Michał Kępień
7fffb66891 Update BIND version to 9.19.17-dev 2023-08-07 10:23:55 +02:00
Ondřej Surý
4dacdde28f Refactor dns_badcache to use cds_lfht lock-free hashtable
The dns_badcache unit had (yet another) own locked hashtable
implementation.  Replace the hashtable used by dns_badcache with
lock-free cds_lfht implementation from liburcu.
2023-07-31 15:51:15 +02:00
Tom Krizek
46e917a55e Update BIND version to 9.19.16-dev 2023-07-10 15:08:50 +02:00
Michal Nowak
8f6e77aee9 Update BIND version to 9.19.15-dev 2023-06-12 16:12:27 +02:00
Ondřej Surý
920dddb729 Print the libuv, liburcu and OpenSSL versions from configure script
The configure summary now prints versions of the mandatory libraries
found when configuring.
2023-06-06 12:42:02 +02:00
Ondřej Surý
f760ee3f8c Disable URCU inlining if inlined rcu_dereference() fails to compile
In some cases, the inlined version rcu_dereference() would not compile
when working on pointer to opaque struct (namely Ubuntu Jammy).  Detect
such condition in the autoconf and disable the inlining of the small
functions if it breaks the build.
2023-06-01 16:51:38 +02:00