Commit Graph
33366 Commits
Author SHA1 Message Date
Mark Andrews 009358d77d Correctly detect when get_direction failed 2021-02-19 09:17:32 +11:00
Mark Andrews 07902d9f9d Test a LOC record with an invalid direction field 2021-02-19 09:17:32 +11:00
Ondřej Surý 3547c0c1ff Merge branch '2433-improve-memory-contention' into 'main'
Resolve "investigate and improve lock contention around mctx"

Closes #2433

See merge request isc-projects/bind9!4659
2021-02-18 20:08:09 +00:00
Ondřej SurýandOndřej Surý 0302e54892 Add CHANGES note for GL #2433 2021-02-18 19:33:54 +01:00
Ondřej Surý 494d0da522 Use library constructor/destructor to initialize OpenSSL
Instead of calling isc_tls_initialize()/isc_tls_destroy() explicitly use
gcc/clang attributes on POSIX and DLLMain on Windows to initialize and
shutdown OpenSSL library.

This resolves the issue when isc_nm_create() / isc_nm_destroy() was
called multiple times and it would call OpenSSL library destructors from
isc_nm_destroy().

At the same time, since we now have introduced the ctor/dtor for libisc,
this commit moves the isc_mem API initialization (the list of the
contexts) and changes the isc_mem_checkdestroyed() to schedule the
checking of memory context on library unload instead of executing the
code immediately.
2021-02-18 19:33:54 +01:00
Ondřej SurýandOndřej Surý 4bde4f050b Disable calling DllMain() on thread creation/destruction
Disables the DLL_THREAD_ATTACH and DLL_THREAD_DETACH notifications for
the specified dynamic-link library (DLL).  This can reduce the size of
the working set for some applications.
2021-02-18 19:33:54 +01:00
Ondřej Surý f225462055 Fix the invalid condition variable
Although harmless, the memmove() in tlsdns and tcpdns was guarded by a
current message length variable that was always bigger than 0 instead of
correct current buffer length remainder variable.
2021-02-18 19:33:54 +01:00
Ondřej Surý 4775e9f256 Move most of the OpenSSL initialization to isc_tls
Since we now require both libcrypto and libssl to be initialized for
netmgr, we move all the OpenSSL initialization code except the engine
initialization to isc_tls API.

The isc_tls_initialize() and isc_tls_destroy() has been made idempotent,
so they could be called multiple time.  However when isc_tls_destroy()
has been called, the isc_tls_initialize() could not be called again.
2021-02-18 19:33:54 +01:00
Ondřej Surý ff47b47f1a Remove overrun checking code from memory allocator
The ISC_MEM_CHECKOVERRUN would add canary byte at the end of every
allocations and check whether the canary byte hasn't been changed at the
free time.  The AddressSanitizer and valgrind memory checks surpases
simple checks like this, so there's no need to actually keep the code
inside the allocator.
2021-02-18 19:33:54 +01:00
Ondřej Surý 549e5b693a Modify the way we benchmark mem_{get,put}
Previously, the mem_{get,put} benchmark would pass the allocation size
as thread_create argument.  This has been now changed, so the allocation
size is stored and decremented (divided) in atomic variable and the
thread create routing is given a memory context.  This will allow to
write tests where each thread is given different memory context and do
the same for mempool benchmarking.
2021-02-18 19:33:54 +01:00
Ondřej Surý f34f943b16 Disable memory debugging features in non-developer build
The two memory debugging features: ISC_MEM_DEFAULTFILL
(ISC_MEMFLAG_FILL) and ISC_MEM_TRACKLINES were always enabled in all
builds and the former was only disabled in `named`.

This commits disables those two features in non-developer build to make
the memory allocator significantly faster.
2021-02-18 19:33:54 +01:00
Ondřej SurýandOndřej Surý c9fe12443f Make the mempool names unconditional
The named memory pools were default and always compiled-in.  Remove the
extra complexity by removing the #define and #ifdefs around the code.
2021-02-18 19:33:54 +01:00
Ondřej SurýandOndřej Surý b09106e93a Make the memory and mempool counters to be stdatomic types
This is yet another step into unlocking some parts of the memory
contexts.  All the regularly updated variables has been turned into
atomic types, so we can later remove the locks when updating various
counters.

Also unlock as much code as possible without breaking anything.
2021-02-18 19:33:51 +01:00
Ondřej SurýandOndřej Surý 0f44139145 Bump the maximum number of hazard pointers in tests
On 24-core machine, the tests would crash because we would run out of
the hazard pointers.  We now adjust the number of hazard pointers to be
in the <128,256> interval based on the number of available cores.

Note: This is just a band-aid and needs a proper fix.
2021-02-18 19:32:55 +01:00
Ondřej SurýandOndřej Surý 7de846977b Remove the extra level of indirection via isc_memmethods_t
Previously, the applications using libisc would be able to override the
internal memory methods with own implementation.  This was no longer
possible, but the extra level of indirection was not removed.  This
commit removes the extra level of indirection for the memory methods and
the default_memalloc() and default_memfree().
2021-02-18 19:32:55 +01:00
Ondřej SurýandOndřej Surý 55ace5d3aa Remove the internal memory allocator
The internal memory allocator had an extra code to keep a list of blocks
for small size allocation.  This would help to reduce the interactions
with the system malloc as the memory would be already allocated from the
system, but there's an extra cost associated with that - all the
allocations/deallocations must be locked, effectively eliminating any
optimizations in the system allocator targeted at multi-threaded
applications. While the isc_mem API is still using locks pretty heavily,
this is a first step into reducing the memory allocation/deallocation
contention.
2021-02-18 19:32:02 +01:00
Michal Nowak 706c57280f Merge branch 'mnowak/fix-feature-test-tool-location' into 'main'
Use FEATURETEST variable instead of a path

See merge request isc-projects/bind9!4694
2021-02-18 14:43:29 +00:00
Michal Nowak 102f012631 Use FEATURETEST variable instead of a path
feature-test tool location needs to be determined by its associated
variable; otherwise, the tool is not found on Windows:

    setup.sh: line 22: ../feature-test: No such file or directory
2021-02-18 15:41:09 +01:00
Michał Kępień da21650949 Merge branch 'michal/add-a-checklist-for-handling-cves' into 'main'
Add a checklist for handling security issues

See merge request isc-projects/bind9!3950
2021-02-18 10:16:57 +00:00
Michał Kępień 3e5efc46d4 Add a checklist for handling security issues 2021-02-18 11:11:40 +01:00
Michał Kępień a55f4106ef Merge branch 'v9_17_10-release' into 'main'
Merge 9.17.10 release branch

See merge request isc-projects/bind9!4699
2021-02-17 21:29:03 +00:00
Michał Kępień ac95a9db99 Set up release notes for BIND 9.17.11 2021-02-17 22:25:26 +01:00
Michał Kępień 2b88a255d9 Update BIND version to 9.17.10 2021-02-17 22:20:24 +01:00
Michał Kępień a02c5c350e Add a CHANGES marker 2021-02-17 22:20:24 +01:00
Michał Kępień 77026a0fc2 Merge branch 'michal/prepare-documentation-for-bind-9.17.10' into 'v9_17_10-release'
Prepare documentation for BIND 9.17.10

See merge request isc-private/bind9!237
2021-02-17 22:20:24 +01:00
Michał Kępień 48353879e5 Prepare release notes for BIND 9.17.10 2021-02-17 22:20:24 +01:00
Michał Kępień 5c15c6ab21 Add release note for GL #2073 2021-02-17 22:20:24 +01:00
Michał Kępień fc4b7e72cc Reorder release notes 2021-02-17 22:20:24 +01:00
Michał Kępień 3799e66f04 Tweak and reword release notes 2021-02-17 22:20:24 +01:00
Michał Kępień 589cbe9bad Tweak and reword recent CHANGES entries 2021-02-17 22:20:24 +01:00
Michał Kępień 234ff52725 Use :rfc:<number> references in release notes 2021-02-17 22:20:24 +01:00
Michał Kępień e63b385073 Document the build-time requirement for nghttp2 2021-02-17 22:20:24 +01:00
Michal Nowak 8836a6e2b5 Merge branch 'mnowak/system-test-check-for-file-not-removed' into 'main'
Check for "file not removed" in system test output

See merge request isc-projects/bind9!4680
2021-02-17 16:08:26 +00:00
Michal Nowak f310b75250 Prevent Git to expand $systest
CentOS 8 "git status" unexpectedly expands search directory "tsig" to
also search in the "tsiggss" directory, thus incorrectly identifying
files as "not removed" in the "tsig" directory:

$ git status -su --ignored tsig
$ touch tsiggss/ns1/{named.run,named.memstats}
$ git status -su --ignored tsig
!! tsiggss/ns1/named.memstats
!! tsiggss/ns1/named.run
2021-02-17 16:35:21 +01:00
Michal Nowak 14a104d121 Clean omitted files from system tests
Any CI job:
- I:dnssec:file dnssec/ns1/trusted.keys not removed
- I:rpzrecurse:file rpzrecurse/ns3/named.run.prev not removed

system:clang:freebsd11:amd64:
- I:tkey:file tkey/ns1/named.conf-e not removed

system:gcc:sid:amd64:
- I:mirror:file mirror/ns3/_default.nzf not removed

system:gcc:xenial:amd64:
- I:rpzextra:file rpzextra/.cache/v/cache/lastfailed not removed
- I:rpzrecurse:file rpzrecurse/ns3/named.run.prev not removed
- I:shutdown:file shutdown/.cache/v/cache/lastfailed not removed
2021-02-17 16:35:21 +01:00
Michal Nowak e48d7db13a Copy testcrypto.sh to out-of-tree directory
System tests run in out-of-tree directory fail to find testcrypto.sh and
produce:

    /bin/bash: ../testcrypto.sh: No such file or directory
2021-02-17 16:35:21 +01:00
Michal Nowak 4a2778abdf Check for "file not removed" in system test output
Run this check only when in Git repository, because the run.sh function
which produces the "file not removed" warning is run only when build
directory is the same as the source directory, that is only for in-tree
builds.
2021-02-17 16:35:21 +01:00
Michal Nowak 10bf725ee2 Add system test name to "file not removed" info 2021-02-17 16:35:21 +01:00
Michal Nowak 09acebd910 Merge branch 'mnowak/enable-dh-unit-test-to-run-under-pkcs11' into 'main'
Drop USE_OPENSSL constraint from dh_test

See merge request isc-projects/bind9!4621
2021-02-17 11:44:39 +00:00
Michal Nowak c341e7f740 Drop USE_OPENSSL constraint from dh_test
The USE_OPENSSL constraint in dh_test does not seems to be necessary
anymore, the test runs with PKCS#11 as well.
2021-02-17 12:21:41 +01:00
Ondřej Surý f8fa64b706 Merge branch '2487-rollback-setting-dontfrag-option' into 'main'
Rollback setting IP_DONTFRAG option on the UDP sockets

Closes #2466 and #2487

See merge request isc-projects/bind9!4668
2021-02-17 08:02:08 +00:00
Ondřej SurýandOndřej Surý 6d442e9c04 Add CHANGES and release notes for GL #2487 2021-02-17 08:10:45 +01:00
Ondřej SurýandOndřej Surý 66eefac78c Rollback setting IP_DONTFRAG option on the UDP sockets
In DNS Flag Day 2020, the development branch started setting the
IP_DONTFRAG option on the UDP sockets.  It turned out, that this
code was incomplete leading to dropping the outgoing UDP packets.
Henceforth this commit rolls back this setting until we have a
proper fix that would send back empty response with TC flag set.
2021-02-17 08:09:56 +01:00
Evan Hunt 0f1a4ff2b1 Merge branch 'each-note-cleanup' into 'main'
some release note corrections

See merge request isc-projects/bind9!4690
2021-02-17 00:59:01 +00:00
Evan Hunt 3126eb652d some release note corrections 2021-02-16 16:56:25 -08:00
Evan Hunt 62cf011eaa Merge branch '2472-tls-none' into 'main'
Resolve "too easy to configure unencrypted DoH"

Closes #2472

See merge request isc-projects/bind9!4653
2021-02-17 00:55:33 +00:00
Evan Hunt 5950b5c803 CHANGES 2021-02-16 16:24:52 -08:00
Evan Hunt 2b2e1a02bd allow configuration of "default" http endpoint
specifying "http default" in a listen-on statement sets up
the default "/dns-query" endpoint. tests and documentation
have been updated.
2021-02-16 16:24:35 -08:00
Evan Hunt 957052eea5 move listen-on correctness checks into check.c
errors in listen-on and listen-on-v6 can now be detected
by named-checkconf.
2021-02-16 16:24:35 -08:00
Evan Hunt fd763d7223 enable listen-on parameters to be specified in any order
updated the parser to allow the "port", "tls" and "http"
paramters to "listen-on" and "listen-on-v6" to be specified in any
order. previously the parser would throw an error if any other order
was used than port, tls, http.
2021-02-16 16:24:35 -08:00