]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
6 years agoMerge branch 'each-dlz-build' into 'master'
Evan Hunt [Fri, 21 Feb 2020 17:19:56 +0000 (17:19 +0000)] 
Merge branch 'each-dlz-build' into 'master'

fix build errors in DLZ modules

See merge request isc-projects/bind9!3092

6 years agofix build errors in DLZ modules
Evan Hunt [Thu, 20 Feb 2020 05:53:30 +0000 (21:53 -0800)] 
fix build errors in DLZ modules

6 years agoMerge branch 'michal/clean-up-with-tuning-large-remnants' into 'master'
Michał Kępień [Fri, 21 Feb 2020 12:43:01 +0000 (12:43 +0000)] 
Merge branch 'michal/clean-up-with-tuning-large-remnants' into 'master'

Clean up --with-tuning=large remnants

See merge request isc-projects/bind9!3071

6 years agoClean up --with-tuning=large remnants
Michał Kępień [Fri, 21 Feb 2020 11:51:49 +0000 (12:51 +0100)] 
Clean up --with-tuning=large remnants

The change introduced by commit be159f556568abb9a5dbc494f8441eefdd304a7f
was not fully complete.  Adjust ./configure summary so that it reflects
the new way the --with-tuning switch works, fixing the Autoconf variable
used for determining the value of that switch.  Fix win32utils/Configure
so that it behaves the same way as its Unix counterpart.

6 years agoMerge branch 'marka-fix-signature-test' into 'master'
Mark Andrews [Fri, 21 Feb 2020 06:36:34 +0000 (06:36 +0000)] 
Merge branch 'marka-fix-signature-test' into 'master'

Fix code to generate the test signatues.

See merge request isc-projects/bind9!3102

6 years agoFix code to generate the test signatues.
Mark Andrews [Fri, 21 Feb 2020 05:40:50 +0000 (21:40 -0800)] 
Fix code to generate the test signatues.

* ctx needs to be destroyed before it is regenerated.
* emit the name of the signature to be replaced.
* cleanup memory before asserting so post longjump doesn't detect a
  memory leak.
* comment code.

6 years agoMerge branch '1632-spelling' into 'master'
Evan Hunt [Fri, 21 Feb 2020 06:28:09 +0000 (06:28 +0000)] 
Merge branch '1632-spelling' into 'master'

fix spelling errors reported by Fossies.

Closes #1632

See merge request isc-projects/bind9!3101

6 years agoupdate signatures
Mark Andrews [Fri, 21 Feb 2020 03:54:45 +0000 (14:54 +1100)] 
update signatures

6 years agofix spelling errors reported by Fossies.
Evan Hunt [Thu, 20 Feb 2020 22:49:36 +0000 (14:49 -0800)] 
fix spelling errors reported by Fossies.

6 years agoMerge branch '1279-named-compilezone-should-be-able-to-take-input-from-stdin' into...
Diego dos Santos Fronza [Thu, 20 Feb 2020 15:26:51 +0000 (15:26 +0000)] 
Merge branch '1279-named-compilezone-should-be-able-to-take-input-from-stdin' into 'master'

Resolve "named-compilezone should be able to take input from STDIN"

Closes #1279

See merge request isc-projects/bind9!2552

6 years agoAdded system test
Diego Fronza [Fri, 31 Jan 2020 19:52:43 +0000 (16:52 -0300)] 
Added system test

Added a system test which ensures that named-checkzone works when
taking input data from stdin.

6 years agoEnable named-checkzone and named-compilezone to take input from stdin
Diego Fronza [Thu, 7 Nov 2019 18:28:42 +0000 (15:28 -0300)] 
Enable named-checkzone and named-compilezone to take input from stdin

If a filename (the last argument) is not provided for named-checkzone or
named-compilezone, or if it is a single dash "-" character,
zone data will be read from stdin.

Example of invocation:
cat /etc/zone_name.db | named-compilezone -f text -F raw \
    -o zone_name.raw zone_name

6 years agoMerge branch 'michal/make-a-sed-script-in-doc-arm-makefile.in-portable' into 'master'
Michał Kępień [Thu, 20 Feb 2020 11:26:33 +0000 (11:26 +0000)] 
Merge branch 'michal/make-a-sed-script-in-doc-arm-makefile.in-portable' into 'master'

Make a sed script in doc/arm/Makefile.in portable

See merge request isc-projects/bind9!3058

6 years agoMake a sed script in doc/arm/Makefile.in portable
Michał Kępień [Thu, 20 Feb 2020 11:23:36 +0000 (12:23 +0100)] 
Make a sed script in doc/arm/Makefile.in portable

BSD sed does not recognize \s as a whitespace matching token.  Make the
sed script in doc/arm/Makefile.in which ensures GitLab identifiers are
not split across lines portable by replacing \s with [[:space:]].

6 years agoMerge branch 'michal/increase-lifetime-of-docs-sid-amd64-artifacts' into 'master'
Michał Kępień [Thu, 20 Feb 2020 10:55:19 +0000 (10:55 +0000)] 
Merge branch 'michal/increase-lifetime-of-docs-sid-amd64-artifacts' into 'master'

Increase lifetime of docs:sid:amd64 artifacts

See merge request isc-projects/bind9!3088

6 years agoIncrease lifetime of docs:sid:amd64 artifacts
Michał Kępień [Thu, 20 Feb 2020 10:51:58 +0000 (11:51 +0100)] 
Increase lifetime of docs:sid:amd64 artifacts

Artifacts generated by the docs:sid:amd64 job need to be retained longer
than for other jobs as they are used for building bind.isc.org contents.
If these artifacts are removed too quickly, pipelines in the pages/bind
GitLab project start failing, preventing content updates from being
published.  Increase lifetime of the relevant job artifacts to prevent
this from happening.

6 years agoMerge branch 'michal/fix-lib-isc-tests-socket_test-hangs' into 'master'
Michał Kępień [Thu, 20 Feb 2020 10:47:25 +0000 (10:47 +0000)] 
Merge branch 'michal/fix-lib-isc-tests-socket_test-hangs' into 'master'

Fix lib/isc/tests/socket_test hangs

See merge request isc-projects/bind9!3072

6 years agoFix lib/isc/tests/socket_test hangs
Witold Krecicki [Thu, 20 Feb 2020 10:39:15 +0000 (11:39 +0100)] 
Fix lib/isc/tests/socket_test hangs

6 years agoMerge branch 'wpk/perfork-2-libuv-tuning' into 'master'
Witold Krecicki [Tue, 18 Feb 2020 12:08:16 +0000 (12:08 +0000)] 
Merge branch 'wpk/perfork-2-libuv-tuning' into 'master'

Perfwork 2/6 - libuv tuning - support for uv_{recv/send}mmsg, use of libuv-provided uv_export/import

See merge request isc-projects/bind9!3066

6 years agoUse libuv-provided uv_{export,import} if available.
Witold Kręcicki [Fri, 31 Jan 2020 09:10:44 +0000 (10:10 +0100)] 
Use libuv-provided uv_{export,import} if available.

We were using our own versions of isc_uv_{export,import} functions
for multithreaded TCP listeners. Upcoming libuv version will
contain proper uv_{export,import} functions - use them if they're
available.

6 years agoMake nm->recvbuf larger and heap allocated, to allow uv_recvmmsg usage.
Witold Kręcicki [Wed, 29 Jan 2020 12:16:04 +0000 (13:16 +0100)] 
Make nm->recvbuf larger and heap allocated, to allow uv_recvmmsg usage.

Upcoming version of libuv will suport uv_recvmmsg and uv_sendmmsg. To
use uv_recvmmsg we need to provide a larger buffer and be able to
properly free it.

6 years agoMerge branch 'wpk/perfwork-1-client-mctxpool-taskpool' into 'master'
Witold Krecicki [Tue, 18 Feb 2020 11:13:07 +0000 (11:13 +0000)] 
Merge branch 'wpk/perfwork-1-client-mctxpool-taskpool' into 'master'

Perfwork 1/6 - Use thread-sharded mctxpool and taskpool in ns_client

See merge request isc-projects/bind9!3065

6 years agoUse thread-friendly mctxpool and taskpool in ns_client.
Witold Kręcicki [Tue, 28 Jan 2020 10:05:07 +0000 (11:05 +0100)] 
Use thread-friendly mctxpool and taskpool in ns_client.

Make ns_client mctxpool more thread-friendly by sharding it by
netmgr threadid, use task pool also sharded by thread id to avoid
lock contention.

6 years agoMake isc_task_pause/isc_task_unpause thread safe.
Witold Kręcicki [Tue, 28 Jan 2020 08:08:10 +0000 (09:08 +0100)] 
Make isc_task_pause/isc_task_unpause thread safe.

isc_task_pause/unpause were inherently thread-unsafe - a task
could be paused only once by one thread, if the task was running
while we paused it it led to races. Fix it by making sure that
the task will pause if requested to, and by using a 'pause reference
counter' to count task pause requests - a task will be unpaused
iff all threads unpause it.

Don't remove from queue when pausing task - we lock the queue lock
(expensive), while it's unlikely that the task will be running -
and we'll remove it anyway in dispatcher

6 years agoMerge branch 'each-tweak-penalty' into 'master'
Evan Hunt [Mon, 17 Feb 2020 22:41:54 +0000 (22:41 +0000)] 
Merge branch 'each-tweak-penalty' into 'master'

adjust the clang-format penalties to reduce string breaking

See merge request isc-projects/bind9!3079

6 years agoadjust the clang-format penalties to reduce string breaking
Evan Hunt [Mon, 17 Feb 2020 20:05:39 +0000 (12:05 -0800)] 
adjust the clang-format penalties to reduce string breaking

this corrects some style glitches such as:
```
        long_function_call(arg, arg2, arg3, arg4, arg5, "str"
                                                        "ing");
```
...by adjusting the penalties for breaking strings and call
parameter lists.

6 years agoMerge branch 'ondrej/fix-crash-on-arm64-from-weak-cmpxchg' into 'master'
Ondřej Surý [Sun, 16 Feb 2020 17:41:30 +0000 (17:41 +0000)] 
Merge branch 'ondrej/fix-crash-on-arm64-from-weak-cmpxchg' into 'master'

Fix crash on arm64 from using atomic_compare_exchange_weak outside of the loop

See merge request isc-projects/bind9!3042

6 years agoAdd arm64 to GitLab CI
Ondřej Surý [Mon, 10 Feb 2020 13:32:05 +0000 (05:32 -0800)] 
Add arm64 to GitLab CI

6 years agoReplace non-loop usage of atomic_compare_exchange_weak with strong variant
Ondřej Surý [Wed, 12 Feb 2020 08:17:55 +0000 (09:17 +0100)] 
Replace non-loop usage of atomic_compare_exchange_weak with strong variant

While testing BIND 9 on arm64 8+ core machine, it was discovered that
the weak variants in fact does spuriously fail, we haven't observed that
on other architectures.

This commit replaces all non-loop usage of atomic_compare_exchange_weak
with atomic_compare_exchange_strong.

6 years agoAdded atomic_compare_exchange_strong_acq_rel macro
Diego Fronza [Tue, 11 Feb 2020 20:21:13 +0000 (17:21 -0300)] 
Added atomic_compare_exchange_strong_acq_rel macro

It is much better to read than:
atomic_compare_exchange_strong_explicit() with 5 arguments.

6 years agoMerge branch 'ondrej/clang-format-fixups' into 'master'
Ondřej Surý [Sun, 16 Feb 2020 16:45:34 +0000 (16:45 +0000)] 
Merge branch 'ondrej/clang-format-fixups' into 'master'

clang-format fixups

See merge request isc-projects/bind9!3073

6 years agoFixup the missing clang-format bits
Ondřej Surý [Sun, 16 Feb 2020 16:34:24 +0000 (17:34 +0100)] 
Fixup the missing clang-format bits

6 years agoSwitch to clang-format-10 that's more accessible on more platforms
Ondřej Surý [Sun, 16 Feb 2020 16:34:05 +0000 (17:34 +0100)] 
Switch to clang-format-10 that's more accessible on more platforms

6 years agoMerge branch '1472-threadsanitizer-lock-order-inversion-potential-deadlock-dns_resolv...
Diego dos Santos Fronza [Fri, 14 Feb 2020 18:21:12 +0000 (18:21 +0000)] 
Merge branch '1472-threadsanitizer-lock-order-inversion-potential-deadlock-dns_resolver_createfetch-vs' into 'master'

Resolve "ThreadSanitizer: lock-order-inversion (potential deadlock) - dns_resolver_createfetch vs. dns_resolver_prime"

Closes #1472

See merge request isc-projects/bind9!3020

6 years agoFixed disposing of resolver->references in destroy() function
Diego Fronza [Tue, 11 Feb 2020 20:36:57 +0000 (17:36 -0300)] 
Fixed disposing of resolver->references in destroy() function

6 years agoFixed potential-lock-inversion
Diego Fronza [Mon, 10 Feb 2020 21:01:10 +0000 (18:01 -0300)] 
Fixed potential-lock-inversion

This commit simplifies a bit the lock management within dns_resolver_prime()
and prime_done() functions by means of turning resolver's attribute
"priming" into an atomic_bool and by creating only one dependent object on the
lock "primelock", namely the "primefetch" attribute.

By having the attribute "priming" as an atomic type, it save us from having to
use a lock just to test if priming is on or off for the given resolver context
object, within "dns_resolver_prime" function.

The "primelock" lock is still necessary, since dns_resolver_prime() function
internally calls dns_resolver_createfetch(), and whenever this function
succeeds it registers an event in the task manager which could be called by
another thread, namely the "prime_done" function, and this function is
responsible for disposing the "primefetch" attribute in the resolver object,
also for resetting "priming" attribute to false.

It is important that the invariant "priming == false AND primefetch == NULL"
remains constant, so that any thread calling "dns_resolver_prime" knows for sure
that if the "priming" attribute is false, "primefetch" attribute should also be
NULL, so a new fetch context could be created to fulfill this purpose, and
assigned to "primefetch" attribute under the lock protection.

To honor the explanation above, dns_resolver_prime is implemented as follow:
1. Atomically checks the attribute "priming" for the given resolver context.
2. If "priming" is false, assumes that "primefetch" is NULL (this is
           ensured by the "prime_done" implementation), acquire "primelock"
   lock and create a new fetch context, update "primefetch" pointer to
   point to the newly allocated fetch context.
3. If "priming" is true, assumes that the job is already in progress,
   no locks are acquired, nothing else to do.

To keep the previous invariant consistent, "prime_done" is implemented as follow:
1. Acquire "primefetch" lock.
2. Keep a reference to the current "primefetch" object;
3. Reset "primefetch" attribute to NULL.
4. Release "primefetch" lock.
5. Atomically update "priming" attribute to false.
6. Destroy the "primefetch" object by using the temporary reference.

This ensures that if "priming" is false, "primefetch" was already reset to NULL.

It doesn't make any difference in having the "priming" attribute not protected
by a lock, since the visible state of this variable would depend on the calling
order of the functions "dns_resolver_prime" and "prime_done".

As an example, suppose that instead of using an atomic for the "priming" attribute
we employed a lock to protect it.
Now suppose that "prime_done" function is called by Thread A, it is then preempted
before acquiring the lock, thus not reseting "priming" to false.
In parallel to that suppose that a Thread B is scheduled and that it calls
"dns_resolver_prime()", it then acquires the lock and check that "priming" is true,
thus it will consider that this resolver object is already priming and it won't do
any more job.
Conversely if the lock order was acquired in the other direction, Thread B would check
that "priming" is false (since prime_done acquired the lock first and set "priming" to false)
and it would initiate a priming fetch for this resolver.

An atomic variable wouldn't change this behavior, since it would behave exactly the
same, depending on the function call order, with the exception that it would avoid
having to use a lock.

There should be no side effects resulting from this change, since the previous
implementation employed use of the more general resolver's "lock" mutex, which
is used in far more contexts, but in the specifics of the "dns_resolver_prime"
and "prime_done" it was only used to protect "primefetch" and "priming" attributes,
which are not used in any of the other critical sections protected by the same lock,
thus having zero dependency on those variables.

6 years agoAdded atomic_compare_exchange_strong_acq_rel macro
Diego Fronza [Tue, 11 Feb 2020 20:21:13 +0000 (17:21 -0300)] 
Added atomic_compare_exchange_strong_acq_rel macro

It is much better to read than:
atomic_compare_exchange_strong_explicit() with 5 arguments.

6 years agoMerge branch '46-enforce-clang-format-rules' into 'master'
Ondřej Surý [Fri, 14 Feb 2020 08:45:45 +0000 (08:45 +0000)] 
Merge branch '46-enforce-clang-format-rules' into 'master'

Start enforcing the clang-format rules on changed files

Closes #46

See merge request isc-projects/bind9!3063

6 years agoDon't enforce copyrights on .clang-format
Ondřej Surý [Fri, 14 Feb 2020 08:34:21 +0000 (09:34 +0100)] 
Don't enforce copyrights on .clang-format

6 years agoReformat using the new rules
Ondřej Surý [Fri, 14 Feb 2020 07:14:03 +0000 (08:14 +0100)] 
Reformat using the new rules

6 years agoAdd separate .clang-format files for headers
Ondřej Surý [Fri, 14 Feb 2020 08:14:28 +0000 (09:14 +0100)] 
Add separate .clang-format files for headers

6 years agoSwitch AlwaysBreakAfterReturnType from TopLevelDefinitions to All
Ondřej Surý [Fri, 14 Feb 2020 07:11:40 +0000 (08:11 +0100)] 
Switch AlwaysBreakAfterReturnType from TopLevelDefinitions to All

The AlwaysBreakAfterReturnType: TopLevelDefinitions was unwrapping
the declarations of the functions in the header files.

6 years agoStart enforcing the clang-format rules on changed files
Ondřej Surý [Fri, 14 Feb 2020 06:10:06 +0000 (07:10 +0100)] 
Start enforcing the clang-format rules on changed files

6 years agoMerge branch 'each-style-tweak' into 'master'
Ondřej Surý [Fri, 14 Feb 2020 05:35:17 +0000 (05:35 +0000)] 
Merge branch 'each-style-tweak' into 'master'

adjust clang-format options to get closer to ISC style

See merge request isc-projects/bind9!3061

6 years agoapply the modified style
Evan Hunt [Thu, 13 Feb 2020 22:44:37 +0000 (14:44 -0800)] 
apply the modified style

6 years agorevise .clang-format and add a C formatting script in util
Evan Hunt [Thu, 13 Feb 2020 18:16:25 +0000 (10:16 -0800)] 
revise .clang-format and add a C formatting script in util

- add util/cformat.sh, which runs clang-format on all C files with
  the default .clang-format, and on all header files with a slightly
  modified version.
- use correct bracing after multi-line control statements
- stop aligning variable declarations to avoid problems with pointer
  alignment, but retain aligned declarations in header files so that
  struct definitions look cleaner.
- static function prototypes in C files can skip the line break after
  the return type, but function prototypes in header files still have
  the line break.
- don't break-before-brace in function definitions. ISC style calls
  for braces on the same line when function parameters fit on a single
  line, and a line break if they don't, but clang-format doesn't yet
  support that distinction. one-line function definitions are about
  four times more common than multi-line, so let's use the option that
  deviates less.

6 years agoMerge branch '46-add-curly-braces' into 'master'
Ondřej Surý [Thu, 13 Feb 2020 21:28:07 +0000 (21:28 +0000)] 
Merge branch '46-add-curly-braces' into 'master'

Add curly braces using uncrustify and then reformat with clang-format back

Closes #46

See merge request isc-projects/bind9!3057

6 years agoUse clang-tidy to add curly braces around one-line statements
Ondřej Surý [Thu, 13 Feb 2020 20:48:23 +0000 (21:48 +0100)] 
Use clang-tidy to add curly braces around one-line statements

The command used to reformat the files in this commit was:

./util/run-clang-tidy \
-clang-tidy-binary clang-tidy-11
-clang-apply-replacements-binary clang-apply-replacements-11 \
-checks=-*,readability-braces-around-statements \
-j 9 \
-fix \
-format \
-style=file \
-quiet
clang-format -i --style=format $(git ls-files '*.c' '*.h')
uncrustify -c .uncrustify.cfg --replace --no-backup $(git ls-files '*.c' '*.h')
clang-format -i --style=format $(git ls-files '*.c' '*.h')

6 years agoAdd copy of run-clang-tidy that can fixup the filepaths
Ondřej Surý [Thu, 13 Feb 2020 17:26:32 +0000 (18:26 +0100)] 
Add copy of run-clang-tidy that can fixup the filepaths

6 years agoUse coccinelle to add braces to nested single line statement
Ondřej Surý [Thu, 13 Feb 2020 17:16:57 +0000 (18:16 +0100)] 
Use coccinelle to add braces to nested single line statement

Both clang-tidy and uncrustify chokes on statement like this:

for (...)
if (...)
break;

This commit uses a very simple semantic patch (below) to add braces around such
statements.

Semantic patch used:

@@
statement S;
expression E;
@@

while (...)
- if (E) S
+ { if (E) { S } }

@@
statement S;
expression E;
@@

for (...;...;...)
- if (E) S
+ { if (E) { S } }

@@
statement S;
expression E;
@@

if (...)
- if (E) S
+ { if (E) { S } }

6 years agoMerge branch 'mnowak/coverity-disable-web-tag' into 'master'
Michal Nowak [Wed, 12 Feb 2020 14:44:56 +0000 (14:44 +0000)] 
Merge branch 'mnowak/coverity-disable-web-tag' into 'master'

Run Coverity Scan only when specific variables are present

See merge request isc-projects/bind9!3050

6 years agoRun Coverity Scan only when specific variables are present
Michal Nowak [Wed, 12 Feb 2020 14:44:55 +0000 (14:44 +0000)] 
Run Coverity Scan only when specific variables are present

Submissions to Coverity Scan should be limited to those originated from
release branches and only from a specific schedule which holds
COVERITY_SCAN_PROJECT_NAME and COVERITY_SCAN_TOKEN variables.

6 years agoMerge branch '46-just-use-clang-format-to-reformat-sources' into 'master'
Ondřej Surý [Wed, 12 Feb 2020 14:33:32 +0000 (14:33 +0000)] 
Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master'

Reformat source code with clang-format

Closes #46

See merge request isc-projects/bind9!2156

6 years agoRemove tkey_test (which is no-op anyway)
Ondřej Surý [Wed, 12 Feb 2020 13:15:10 +0000 (14:15 +0100)] 
Remove tkey_test (which is no-op anyway)

6 years agoUpdate the definition files for Windows
Ondřej Surý [Tue, 16 Jul 2019 20:33:15 +0000 (22:33 +0200)] 
Update the definition files for Windows

6 years agoUse clang-format to reformat the source files
Ondřej Surý [Wed, 12 Feb 2020 12:59:18 +0000 (13:59 +0100)] 
Use clang-format to reformat the source files

6 years agoImport Linux kernel .clang-format with small modifications
Ondřej Surý [Tue, 16 Jul 2019 20:23:06 +0000 (22:23 +0200)] 
Import Linux kernel .clang-format with small modifications

6 years agoMerge branch 'michal/minor-README-tweaks' into 'master'
Michał Kępień [Wed, 12 Feb 2020 10:37:53 +0000 (10:37 +0000)] 
Merge branch 'michal/minor-README-tweaks' into 'master'

Minor README tweaks

See merge request isc-projects/bind9!3036

6 years agoMinor CHANGES tweaks
Michał Kępień [Wed, 12 Feb 2020 10:23:48 +0000 (11:23 +0100)] 
Minor CHANGES tweaks

6 years agoMerge branch '1616-autosign-not-waiting-long-enough-for-zone-to-be-signed-v9_11-and...
Mark Andrews [Wed, 12 Feb 2020 10:07:27 +0000 (10:07 +0000)] 
Merge branch '1616-autosign-not-waiting-long-enough-for-zone-to-be-signed-v9_11-and-maybe-others-master' into 'master'

wait for apex NSEC3 to be generated

Closes #1616

See merge request isc-projects/bind9!3043

6 years agowait for apex NSEC3 to be generated
Mark Andrews [Wed, 12 Feb 2020 01:47:09 +0000 (12:47 +1100)] 
wait for apex NSEC3 to be generated

(cherry picked from commit c99ad5c8c7d24f7faa339fe86e8ed1515b4a24ce)

6 years agoMerge branch 'mnowak/coverity2' into 'master'
Michal Nowak [Wed, 12 Feb 2020 09:45:27 +0000 (09:45 +0000)] 
Merge branch 'mnowak/coverity2' into 'master'

Add Coverity Scan to CI

See merge request isc-projects/bind9!2979

6 years agoAdd Coverity Scan to CI
Michal Nowak [Wed, 12 Feb 2020 09:45:27 +0000 (09:45 +0000)] 
Add Coverity Scan to CI

This job requires two CI variables to be set:

  - COVERITY_SCAN_PROJECT_NAME: project name, which is associated with
    the BIND branch for which this job is executed, e.g. "bind-master",

  - COVERITY_SCAN_TOKEN: project token.

6 years agoMerge branch '1602-rpz-system-test-failed-because-protoype-responses-timed-out' into...
Mark Andrews [Wed, 12 Feb 2020 08:32:54 +0000 (08:32 +0000)] 
Merge branch '1602-rpz-system-test-failed-because-protoype-responses-timed-out' into 'master'

Resolve "rpz system test failed because protoype responses timed out."

Closes #1602

See merge request isc-projects/bind9!3040

6 years agospin waiting for prototype dig responses
Mark Andrews [Wed, 12 Feb 2020 02:54:17 +0000 (13:54 +1100)] 
spin waiting for prototype dig responses

6 years agoMerge branch 'wpk/netmgr-pools-unlimited' into 'master'
Witold Krecicki [Wed, 12 Feb 2020 08:10:31 +0000 (08:10 +0000)] 
Merge branch 'wpk/netmgr-pools-unlimited' into 'master'

Don't limit the size of uvreq/nmhandle pool artificially.

See merge request isc-projects/bind9!3031

6 years agoMinor README tweaks
Stephen Morris [Tue, 11 Feb 2020 14:14:50 +0000 (15:14 +0100)] 
Minor README tweaks

6 years agoDon't limit the size of uvreq/nmhandle pool artificially.
Witold Kręcicki [Mon, 10 Feb 2020 13:00:36 +0000 (14:00 +0100)] 
Don't limit the size of uvreq/nmhandle pool artificially.

There was a hard limit set on number of uvreq and nmhandles
that can be allocated by a pool, but we don't handle a situation
where we can't get an uvreq. Don't limit the number at all,
let the OS deal with it.

6 years agoMerge branch '1428-possible-data-race-in-rbtdb-happens-occasionally-on-ppc64le' into...
Ondřej Surý [Tue, 11 Feb 2020 10:42:52 +0000 (10:42 +0000)] 
Merge branch '1428-possible-data-race-in-rbtdb-happens-occasionally-on-ppc64le' into 'master'

Convert all atomic operations in isc_rwlock to release-acquire memory ordering

Closes #1428

See merge request isc-projects/bind9!2985

6 years agoConvert all atomic operations in isc_rwlock to release-acquire memory ordering
Ondřej Surý [Sat, 1 Feb 2020 09:48:20 +0000 (10:48 +0100)] 
Convert all atomic operations in isc_rwlock to release-acquire memory ordering

The memory ordering in the rwlock was all wrong, I am copying excerpts
from the https://en.cppreference.com/w/c/atomic/memory_order#Relaxed_ordering
for the convenience of the reader:

  Relaxed ordering

  Atomic operations tagged memory_order_relaxed are not synchronization
  operations; they do not impose an order among concurrent memory
  accesses. They only guarantee atomicity and modification order
  consistency.

  Release-Acquire ordering

  If an atomic store in thread A is tagged memory_order_release and an
  atomic load in thread B from the same variable is tagged
  memory_order_acquire, all memory writes (non-atomic and relaxed atomic)
  that happened-before the atomic store from the point of view of thread
  A, become visible side-effects in thread B. That is, once the atomic
  load is completed, thread B is guaranteed to see everything thread A
  wrote to memory.

  The synchronization is established only between the threads releasing
  and acquiring the same atomic variable. Other threads can see different
  order of memory accesses than either or both of the synchronized
  threads.

Which basically means that we had no or weak synchronization between
threads using the same variables in the rwlock structure.  There should
not be a significant performance drop because the critical sections were
already protected by:

  while(1) {
    if (relaxed_atomic_operation) {
      break;
    }
    LOCK(lock);
    if (!relaxed_atomic_operation) {
      WAIT(sem, lock);
    }
    UNLOCK(lock)l
  }

I would add one more thing to "Don't do your own crypto, folks.":

  - Also don't do your own locking, folks.

6 years agoMerge branch '1598-dnssec-policy-doc' into 'master'
Evan Hunt [Tue, 11 Feb 2020 09:01:36 +0000 (09:01 +0000)] 
Merge branch '1598-dnssec-policy-doc' into 'master'

Resolve "Improve dnssec-policy documentation"

Closes #1598

See merge request isc-projects/bind9!3023

6 years agorevise dnssec-policy documentation
Evan Hunt [Sat, 8 Feb 2020 07:41:18 +0000 (23:41 -0800)] 
revise dnssec-policy documentation

6 years agoMerge branch 'ondrej/remove-OpenSSL-engine-specification-in-label' into 'master'
Ondřej Surý [Mon, 10 Feb 2020 16:02:23 +0000 (16:02 +0000)] 
Merge branch 'ondrej/remove-OpenSSL-engine-specification-in-label' into 'master'

Cleanup support for specifying PKCS#11 engine as part of the label

See merge request isc-projects/bind9!2943

6 years agoRemove reference to prepending label with engine in manpage
Ondřej Surý [Mon, 10 Feb 2020 15:29:43 +0000 (07:29 -0800)] 
Remove reference to prepending label with engine in manpage

6 years agoCleanup support for specifying PKCS#11 engine as part of the label
Ondřej Surý [Wed, 22 Jan 2020 09:16:22 +0000 (10:16 +0100)] 
Cleanup support for specifying PKCS#11 engine as part of the label

The code for specifying OpenSSL PKCS#11 engine as part of the label
(e.g. -l "pkcs11:token=..." instead of -E pkcs11 -l "token=...")
was non-functional.  This commit just cleans the related code.

6 years agoMerge branch 'ondrej/null-the-destroyed-pointer-early' into 'master'
Ondřej Surý [Mon, 10 Feb 2020 05:23:38 +0000 (05:23 +0000)] 
Merge branch 'ondrej/null-the-destroyed-pointer-early' into 'master'

NULL the destroyed pointer early

See merge request isc-projects/bind9!3026

6 years agoClear the pointer to destroyed object early using the semantic patch
Ondřej Surý [Sat, 8 Feb 2020 12:37:54 +0000 (04:37 -0800)] 
Clear the pointer to destroyed object early using the semantic patch

Also disable the semantic patch as the code needs tweaks here and there because
some destroy functions might not destroy the object and return early if the
object is still in use.

6 years agoAdd semantic patch to NULL the destroyed pointer early
Ondřej Surý [Sat, 8 Feb 2020 12:31:51 +0000 (04:31 -0800)] 
Add semantic patch to NULL the destroyed pointer early

Our destroy functions usually look like this:

    void
    foo_destroy(foo_t **foop) {
        foo_t foo = *foop;
        ...destroy the contents of foo...
        *foop = NULL;
    }

nulling the pointer should be done as soon as possible which is
not always the case.  This commit adds simple semantic patch that
changes the example function to:

    void
    foo_destroy(foo_t **foop) {
        foo_t foo = *foop;
        *foop = NULL;
        ...destroy the contents of foo...
    }

6 years agoMerge branch '932-doc-query-error-logging' into 'master'
Evan Hunt [Sun, 9 Feb 2020 00:06:24 +0000 (00:06 +0000)] 
Merge branch '932-doc-query-error-logging' into 'master'

improve documentation of query logging

Closes #932

See merge request isc-projects/bind9!2976

6 years agoimprove documentation of query logging
Evan Hunt [Wed, 29 Jan 2020 23:24:43 +0000 (15:24 -0800)] 
improve documentation of query logging

6 years agoMerge branch 'michal/fix-the-pipelined-system-test-on-openbsd' into 'master'
Ondřej Surý [Sat, 8 Feb 2020 22:46:26 +0000 (22:46 +0000)] 
Merge branch 'michal/fix-the-pipelined-system-test-on-openbsd' into 'master'

Fix the "pipelined" system test on OpenBSD

See merge request isc-projects/bind9!3011

6 years agoFix the "pipelined" system test on OpenBSD
Michał Kępień [Thu, 6 Feb 2020 12:36:32 +0000 (13:36 +0100)] 
Fix the "pipelined" system test on OpenBSD

On OpenBSD, the bin/tests/system/pipelined/ans5/ans.py script does not
shut down when it is sent the SIGTERM signal.  What seems to be
happening is that starting the UDP listening thread somehow makes the
accept() calls in the script's main thread uninterruptible and thus the
SIGTERM signal sent to the main thread does not get processed until a
TCP connection is established with the script's TCP socket.  Work around
the issue by setting a timeout for operations performed on the script's
TCP socket, so that each accept() call in the main thread's infinite
loop returns after at most 1 second, allowing termination signals sent
to the script to be processed.

6 years agoMerge branch 'wpk/fix-atomics-usage' into 'master'
Ondřej Surý [Sat, 8 Feb 2020 21:46:37 +0000 (21:46 +0000)] 
Merge branch 'wpk/fix-atomics-usage' into 'master'

Fix atomics usage for mutexatomics

See merge request isc-projects/bind9!2967

6 years agoAdd mutexatomics system and unit test jobs
Witold Kręcicki [Tue, 28 Jan 2020 09:00:48 +0000 (10:00 +0100)] 
Add mutexatomics system and unit test jobs

6 years agoFix atomics usage for mutexatomics
Witold Kręcicki [Tue, 28 Jan 2020 08:43:55 +0000 (09:43 +0100)] 
Fix atomics usage for mutexatomics

6 years agoMerge branch 'ondrej/coccinelle-improvements' into 'master'
Ondřej Surý [Sat, 8 Feb 2020 11:47:42 +0000 (11:47 +0000)] 
Merge branch 'ondrej/coccinelle-improvements' into 'master'

Variaous little coccinelle improvements

See merge request isc-projects/bind9!3025

6 years agoFormatting issues found by local coccinelle run
Ondřej Surý [Sat, 8 Feb 2020 10:49:47 +0000 (02:49 -0800)] 
Formatting issues found by local coccinelle run

6 years agoReplace isc_mem_put()+isc_mem_detach() with isc_mem_putanddetach() in contrib/
Ondřej Surý [Sat, 8 Feb 2020 10:46:25 +0000 (02:46 -0800)] 
Replace isc_mem_put()+isc_mem_detach() with isc_mem_putanddetach() in contrib/

6 years agoRun the check-cocci on the whole tree, allow passing extra arguments
Ondřej Surý [Sat, 8 Feb 2020 10:33:58 +0000 (02:33 -0800)] 
Run the check-cocci on the whole tree, allow passing extra arguments

6 years agoRemove #include <config.h> from netmgr.h
Ondřej Surý [Sat, 8 Feb 2020 10:33:27 +0000 (02:33 -0800)] 
Remove #include <config.h> from netmgr.h

6 years agoMerge branch '1596-echo_ic-should-be-used-for-continuations' into 'master'
Mark Andrews [Fri, 7 Feb 2020 21:35:28 +0000 (21:35 +0000)] 
Merge branch '1596-echo_ic-should-be-used-for-continuations' into 'master'

Resolve "echo_ic should be used for continuations."

Closes #1596

See merge request isc-projects/bind9!2991

6 years agoindent failed: descriptions
Mark Andrews [Thu, 6 Feb 2020 03:18:15 +0000 (14:18 +1100)] 
indent failed: descriptions

6 years agoindent some test descriptions/continuation
Mark Andrews [Thu, 6 Feb 2020 03:16:30 +0000 (14:16 +1100)] 
indent some test descriptions/continuation

6 years agoremove space before 'failed'
Mark Andrews [Thu, 6 Feb 2020 03:13:02 +0000 (14:13 +1100)] 
remove space before 'failed'

6 years agoident continuation of test descriptions
Mark Andrews [Thu, 6 Feb 2020 03:12:31 +0000 (14:12 +1100)] 
ident continuation of test descriptions

6 years agoremove space from before 'failed'; count errors
Mark Andrews [Thu, 6 Feb 2020 03:10:15 +0000 (14:10 +1100)] 
remove space from before 'failed'; count errors

6 years agoMerge branch 'each-max-zone-ttl' into 'master'
Matthijs Mekking [Fri, 7 Feb 2020 19:28:41 +0000 (19:28 +0000)] 
Merge branch 'each-max-zone-ttl' into 'master'

dnssec-policy neater configuration

See merge request isc-projects/bind9!3006

6 years agoupdate CHANGES
Matthijs Mekking [Thu, 6 Feb 2020 16:59:14 +0000 (17:59 +0100)] 
update CHANGES

6 years agomake ISO8601 duration parsing case-insensitive for robustness
Evan Hunt [Thu, 6 Feb 2020 20:51:24 +0000 (12:51 -0800)] 
make ISO8601 duration parsing case-insensitive for robustness

6 years agovarious style cleanups
Evan Hunt [Thu, 6 Feb 2020 18:28:53 +0000 (10:28 -0800)] 
various style cleanups