DragonFlyBSD/src cb7663dsys/netinet tcp_usrreq.c

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.
DeltaFile
+16-24sys/netinet/tcp_usrreq.c
+16-241 files

DragonFlyBSD/src 842346bsys/netinet tcp_usrreq.c

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.
DeltaFile
+36-24sys/netinet/tcp_usrreq.c
+36-241 files

DragonFlyBSD/src 68ea669bin/sh Makefile, share/man Makefile

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.
DeltaFile
+5-3share/man/Makefile
+2-2bin/sh/Makefile
+7-52 files

DragonFlyBSD/src 7f62b37lib/libc/gen _pthread_stubs.c

libc: Implement properly pthread_equal() stub.

Functional stub is needed to avoid forcing thread library on librecrypto.
DeltaFile
+3-3lib/libc/gen/_pthread_stubs.c
+3-31 files

DragonFlyBSD/src 2ee9073sys/bus/cam/scsi scsi_da.c

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.
DeltaFile
+10-9sys/bus/cam/scsi/scsi_da.c
+10-91 files

DragonFlyBSD/src e4d1cf3sys/kern kern_exec.c, sys/vm vm_mmap.c vm_map.c

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.
DeltaFile
+30-3sys/vm/vm_mmap.c
+11-11sys/vm/vm_map.c
+1-1sys/vm/vm_map.h
+1-1sys/kern/kern_exec.c
+43-164 files

DragonFlyBSD/src 08697afsys/platform/pc64/x86_64 npx.c

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.
DeltaFile
+8-2sys/platform/pc64/x86_64/npx.c
+8-21 files

DragonFlyBSD/src b38f04dlib/libexecinfo execinfo.h

<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
DeltaFile
+1-0lib/libexecinfo/execinfo.h
+1-01 files

DragonFlyBSD/src af7431dsys/net/pf pf.c

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
DeltaFile
+3-3sys/net/pf/pf.c
+3-31 files

DragonFlyBSD/src 8bf12dfnrelease Makefile

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>
DeltaFile
+2-1nrelease/Makefile
+2-11 files

DragonFlyBSD/src 219f0bcsys/kern tty_pty.c

kernel/tty: Use GID_TTY for non root users by default.

Previous behaviour defaulting to GID_WHEEL was confusing OpenSSH tests.
DeltaFile
+1-1sys/kern/tty_pty.c
+1-11 files

DragonFlyBSD/src 74d9ef4sys/dev/disk/xdisk xdisk.c, sys/dev/misc/snp snp.c

Fix a couple of NULL dereferences in error paths.
DeltaFile
+5-3usr.bin/chpass/chpass.c
+2-4sys/dev/misc/snp/snp.c
+1-3sys/dev/disk/xdisk/xdisk.c
+1-1sys/dev/raid/mrsas/mrsas.c
+9-114 files

DragonFlyBSD/src 51879fcsys/kern subr_disk.c subr_disklabel32.c, sys/sys disklabel.h

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
DeltaFile
+23-1sys/kern/subr_disk.c
+19-0sys/kern/subr_disklabel32.c
+19-0sys/kern/subr_disklabel64.c
+4-0sys/sys/disklabel.h
+65-14 files

DragonFlyBSD/src 2b39a47sys/vfs/hammer2 hammer2_bulkfree.c hammer2_freemap.c

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]
DeltaFile
+21-15sys/vfs/hammer2/hammer2_bulkfree.c
+9-2sys/vfs/hammer2/hammer2_freemap.c
+30-172 files

DragonFlyBSD/src 42affb8sys/dev/sound/pci/hda hdaa_patches.c hdac.h

kernel - Add AC256 (sound) quirk

* Add quirk for AC256 sound devices.

Taken-from: FreeBSD
Tested-by: drill-use at irc
DeltaFile
+5-0sys/dev/sound/pci/hda/hdaa_patches.c
+1-0sys/dev/sound/pci/hda/hdac.h
+6-02 files

DragonFlyBSD/src 808474bshare/zoneinfo NEWS asia

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.
DeltaFile
+51-2share/zoneinfo/NEWS
+39-3share/zoneinfo/asia
+10-1share/zoneinfo/northamerica
+6-4share/zoneinfo/africa
+4-4share/zoneinfo/iso3166.tab
+3-3share/zoneinfo/leapseconds
+113-174 files not shown
+119-2310 files

DragonFlyBSD/src db257d4sbin/dumpfs dumpfs.c

dumpfs(8): Fix conversion of 32 bit ufs_time_t's with ctime().

Data from neighboring fields was leaking in, leading to odd dates.
DeltaFile
+6-3sbin/dumpfs/dumpfs.c
+6-31 files

DragonFlyBSD/src 404380bsbin/sysctl sysctl.c

sysctl(8): Add support for char and short sized values.

This was missing from 347aefc6a85af5bf5b7a1a6918f706878a8232ef.

Reported-by: zrj
DeltaFile
+34-0sbin/sysctl/sysctl.c
+34-01 files

DragonFlyBSD/src fba5272contrib/smbfs README, contrib/smbfs/lib/smb subr.c nbns_rq.c

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
DeltaFile
+4-4contrib/smbfs/README
+4-0contrib/smbfs/lib/smb/subr.c
+1-1contrib/smbfs/smbutil/print.c
+1-1contrib/smbfs/lib/smb/nbns_rq.c
+1-1contrib/smbfs/lib/smb/kiconv.c
+0-1contrib/smbfs/lib/smb/rap.c
+11-81 files not shown
+11-97 files

DragonFlyBSD/src 6adc224lib/libthread_xu/thread thr_syscalls.c

pthreads - sleep() needs strong reference

* Fix problem with sleep() not canceling due to missing strong
  reference.

Reported-by: godfrey
DeltaFile
+2-0lib/libthread_xu/thread/thr_syscalls.c
+2-01 files

DragonFlyBSD/src ddb4155sys/vfs/hammer2 hammer2_vfsops.c

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
DeltaFile
+3-2sys/vfs/hammer2/hammer2_vfsops.c
+3-21 files

DragonFlyBSD/src c3a64adsys/kern kern_exit.c

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.
DeltaFile
+8-5sys/kern/kern_exit.c
+8-51 files

DragonFlyBSD/src 3812af4sys/kern kern_exit.c

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
DeltaFile
+3-3sys/kern/kern_exit.c
+3-31 files

DragonFlyBSD/src 64d15basys/dev/misc/psm psm.c

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
DeltaFile
+49-48sys/dev/misc/psm/psm.c
+49-481 files

DragonFlyBSD/src 41bc315libexec/rtld-elf rtld.h

rtld-elf - Allow dynamic (late) relocations to relro section (2)

* Add missing header file adjustment
DeltaFile
+1-0libexec/rtld-elf/rtld.h
+1-01 files

DragonFlyBSD/src c1397a2libexec/rtld-elf rtld.c, libexec/rtld-elf/x86_64 reloc.c

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
DeltaFile
+10-2libexec/rtld-elf/x86_64/reloc.c
+1-0libexec/rtld-elf/rtld.c
+11-22 files

DragonFlyBSD/src ff3eac0sys/dev/virtual/amazon/ena ena.c

kernel/ena: Fix another error path.

Release the MSI-X vector if we fail after it's been allocated but
before we can use the goto.
DeltaFile
+1-0sys/dev/virtual/amazon/ena/ena.c
+1-01 files

DragonFlyBSD/src 97f78c2sys/dev/virtual/amazon/ena ena.c

kernel/ena: Fix an uninitialized variable issue in an error path.

At this point in initialization, we just return ENXIO on failure.

Reported-by: zrj
DeltaFile
+1-1sys/dev/virtual/amazon/ena/ena.c
+1-11 files

DragonFlyBSD/src 2027b2clib/libc/gen Makefile.inc

libc: Remove old MLINKS for fpclassify.3.

I forgot to remove them in b6b35a1b4c682b25f983fc039f153dcd04094189.

Reported-by: zrj
DeltaFile
+0-6lib/libc/gen/Makefile.inc
+0-61 files

DragonFlyBSD/src 58a7919usr.bin/xinstall xinstall.c

install(1): Fix usage(), we don't have -T.
DeltaFile
+1-1usr.bin/xinstall/xinstall.c
+1-11 files