Commit Graph
7043 Commits
Author SHA1 Message Date
Aram SargsyanandOndřej Surý cb1cd67bea Add CHANGES and release notes for [GL #3881] 2023-02-24 17:06:18 +01:00
Aram SargsyanandOndřej Surý c76cc58803 Add a CHANGES note for [GL !7571] 2023-02-24 15:07:14 +01:00
Aram SargsyanandOndřej Surý c29299aa15 Add a CHANGES note for [GL !7570] 2023-02-24 15:00:44 +01:00
Tony Finch 330ff06d4a Move irs_resconf into libdns and remove libirs
`libirs` used to be a reference implementation of `getaddrinfo` and
related modern resolver APIs. It was stripped down in BIND 9.18
leaving only the `irs_resconf` module, which parses
`/etc/resolv.conf`. I have kept its include path and namespace prefix,
so it remains a little fragment of libirs now embedded in libdns.
2023-02-24 09:38:59 +00:00
Evan Hunt 55f00de18e CHANGES for [GL #3886] 2023-02-24 08:30:33 +00:00
Tony Finch 9b7aa536ba QSBR: safe memory reclamation for lock-free data structures
This "quiescent state based reclamation" module provides support for
the qp-trie module in dns/qp. It is a replacement for liburcu, written
without reference to the urcu source code, and in fact it works in a
significantly different way.

A few specifics of BIND make this variant of QSBR somewhat simpler:

  * We can require that wait-free access to a qp-trie only happens in
    an isc_loop callback. The loop provides a natural quiescent state,
    after the callbacks are done, when no qp-trie access occurs.

  * We can dispense with any API like rcu_synchronize(). In practice,
    it takes far too long to wait for a grace period to elapse for each
    write to a data structure.

  * We use the idea of "phases" (aka epochs or eras) from EBR to
    reduce the amount of bookkeeping needed to track memory that is no
    longer needed, knowing that the qp-trie does most of that work
    already.

I considered hazard pointers for safe memory reclamation. They have
more read-side overhead (updating the hazard pointers) and it wasn't
clear to me how to nicely schedule the cleanup work. Another
alternative, epoch-based reclamation, is designed for fine-grained
lock-free updates, so it needs some rethinking to work well with the
heavily read-biased design of the qp-trie. QSBR has the fastest read
side of the basic SMR algorithms (with no barriers), and fits well
into a libuv loop. More recent hybrid SMR algorithms do not appear to
have enough benefits to justify the extra complexity.
2023-02-23 15:57:53 +00:00
Tony Finch 36e56923ce Simple lock-free stack in <isc/stack.h>
Add a singly-linked stack that supports lock-free prepend and drain (to
empty the list and clean up its elements).  Intended for use with QSBR
to collect objects that need safe memory reclamation, or any other user
that works with adding objects to the stack and then draining them in
one go like various work queues.

In <isc/atomic.h>, add an `atomic_ptr()` macro to make type
declarations a little less abominable, and clean up a duplicate
definition of `atomic_compare_exchange_strong_acq_rel()`
2023-02-22 16:13:37 +00:00
Evan Hunt dee4939299 CHANGES for [GL #3882] 2023-02-21 10:13:34 -08:00
Tony Finch 8bb5f37fd4 Add CHANGES and release note
[cleanup]	Move bind9_getaddresses() to isc_getaddresses()
		and remove the now empty libbind9.
2023-02-21 13:12:26 +00:00
Aram Sargsyan b086374b1d Add a CHANGES note for [GL #3880] 2023-02-21 08:23:59 +00:00
Tony Finch dcb54af220 Move bind9/check to isccfg/check
Since it is part of the configuration machinery
2023-02-17 12:13:37 +00:00
Evan HuntandOndřej Surý e49350721f CHANGES for [GL #3797] 2023-02-17 07:18:25 +01:00
Michal Nowak 3203d6c549 Merge tag 'v9_19_10'
BIND 9.19.10
2023-02-16 13:38:33 +01:00
Tony Finch 9892ac791c Add CHANGES note
[cleanup]	Several nugatory headers have been removed from libisc
2023-02-15 16:44:47 +00:00
Tony Finch b0893ae09a Explain <isc/strerr.h> a little more
The purpose of the `strerror_r()` wrapper was not obvious.
2023-02-15 16:44:09 +00:00
Tony FinchandTony Finch 75f7a85a39 Deprecate <isc/deprecated.h>
We refactor more freely these days.
2023-02-15 15:36:20 +00:00
Ondřej Surý 459db4462f Add CHANGES note for [GL #1609] 2023-02-15 09:30:21 +01:00
Mark Andrews 55a6b15087 Add CHANGES note for [GL !7417] 2023-02-15 18:55:18 +11:00
Tony Finch 436b76bb17 Improve the spinloop pause / yield hint
Unfortunately, C still lacks a standard function for pause (x86,
sparc) or yeild (arm) instructions, for use in spin lock or CAS loops.
BIND has its own based on vendor intrinsics or inline asm.

Previously, it was buried in the `isc_rwlock` implementation. This
commit renames `isc_rwlock_pause()` to `isc_pause()` and moves
it into <isc/pause.h>.

This commit also fixes the configure script so that it detects ARM
yield support on systems that identify as `aarch*` instead of `arm*`.

On 64-bit ARM systems we now use the ISB (instruction synchronization
barrier) instruction in preference to yield. The ISB instruction
pauses the CPU for longer, several nanoseconds, which is more like the
x86 pause instruction. There are more details in a Rust pull request,
which also refers to MySQL making the same change:
https://github.com/rust-lang/rust/pull/84725
2023-02-14 17:13:24 +00:00
Aram Sargsyan a5927f1151 Add a CHANGES note for [GL #3866] 2023-02-14 09:13:18 +00:00
Mark Andrews 2928f21733 Add CHANGES note for [GL #3662] 2023-02-14 10:10:39 +11:00
Ondřej SurýandMichał Kępień 6fa48c963e Add CHANGES and release note for [GL #3840] 2023-02-09 15:04:52 +01:00
Tony FinchandTony Finch 174e56a251 Fix CHANGES numbering
Oops, I broke it
2023-02-09 13:41:04 +00:00
Tony FinchandTony Finch 9721fa2153 Reduce the size of rdatasetheader_t by 16 bytes
Re-order the fields to avoid padding, and change the type of
`heap_index` to `uint16_t` to match `dns_rbtnode_t->locknum`.
2023-02-09 09:07:30 +00:00
Mark Andrews ae26fcb8f5 Add CHANGES note for [GL #3831] 2023-02-09 08:35:27 +11:00
Ondřej Surý 72cfca9b3b Add CHANGES and release notes for [GL #3729] 2023-02-08 21:33:23 +01:00
Aram Sargsyan 2a1f937536 Add a CHANGES note for [GL #3839] 2023-02-07 10:41:21 +00:00
Evan Hunt 4f50854e7a CHANGES for [GL #3790] 2023-02-06 15:04:24 -08:00
Evan Hunt c144fd2871 CHANGES for [GL #3850] 2023-02-06 14:39:43 -08:00
Tony FinchandTony Finch 50ab648f8a Remove unused support for fromwire(DNS_NAME_DOWNCASE)
Most of this change is fixing dns_rdata_fromwire() so
it does not propagate the unused options variable.
2023-02-06 13:26:36 +00:00
Tony Finch c70bb3deb5 Remove some remnants of bitstring labels
* rbt node chains were sized to allow for bitstring labels, so they
  had 256 levels; but in the absence of bistrings, 128 is enough.

* dns_byaddr_createptrname() had a redundant options argument,
  and a very outdated doc comment.

* A number of comments referred to bitstring labels in a way that is
  no longer helpful. (A few informative comments remain.)
2023-02-06 13:22:30 +00:00
Tony FinchandTony Finch ff63b53ff4 Add isc_time_monotonic()
This is to simplify measurements of how long things take.
2023-02-06 12:14:51 +00:00
Tony Finch b8e71f9580 Fix ISC_MEM_ZERO on allocators with malloc_usable_size()
ISC_MEM_ZERO requires great care to use when the space returned by
the allocator is larger than the requested space, and when memory is
reallocated. You must ensure that _every_ call to allocate or
reallocate a particular block of memory uses ISC_MEM_ZERO, to ensure
that the extra space is zeroed as expected. (When ISC_MEMFLAG_FILL
is set, the extra space will definitely be non-zero.)

When BIND is built without jemalloc, ISC_MEM_ZERO is implemented in
`jemalloc_shim.h`. This had a bug on systems that have malloc_size()
or malloc_usable_size(): memory was only zeroed up to the requested
size, not the allocated size. When an oversized allocation was
returned, and subsequently reallocated larger, memory between the
original requested size and the original allocated size could
contain unexpected nonzero junk. The realloc call does not know the
original requested size and only zeroes from the original allocated
size onwards.

After this change, `jemalloc_shim.h` always zeroes up to the
allocated size, not the requested size.
2023-02-06 11:21:12 +00:00
Michal Nowak ba798c7c69 Add a CHANGES marker 2023-02-03 11:55:36 +01:00
Michał Kępień 493eadd1ae Add CHANGES entry for GL #3827 2023-02-01 11:22:59 +01:00
Mark Andrews 13e0dfbae2 Add CHANGES for [GL #3828] 2023-02-01 00:35:11 +11:00
Mark Andrews fda7858e74 Add CHANGES for [GL #3830] 2023-01-31 23:52:19 +11:00
Mark Andrews 1d258e2fb8 Add CHANGES for [GL #3829] 2023-01-30 22:26:50 +00:00
Matthijs Mekking 38ffe5acf3 Add CHANGES for #3822 2023-01-27 15:07:26 +00:00
Michał Kępień 4e934bae0b Merge tag 'v9_19_9'
BIND 9.19.9
2023-01-25 21:16:00 +01:00
Ondřej Surý 122737ace6 Add CHANGES and release note for [GL #3718] 2023-01-24 17:57:16 +00:00
Aram Sargsyan 73e9390715 Add CHANGES and release notes for [GL #3726] 2023-01-20 14:45:30 +00:00
Mark Andrews e706fb81ca Add CHANGES note for [GL #3800] 2023-01-20 11:06:08 +11:00
Mark Andrews 5c471c5d2c Add CHANGES for [GL #3799] 2023-01-19 23:52:37 +11:00
Aram Sargsyan 5a1707aa8d Add a CHANGES note for [GL #3808] 2023-01-19 10:24:36 +00:00
Matthijs Mekking dbbacd910f Add CHANGES and release note for GL #3783
News worthy.
2023-01-19 10:19:43 +00:00
Ondřej Surý 401294cf60 Add CHANGES and release note for [GL #3795] 2023-01-18 19:36:26 +01:00
Evan Hunt 22d1951aa6 CHANGES and release note for [GL #3781] 2023-01-17 17:29:43 -08:00
Evan Hunt d6768d6000 CHANGES and release note revision for [GL #3789] 2023-01-17 16:18:21 -08:00
Ondřej Surý b049e329ef Add CHANGES and release note for [GL #3801] 2023-01-17 21:48:30 +01:00