Expand big-ticket a bit, compilers, and reformat bulleted lists to stick together.
[ikiwiki.git] / release58 / index.mdwn
1 # DragonFly BSD 5.8
2
3 * Version 5.8.0 released xx MM 2020
4
5
6 DragonFly version 5.8 brings ....
7
8 The details of all commits between the 5.6 and 5.8 branches are available in the associated commit messages for [5.8.0rc1](http://lists.dragonflybsd.org/pipermail/commits/2020-February/720529.html) and [5.8.0]().
9  
10 ## Big-ticket items
11
12 * 'dsynth' written and added to base, making it more convenient for users to build their own binary repos for ports.  dsynth is used to build some or all of the dports collection, over 25000 third-party packages.  It's also working as an informal performance measure, with many of the changes in this release to speed up DragonFly when building multiple dependent packages.
13
14 * Many ports these days seem to assume a greater degree of signal safety for libc function, particularly for malloc().  We have implemented a low-overhead signal masking feature that now allows us to make malloc*() and other related functions signal-safe.
15
16 * A ton of bug fixes, stability work, and usability work has gone into this release.  Many niggling little annoyances, such as chrome stuttering when system memory is low, have been fixed.
17
18 * DRM (GPU) support continues to improve slowly but steadily.
19
20 ## Details
21
22 ### Checksums
23
24     MD5 (dfly-x86_64-5.8.0_REL.img) = 
25     MD5 (dfly-x86_64-5.8.0_REL.iso) = 
26     MD5 (dfly-x86_64-5.8.0_REL.img.bz2) = 
27     MD5 (dfly-x86_64-5.8.0_REL.iso.bz2) = 
28
29 ### Upgrading
30
31 If you have an existing 5.x system and are running a generic kernel, the normal upgrade process, described below, will work.  
32
33 Change your local `/usr/src` to 5.8:
34
35     cd /usr/src
36     git fetch origin
37     git branch DragonFly_RELEASE_5_8 origin/DragonFly_RELEASE_5_8
38     git checkout DragonFly_RELEASE_5_8
39     git pull
40
41 And then rebuild: (in `/usr/src`)
42
43     make buildworld
44     make buildkernel
45     make installkernel
46     make installworld
47     make upgrade
48
49     (reboot your system)
50
51     make initrd 
52
53 `make initrd` is optional for systems with unencrypted disks, and has been possible for several releases; it's mentioned here for completeness. Look at the [initrd(7)](https://leaf.dragonflybsd.org/cgi/web-man?command=initrd&section=ANY) man page for details on what it does.
54
55 Don't forget to upgrade your existing packages.  5.8 packages have already been built and are immediately available.
56
57     pkg update
58     pkg upgrade
59
60 ## All other changes since prior release
61
62 ### Security Issues
63
64 * Fix two minor kernel stack disclosures and a few minor memory leaks.
65 * Fix a buffer overflow in libfetch (CVS-2020-7450)
66 * Fix CVE-2019-18218.
67 * Fix two environment variable vulnerabilities in the telnet client.
68
69 ### Kernel
70
71 * Scaling adjustments to improve performance on high-core-count machines.  VM page lookup shortcuts, reduced contention when opening special devices like /dev/lpmap, reduced contention for open(... O_RDWR) calls, recoded namecache (mp, ncp) mount point lookup cache.
72 * Significantly reduce SMP contention in low-memory situations.
73 * Significantly improve page selection in the pageout scan.  SMP work over the last few years marginalized the page selection algorithm, causing it to often select pages which were actually active.  These changes significantly reduce the selection of such pages in favor of inactive pages.  The result is the elimination of stuttering in applications like Chrome when system memory is tight.
74 * Do not shortcut VM faults of INACTIVE pages, require the long-path to ensure that the pages are moved to the ACTIVE queue first.  This prevents premature pageout of heavily cached VM pages such as pages from highly-shared libraries.
75 * Improve pageout daemon pipe-lining by fixing some of the hysteresis code.  Also improve the early-termination checks for the pageout daemon to stop paging more quickly when a large amount of memory is suddenly freed up.
76 * Fixed a rare wait*() deadlock.
77 * The vm.fault_quick sysctl now supports a burst count, but the default is still 1.  We do not expect significant gains in performance until the APIs can be refactored all the way through to the low-level pmap code.
78 * Offset the stathz timer by 50% of the hz timer and change default frequency to (hz + 1).  This is intended to reduce sampling errors that were causing phantom 'interrupt' time accumulation in system statistics.
79 * Refactor the random number generator in the kernel and also as supplied to userland to use per-cpu state.  This gets rid of a significant source of SMP contention under heavy loads.  Adjust the RDRAND driver to collect entropy on all CPUs, as well as to chain some of the entropy between CPUs.  This ensures that no single CPU can accidentally become deficient. 
80 * Reduce excessive rdrand harvesting.  The rdrand harvesting rate was too high and causing high-core-count Zen CPUs to burn 2-3% of the system cpu at idle.  The harvest size has been reduced to compensate.  In addition, some of the entropy is chained between CPUs to ensure that entropy collection on one cpu is not only beneficial to that cpu.
81 * Fix a USB crash on quick plug/detach/plug/detach sequences.
82 * Add system call support for realpath(3), allowing the kernel to build the path for us instead of having to cycle tons of *stat() calls.
83 * Add system call support for getrandom(2).  We already had a sysctl-based mechanism and a device mechanism.
84 * Fix a bug in the (rare) lockmgr cancel path.
85 * Fix 'indefinite wait buffer' live-locks related to encrypted disks.  The encrypted I/O path had a low-memory deadlock that could prevent paging to encrypted-swap from happening, resulting in a locked up system.
86 * Reduce mpipe overhead, improving (primarily) encrypted I/O performance a bit.
87 * Fix a panic in the control messages processing for IPV6.
88 * Enable keyboard polling in shutdown -h to try to keep the keyboard operational at the 'press any key to reboot' message.
89 * Fix a dangling ref on filesystem fifo vnodes.  This could prevent umount from succeeding indefinitely.
90 * Merge a m_pulldown() bug fix (discussed with multiple BSDs).  See c24e3890e671.
91 * Enable busmaster operation on bridges (the BIOS might not).
92 * Make sure the %fs selector is properly loaded in the AP bootstrap.  Otherwise the selector may be invalid on certain Zen 2 CPUs.
93 * Change the TCP keepalive options from milliseconds to seconds, making the units the same as linux, in order to improve ports compatibility.
94 * Fix a rare pmap placemarker timing race that could cause a process to get stuck in 'pvplw'.
95 * Implement SMAP/SMEP support.
96 * Fix vm.swap_size reporting and add a new sysctl, vm.swap_free.
97 * Fix a minor kernel memory leak related to the rt_msg_buffer() API.
98 * Check for deferred interrupts in more crit_exit*() paths, undoing some optimizations made in prior years.  The checks are necessary to avoid non-deterministic interrupt response times in certain cases.
99 * Jails are now allowed to mount nullfs and tmpfs filesystems.
100 * Get rid of udev_t.
101 * Add sysctl support for CTLTYPE_BIT32 and CTLTYPE_BIT64, allowing sysctl to directly control the same flags field with separate sysctl elements.
102 * Add /dev/lpmap, a per-thread shared user/kernel page.  This page allows userland to implement temporary signal blocking on a per-thread basis without having to make any system calls.
103 * Add support for pthread_get_name_np() via a new system call, lwp_getname().  Reimplement lwp_setname() via the new /dev/lpmap feature (i.e. make it work without needing a system call).  Also, setproctitle() now uses upmap->proc_title[].
104 * Catch infinite parser recursions in broken ACPI.
105 * Fix a bug in the lockf code that could cause a process to hang indefinitely in "lockfz".
106 * Jails - Rework sysctl configuration variables.  man jail for more information.
107 * Fix numerous devfs bitmap races primarily related to PTY allocation and management.
108
109 ### Filesystems
110
111 * NULLFS - Improve mount/umount performance slightly.
112 * TMPFS - Improve by not reserving an entire 16KB buffer cache buffer for files <= 8KB in size.  Small files now eat 4KB, 8KB, or 12KB of physical memory before returning to multiples of 16KB.
113 * TMPFS - Reduce low-memory thrashing.  Normally TMPFS cycles pages through the VM page cache only and avoids flushing them to backing store (swap).  In low-memory conditions, TMPFS now cycles dirtied pages through the buffer cache and bypasses the inactive queue upon completion to avoid interfering with memory pressure caused by processes.
114 * TMPFS - Enable write-clustering, improving paging performance when under memory pressure.  Prior to this fix, physical I/O was limited to 16KB chunks.
115 * TMPFS - Make tmpfs_move_pages() more robust to close potential race conditions.  Fix a number of other race conditions as well.
116 * HAMMER2 - Fix inode & chain limits in order to avoid kmalloc pool assertions on low-memory machines.
117 * HAMMER2 - Significantly improve the flush pipeline and dirty inode count hysteresis.  This fixes a long-standing issue where heavy filesystem activity was not making use of available I/O bandwidth due to a number of tsleep() stalls in the flusher loop.  This also improves frontend-operation vs backend-flush concurrency.
118 * HAMMER2 - Fix a bug where a small file less than or equal to 512 bytes that is extended above 512 bytes can sometimes lose data in the first 512 bytes (replaced with 0x00 bytes).
119 * HAMMER2 - Fix an indefinite stall that could occur when I/O errors are encountered.
120 * HAMMER2 - Add an emergency operations mode to allow recovery of ENOSPC edge cases.  This is a mode which allows snapshots to be destroyed by updating inodes in-place, allowing the removal of a files and directories in situations where the normal block-copy-on-write mechanism does not function due to lack of space.
121 * HAMMER2 - Fix a number of issues and significantly improve performance by optimizing how H2 support threads are dispatched.
122 * MSDOSFS - Many fixes and improvements, some taken from FreeBSD.
123 * DEVFS - Fixed a missing lock that could result in a panic during heavy duplicate mount/umount activity.
124 * All filesystems now default to microseconds precision instead of seconds precision.  The use of nanoseconds is problematic due to utimes()'s archaic API.
125 * NFS - Fix a rare NFS deadlock related to mmap()'s I/O.
126
127 ### Networking
128
129 * Add support for IPV4 /31 prefixes (RFC 3021).
130 * Fix bug in IF_TAP's SIOCSIFMTU.
131 * PF - Fix a number of edge cases, but these fixes have not dealt with all reported PF issues.
132 * Add support for SIOCSIFINFO_IN6.
133 * Refactor the CMSG_ALIGN mechanic for network control messages to work properly with modern data types.
134 * Return EHOSTDOWN under certain situations in the route lookup code.  Don't mark cloned route as RTF_REJECT or RTM_MISS.  Also separate route messages from creation/lookup.
135 * Ensure that RTM_IFINFO is sent first when bringing an interface up or down, as route update messages can overflow the route socket.
136 * Add support for SO_RERROR.
137
138 ### Graphics
139
140 * Update generic, ttm, and radeon code to Linux 4.9.  i915 remains on linux 4.7.10 though with some linux 4.19 changes.
141 * Fix some DMAP issues with the way linux expects pmap_change_attr() to work.
142
143 ### Driver updates
144
145 * SOUND/HDA - use driver-specific taskqueue instead of per-cpu taskqueue.
146 * PSM - Fix memory corruption and panic, add Elantech IC type 15 support (thinkpad L480 laptops).
147 * AHCI - Add a quirk for the MCP73 AHCI controller.
148 * AHCI - Add a TPS balancing mode for storage devices, enabled by default.  This feature brings write tps down to match read tps when both are pending.  Normally both read and write I/Os get a few private tags, but because write I/O is heavily buffered by the device even a single tag can destroy read performance.
149 * AHCI - Enforce a 10-second poll of the chipset when idle to try to catch any potential lost interrupts.  This is an attempt to work around a 'lost' timeout issue that we sometimes see.
150 * u4b/uaudio - Fix NULL pointer indirection panic.
151 * IWM - Full sync from FreeBSD, adding iwm-9000 and iwm-9260 support.
152 * SIO - Refactor some of the code.
153 * AMDSBWD and INTPM - Updated for AMD watchdog, power management on newer chips.
154
155 ### Userland
156
157 * Binutils234 added, and 225 removed.  2.27 is still the default for now.
158 * pctrack (%rip sampler) - Improved symbol table translation.
159 * Sync math.h, sincos(), and other math support from OpenBSD.
160 * Synt <sys/ttydefaults.h> from FreeBSD to improve ports compatibility.
161 * Synchronize improvements made to fsck_msdosfs from FreeBSD.
162 * Check if the context is invalid in setcontext() and swapcontext() to throw errors earlier in situations where too-small a stack size has been specified.
163 * fish - bug fixes.
164 * Fix 'ps' and 'fstat' when used on kernel cores.
165 * vmstat now pulls 'ncpus' from the kernel core image, when used with a kernel core.  Also make the verbose (-v) option work with (-m), dumping all memory pools whether they are empty or not.
166 * Adopt a more linux-friendly basename() and dirname() to improve ports compatibility.
167 * Fix bug in fparseln() (taken from NetBSD).
168 * libc/getaddrinfo() - Accept numeric servname for AF_INET / AF_INET6.  Take from FreeBSD.
169 * Update zoneinfo to tzdata2019c.
170 * Fix an issue when rotating /var/log/wtmpx.
171 * iostat - fix column count bug.
172 * libdevstat - Fix a bug in DS_SELECT_REMOVE.
173 * libc - Add sigblockall() and sigunblockall() (DragonFly native API), a fast way to mask signals for a short period of time without having to make any system calls.
174 * libc - Make signal safe (primarily for malloc() and friends).  Numerous ports now assume more expansive signal safety for various libc functions.
175 * libc - Make strtok() thread-safe.
176 * libc - Add TABDLY, TAB0, and TAB3 to improve dports support.
177 * libc - Add __errno_location() for better ports compatibility, particularly for some languages which need an actual procedure to call rather than a macro for their run-times.
178 * libc - sync to openresolv-3.9.2.
179 * libc - Significant utmpx changes, taken from NetBSD and FreeBSD mostly.
180 * Remove mrouted and related utilities from the tree.  Newer, better versions can be found in dports and ours was getting crufy.
181 * Import dhcpcd-8.1.3.
182 * libkvm - Fix mask generation when parsing minidumps.  This fixes many of the corrupted dump issues reported.
183 * leave - Allow up to 99 in the minutes field in + mode.  Just like microwaves do.
184 * Phantasia - Fix monsters file permissions.
185 * du - Add an option (-t) to return results based on the file size instead of st_blkcnt.
186 * libpthreads - Fix numerous issues.
187 * Calendar - Multiple improvements, mostly taken from NetBSD.
188
189 ### Boot, Image
190
191 * rcorder-visualize.sh imported from FreeBSD
192 * Sync ACPI with Intel's version 20200214
193 * Unbreak the EFI build when WORLD_LDVER is overridden.
194 * The installer now chooses a more sane default for the /build partition.
195 * EFI - Sync our TianoCore EDK II headers to edk2-stable201911.
196 * Refactor malloc_type in the kernel, which caused an excessive amount of static data in the image.  This reduces the image size by 6MB.
197 * Warn when duplicate physical address ranges for free memory are passed in from the BIOS, instead of crashing.
198
199 ### Various tools have been upgraded in the base system:
200
201 * The build system is slowly being adapted to allow bootstrap utilities and tools to be compiled on a wide range of operating systems as part of a project to supply a 'build.sh' script to be able to build DragonFlyBSD on other OSs.  This work is not yet complete.
202 * The build system now has a 'build-all' and 'install-all' target to conveniently do a full world + kernel build and install in one or two steps as desired.
203 * Multiple cleanups to kern.pre.mk and kern.post.mk.
204 * No longer try to generate embedded newlines in strings, instead use POSIX string concatenation.
205 * The nrelease build now supports 'binpkgs' to allow the use of binary packages, and has received many other fixes and improvements.
206
207 ### Compiler status
208
209 * Currently using GCC 8 by default, with GCC 4.7 built but not used as fallback.  
210
211 ### Package updates
212
213 * A full set of new binary packages has been built for 5.8, available through the pkg tool.