kernel - Change tcp keepalive options from ms to seconds (DISRUPTIVE) (2)
* Refactor the code slightly to adopt the same limits and behavior
as linux. Instead of capping out we return EINVAL on any out-of-
bound value.
* Also note that my history was wrong. Sephe actually implemented
these options, not me, and it was in 2011 (8 years ago, not 15+).
So much for my vague memory! At the time other operating used wildly
different metrics, and we chose to use milliseconds. But in the
intervening years it looks like the main systems have adopted a
1-second interval.
In changing our parameters to match, we avoid a lot of pain when
porting third party applications that use it, particularly chrome.
But also a few others.
If we need sub-second parameters in the future we will implement
new option keywords for it.
kernel - Change tcp keepalive options from ms to seconds (DISRUPTIVE)
* Change TCP_KEEPINIT, TCP_KEEPIDLE, and TCP_KEEPINTVL units from
milliseconds to seconds, matching most other operating system
distributions.
This is after the Nth time we've hit problems porting applications.
* I've decided to make this change, even though it is disruptive
(a significant API change). It shouldn't effect most use cases
and it fixes things like chromium without us having to continuously
patch the chromium sources.
* Fixes numerous too-fast-a-timeout issues with chrome.
Fix building release on master.
* <histedit.h> was moved to /usr/include/priv on master, so add that
to the include search path when building sh(1) as a bootstrap tool.
* Fix the apropos(1) database generation (used for 'make distribution').
If the system doesn't have the makewhatis(8) for a compatible
database, just build no database.
kernel - Restore kern.cam.da.X.trim_enabled sysctl
* This sysctl was not always being properly installed due to an
ordering and timing issue.
* The code was not setting the trim flag in the correct structure.
kernel - MFC portions of the MAP_STACK fix
* MFC portions of d6924570fb and 4837705ef8 from master. This changes
MAP_STACK semantics to better-align with application expectations.
In particular, we finish the transition to requiring MAP_TRYFIXED
in order to allow a mapping to use the ungrown area of a MAP_STACK
mapping, and we basically kill userland's ability to create auto-grow
mappings by converting MAP_STACK to a normal anonymous mmap.
* The original auto-grow feature for the primary user stack as created
by the kernel's exec() code remains intact in order to remain compatible
with the pthreads library in -release.
kernel - Permanently fix FP bug (mfc)
* Bring in 007800820 from master, but just just by setting the heuristic
mode to 1 to force a FPU restore on every thread switch. Do not allow
the heuristic to be changed.
The heuristic has been completely removed from master.
<execinfo.h>: Include <sys/cdefs.h> explicitly for __{BEGIN,END}_DECLS.
Normally this should come in via our <stddef.h>, but ports compilers
might include the compiler's own <stddef.h> that doesn't seem to
include it.
Reported-by: profmax
pf - Fix SMP race in max-src-nodes, max-src-conn tracking
* Fix a SMP race in max-src-nodes tracking where an atomic op was
not being used.
* Fix a possible SMP race in max-src-conn tracking where atomic ops
were not being used.
Reported-by: zach
nrelease: Install security/ca_root_nss explicitly (non-automatic).
This is to prevent it accidentally being removed by an autoremove
after deleting the package that brought it in as a dependency.
Reported-by: Frank Rehwinkel <frankrehwinkel at gmail.com>
kernel - Add /dev/part-by-label
* The DragonFly disklabel has a 'label' field which accepts up to
a 63 byte ascii label.
* When this field is not empty, the kernel will now create a
"/dev/part-by-label/<label>.<part>" alias.
For example, if the label is FUBAR and you create a label with
partitions 'a', 'b', and 'd', then you will get:
# ls /dev/part-by-label
FUBAR.a FUBAR.b FUBAR.d
* WARNING! Duplicate labels will replace each other, so the
label that shows up will be non-deterministic.
Suggested-by: Aaron LI
hammer2 - Correct allocator race and related corruption
* When allocating fragments (below 16KB), for example 1K directory
entries, 1K inodes, compressed file blocks that happen to be
fragments, or end-of-file fragments, the allocator must ensure
that any partially freed block is set back to fully allocated.
* In this specific case the allocator was not setting the
correct bits in the freemap. The situation never occurs
on a block boundary (different code is executed which does
the correct calculation), so the related block will always
be in a minimally allocated state (either partially allocated
or fully allocated).
This means that the corruption can only happen under the specific
circumstance where a fragment is allocated out of a block that
the bulkfree code is simultaneously trying to free (marking it
partially-allocated). Because the wrong bits are set, the NEXT
bulkfree pass can also miss the fact that the fragment is
[14 lines not shown]
Sync zoneinfo database with tzdata2019a from ftp://ftp.iana.org/tz/releases
* Palestine will not start DST until 2019-03-30, instead of 2019-03-23 as
previously predicted.
* Metlakatla rejoined Alaska Time (from previously Pacific Standard Time)
on 2019-01-20.
* Affecting older timestamps only: Israel observed DST in 1980 and 1984.
For a detailed list of changes, see share/zoneinfo/NEWS.
smbfs - Bring in some string safety and type-o corrections
* Bring in some string safety fixes and type-o corrections from
FreeBSD.
Submitted-by: Varun C H
Taken-from: FreeBSD
hammer2 - Fix panic on corrupt root inode on mount
* If the root inode is corrupt at mount time H2 was panicing
instead of cleanly aborting. Fixed by adding missing initialization.
* This case can occur when the device is partially overwritten by
a dd or another filesystem. Redundant volume headers may still alow
H2 to find one, but the iroot might reside at a lower block number and
already have been blown away.
Reported-by: BJoe / Bug #3181
kernel - Fix info->si_code for waitid() (2)
* Our si_status was W*() encoded, but linux does not W*() encode
theirs.
Do not W*() encode ours either. Also properly decode the exit signal
and exit code.
kernel - Fix info->si_code for waitid()
* info->si_code was improperly setting CLD_KILLED for normal exit()s
with non-zero exit codes.
Reported-by: tuxillo
psm - Fix panic in ps/2 mouse driver
* Fix a race in the ps/2 driver where a callout could be interrupted
by psmintr() and corrupt the ps/2 packet buffer, causing a panic.
* Use a lockmgr lock instead of (archaic) critical sections for interrupt
protection. Also use the locked callout API. This will hopefully
prevent any further corruption.
Reported-by: drill-use at irc
rtld-elf - Allow dynamic (late) relocations to relro section
* Normally the relro section is mprotect()ed to read-only after normal
load relocations.
* It appears that some programs can issue dynamic relocations at
run-time to such sections.
* If the relro mprotect has been done on an object, temporarily mprotect
the object back to RW to execute the relocation, then mprotect it back
to RO.
Reported-by: marino