dragonfly.git
5 months agoUpdate tcplay from 2.0 to 3.3
Daniel Fojt [Tue, 28 Apr 2020 11:50:53 +0000 (13:50 +0200)]
Update tcplay from 2.0 to 3.3

5 months agolibc - Fix a serious memory leak in the nmalloc code
Matthew Dillon [Thu, 30 Apr 2020 08:39:05 +0000 (01:39 -0700)]
libc - Fix a serious memory leak in the nmalloc code

* Fix a bug where mtmagazine_free() would assign mt->newmag without
  re-checking its contents, potentially overwriting an assignment
  made by _slaballoc(), causing a memory leak.

* This bug generally rears its ugly head in heavily pthreaded programs,
  but it can occur under other conditions too.

Reported-by: hsw (irc)
5 months agotmpfs - Fix bug in page-free bypass path
Matthew Dillon [Thu, 30 Apr 2020 03:05:13 +0000 (20:05 -0700)]
tmpfs - Fix bug in page-free bypass path

* tmpfs moves pages between two objects in order to allow data to
  be paged to swap.  Tmpfs makes an optimization to evict pages
  that are already backed by swap when reclaiming a vnode.

  Fix a bug in this code which can sometimes attempt to free a VM
  page which is still flagged PG_MAPPED, causing an assertion and
  panic.  The page is not mapped at this point in time but the meaning
  of the flag has changed somewhat and the flag can still be left
  set by the time the page gets to this bit of code.

5 months agocpdup(1): Drop old compatible code for other OSes
Aaron LI [Wed, 29 Apr 2020 13:52:20 +0000 (21:52 +0800)]
cpdup(1): Drop old compatible code for other OSes

The compatible code of cpdup(1) for Linux and other BSDs has been better
maintained in its standalone repository:
https://github.com/DragonFlyBSD/cpdup

So let's drop the old and unmaintained compatible code here.

5 months agorc.d: Add mounttmpfs to support tmpfs at /var/run and /tmp
Aaron LI [Wed, 29 Apr 2020 04:47:23 +0000 (12:47 +0800)]
rc.d: Add mounttmpfs to support tmpfs at /var/run and /tmp

We are already mounting a tmpfs at /var/run/shm to support shm_open()
etc functions.  However, this makes it harder for a user to make
/var/run on a tmpfs.  Actually, using a tmpfs for /var/run is a good
idea, though the deamons/system need to create necessary folders, and
Linux has adopted such a model for /run (symlink to /var/run) for years.

Introduce the 'mounttmpfs' rc script to support mounting tmpfs at
/var/run and /tmp, which is enabled by setting 'tmpfs_var_run=YES'
and 'tmpfs_tmp=YES' in /etc/rc.conf, respectively.  The default values
for these two new configurations are both 'NO'.

The new 'mounttmpfs' rc script is ordered *after* 'mountcritremote', so
that NFS-mounted /var is also properly handled, although I think
NFS-mounted /var is not a good idea and I don't know anyone really need
to do so.

Also move the tmpfs mounting at /var/run/shm from 'mountcritlocal' to
the new 'mounttmpfs' script.

Reviewed-by: tuxillo
5 months agosbin/fsck_msdosfs: Do not overflow when calculating file system size
Tomohiro Kusumi [Tue, 28 Apr 2020 18:10:08 +0000 (03:10 +0900)]
sbin/fsck_msdosfs: Do not overflow when calculating file system size

from freebsd/freebsd@2ccadef77b81e7f18dd6bc4380357d6c6a797c5a

5 months agoFix various grammatical issues in our messages, documentation etc. (2)
Sascha Wildner [Tue, 28 Apr 2020 16:24:50 +0000 (18:24 +0200)]
Fix various grammatical issues in our messages, documentation etc. (2)

5 months ago<sys/flame_graph.h>: Include <sys/types.h> for some used types.
Sascha Wildner [Tue, 28 Apr 2020 15:49:07 +0000 (17:49 +0200)]
<sys/flame_graph.h>: Include <sys/types.h> for some used types.

While here, add a copyright header.

5 months ago<sys/namecache.h>: Include <sys/lock.h> for nc_lock.
Sascha Wildner [Tue, 28 Apr 2020 15:48:31 +0000 (17:48 +0200)]
<sys/namecache.h>: Include <sys/lock.h> for nc_lock.

While here, remove <sys/thread.h> which is no longer needed.

5 months agolibc/setproctitle(): Add missing va_end()s in error paths.
Sascha Wildner [Sat, 25 Apr 2020 06:39:15 +0000 (08:39 +0200)]
libc/setproctitle(): Add missing va_end()s in error paths.

5 months agolibc/strcoll_l(): Remove bogus checks.
Sascha Wildner [Fri, 24 Apr 2020 18:41:38 +0000 (20:41 +0200)]
libc/strcoll_l(): Remove bogus checks.

t1 and t2 are guaranteed to be non-NULL at this point.

5 months ago<sys/sglist.h>: Adjust the type of struct sglist's sg_refs to unsigned.
Sascha Wildner [Fri, 24 Apr 2020 18:09:46 +0000 (20:09 +0200)]
<sys/sglist.h>: Adjust the type of struct sglist's sg_refs to unsigned.

To match the refcount API which is used under the hood.

5 months agoFix various grammatical issues in our messages, documentation etc.
Sascha Wildner [Tue, 28 Apr 2020 15:40:46 +0000 (17:40 +0200)]
Fix various grammatical issues in our messages, documentation etc.

5 months agoinet6: nd6_na_input() now considers ln_state <= ND6_LLINFO_INCOMPLETE
Roy Marples [Tue, 28 Apr 2020 11:46:59 +0000 (11:46 +0000)]
inet6: nd6_na_input() now considers ln_state <= ND6_LLINFO_INCOMPLETE

Otherwise if ln_state != ND6_LLINFO_INCOMPLETE and the is no lladdr
and this message was solicited then ln_state is set to ND6_LLINFO_REACHABLE
which then causes confusion elsewhere in the stack.
If ln_state > ND6_LLINFO_INCOMPLETE then it's assumed we have a lladdr.

Depending on the timing, it's technically possible to receive such
a message after the llentry is created with ND6_LLINFO_NOSTATE.

Taken from NetBSD.

5 months agosbin/fsck_msdosfs: Fix a bug with dirty file system handling
Tomohiro Kusumi [Mon, 27 Apr 2020 16:40:53 +0000 (01:40 +0900)]
sbin/fsck_msdosfs: Fix a bug with dirty file system handling

r356313 broke handling of dirty file system because we have restricted
the correction of "odd" byte sequences to checkfat(), and as a result
the dirty bit is never cleared.  The old fsck_msdosfs code would write
FAT twice to fix the dirty bit, which is also not ideal.

Fix this by introducing a new rountine, cleardirty() which will perform
the set of clean bit only, and use it in checkfilesys() if we thought
the file system was dirty.

https://svnweb.freebsd.org/base?view=revision&revision=356313

from freebsd/freebsd@ffa396196c4c0fcf8a6bf4d1dd88ffb9ce531ccc

5 months agoroute.4: Fix date
Aaron LI [Sat, 25 Apr 2020 10:50:19 +0000 (18:50 +0800)]
route.4: Fix date

Fix date for commit ced8848230553786e51dc0d08f17ccc302f556d1.

5 months agodrm/linux: Add for_each_clear_bit()
François Tigeot [Sat, 25 Apr 2020 09:58:12 +0000 (11:58 +0200)]
drm/linux: Add for_each_clear_bit()

Obtained-from: FreeBSD

5 months agodrm/linux: Add BIT_ULL() and GENMASK_ULL()
François Tigeot [Sat, 25 Apr 2020 08:06:36 +0000 (10:06 +0200)]
drm/linux: Add BIT_ULL() and GENMASK_ULL()

5 months agokernel - Detune memory slab allocator pcpu caching a little
Matthew Dillon [Fri, 24 Apr 2020 17:02:28 +0000 (10:02 -0700)]
kernel - Detune memory slab allocator pcpu caching a little

* The kernel tries to cache a lot of slab zones on a pcpu basis
  due to the high overhead of mapping and unmapping kernel memory.
  However, this can burn an excessive amount of physical memory on
  high-core-count cpus.

* Reduce the pcpu cache hysteresis on systems with more than 32 cpu
  threads.  So on a 128-thread TR with 256GB of ram, this reduces
  the slab cache from a ridiculous 30GB to a more reasonable 10GB.

5 months agosbin/fsck_hammer2: Refactor print_blockref_verbose()
Tomohiro Kusumi [Fri, 24 Apr 2020 15:12:05 +0000 (00:12 +0900)]
sbin/fsck_hammer2: Refactor print_blockref_verbose()

5 months agokernel - Remove CACHE_VREF: RACED debugging output
Matthew Dillon [Fri, 24 Apr 2020 04:19:06 +0000 (21:19 -0700)]
kernel - Remove CACHE_VREF: RACED debugging output

* Remove 'CACHE_VREF: RACED' debugging output after verifying
  that the race can occur and is properly handled.

5 months agohammer2 - Fix serious de-duplication bug and a few other things (2)
Matthew Dillon [Fri, 24 Apr 2020 01:06:03 +0000 (18:06 -0700)]
hammer2 - Fix serious de-duplication bug and a few other things (2)

* Remove debugging kprintf()

5 months agohammer2 - Fix serious de-duplication bug and a few other things
Matthew Dillon [Fri, 24 Apr 2020 00:38:10 +0000 (17:38 -0700)]
hammer2 - Fix serious de-duplication bug and a few other things

* Fix a serious de-duplication bug.  When small files <= 512
  bytes are extended with write()s to being larger than 512 bytes,
  it triggers a de-duplication bug in the first block of the file
  if that block can be de-duplicated from other sources.

  A mishandled skip condition combined with modest buffer cache
  flush loads can cause this first block can wind up getting
  zero'd out and cause a CHECK failure (I/O error) on the file.

  The fixes for this are primarily in hammer2_chain_modify().

* Replace HAMMER2_BREF_FLAG_ZERO in the bref.flags with
  HAMMER2_CHAIN_NOTTESTED in the chain structure and deprecate
  the flag.  This flag could sometimes accidentally be flushed
  to the media.

* Clear HAMMER2_CHAIN_INITIAL in two strategy write paths
  that are not typically hit.  The flag is probably already
  clear at this point since hammer2_chain_modify() has likely
  already been called, but be sure.

5 months agokernel - Fix excessive VM pageout flushes (2)
Matthew Dillon [Fri, 24 Apr 2020 00:37:10 +0000 (17:37 -0700)]
kernel - Fix excessive VM pageout flushes (2)

* Add a couple of missing page-rebusy tests in the vnode/putpages
  path for the pageout daemon.

5 months agobuild - Add a few things in test/debug
Matthew Dillon [Thu, 23 Apr 2020 06:15:47 +0000 (23:15 -0700)]
build - Add a few things in test/debug

* Add a few more kernel probing utilities.

5 months agosbin/fsck_hammer2: Support regular file
Tomohiro Kusumi [Thu, 23 Apr 2020 18:27:40 +0000 (03:27 +0900)]
sbin/fsck_hammer2: Support regular file

5 months agosbin/fsck_hammer2: Adjust indentations for error messages
Tomohiro Kusumi [Thu, 23 Apr 2020 17:34:05 +0000 (02:34 +0900)]
sbin/fsck_hammer2: Adjust indentations for error messages

5 months agodsynth - Revert PkgDepMemoryTarget default
Matthew Dillon [Thu, 23 Apr 2020 02:41:04 +0000 (19:41 -0700)]
dsynth - Revert PkgDepMemoryTarget default

* The issues observed were actually not the fault of dsynth, but
  instead due to paging behavior by the kernel.  Changing this value
  did not actually fix anything, but fixes to the kernel did.

  Revert the calculation back to divide-by-3.

5 months agokernel - Fix excessive VM pageout flushes
Matthew Dillon [Thu, 23 Apr 2020 02:39:37 +0000 (19:39 -0700)]
kernel - Fix excessive VM pageout flushes

* The VM pageout code was calculating the laundering limit improperly.
  We were trying to calculate a per-pass limit within each queue list
  but were not taking into account the fact that the number of queues
  have greatly increased in the last few years AND also that the paging
  scans only check 1/10 of each queue for each scan.

  These fixes allow the pageout scan to pick-up many more clean pages
  before beginning to stall-out on dirty pages.

* vm_max_launder is now calculated as 1/256 of physical memory at startup
  instead of hardwired.

* local max_launder calculations now take into account the number of
  queues and the fact that only 1/10 of each queue is checked in each
  pass.

  In addition, the local max_launder calculation is increased by the
  pass number divided by 10 so as to only increase for each full queue
  scan.

* the 'pass' variable passed down into helper functions is now divided
  by 10 because we do not want it to 'increment' and trigger stronger
  behavior until after the entire inactive queue has been scanned.

5 months agotmpfs - Change paging behavior, fix two directory-entry races
Matthew Dillon [Thu, 23 Apr 2020 02:24:13 +0000 (19:24 -0700)]
tmpfs - Change paging behavior, fix two directory-entry races

* Change the paging behavior for vfs.tmpfs.bufcache_mode.

  These changes try to reduce unnecessary tmpfs flushes to swap when
  the pageout daemon is able to locate sufficient clean VM pages.
  The pageout daemon can still page tmpfs data to swap via its normal
  operation, but tmpfs itself will not force write()s to pipeline to
  swap unless memory pressure is severe.

  0 tmpfs write()s are pipelined to swap via the buffer cache only
if the VM system is below the minimum free page count.

(this is the new default)

  1 tmpfs write()s are pipelined to swap via the buffer cache when
the VM system is paging.

  2 Same as (1) but be more aggressive about releasing buffer cache
buffers.

  3 tmpfs_write()s are always pipelined to swap via the buffer cache,
regardless.

* Fix tmpfs file creation, hard-linking, and rename to ensure that the
  new file is not created in a deleted directory.  We must lock the
  directory node around existing tests and add checks that were missing.

  Also remove a few unnecessary recursive locks.

5 months agotmpfs - Too aggressive during paging
Matthew Dillon [Wed, 22 Apr 2020 21:27:17 +0000 (14:27 -0700)]
tmpfs - Too aggressive during paging

* tmpfs was being a bit too aggressive during paging.  We were trying to
  bypass all the way to PQ_CACHE as well as unconditionally age the
  buffers.  This caused the pageout daemon to thrash on any underlying
  tmpfs pages that were being re-referenced quickly.

* Change the defaults to (1) Not try to flush all the way to PQ_CACHE
  unless the system is in an extreme low memory condition.  And (2) to
  only B_AGE the buffer when the system is paging and otherwise allow
  it to cycle normally.

5 months agokernel - Double LRU dirty pages by default
Matthew Dillon [Wed, 22 Apr 2020 21:05:12 +0000 (14:05 -0700)]
kernel - Double LRU dirty pages by default

* The pageout daemon was supposed to double-LRU dirty pages in the inactive
  queue by default and it wasn't.  This was causing dirty tmpfs pages to
  have too much priority in the inactive queue.

  Theoretically since tmpfs now issues direct writes to backing store in
  low-memory situations, we should be able to allow its dirty pages to
  cycle normally in all other situations.

5 months agosbin/fsck_hammer2: Consider device size with less than 4 zones
Tomohiro Kusumi [Wed, 22 Apr 2020 17:28:05 +0000 (02:28 +0900)]
sbin/fsck_hammer2: Consider device size with less than 4 zones

Unlike HAMMER1 which had volume size requirement, HAMMER2 allows
creation of small filesystem without having 4 zones for volume headers.
Make fsck_hammer2 also consider that, otherwise segfaults if the
device has less than 4 zones.

5 months agocpdup - Fix type-o in help output
Matthew Dillon [Wed, 22 Apr 2020 07:35:56 +0000 (00:35 -0700)]
cpdup - Fix type-o in help output

* Fix 'patch' -> 'path'

Reported-by: bdrewery
5 months agodsynth - Reduce the pkg dependency memory target heuristic
Matthew Dillon [Wed, 22 Apr 2020 06:40:47 +0000 (23:40 -0700)]
dsynth - Reduce the pkg dependency memory target heuristic

* Reducing the memory target will cause dsynth to clamp down on
  the number of builders a bit more when they enough of them
  have large pkg dependency footprints.  These dependencies
  are stored in tmpfs filesystems and having too many builders
  installing pkg ddpenencies at the same time can cause excessive
  paging to swap.

  Reduced from PhysMem / 3 to PhysMem / 4.

* When CCache is enabled, reduce the memory target even further
  to PhysMem / 5.

5 months agodsynth - Enable ccache support
Matthew Dillon [Wed, 22 Apr 2020 00:23:08 +0000 (17:23 -0700)]
dsynth - Enable ccache support

* Get ccache support working

Tested-by: kworr, dillon
5 months agosys/vfs/autofs: Silence down a warning which should really be a debug message
Tomohiro Kusumi [Tue, 21 Apr 2020 14:16:11 +0000 (23:16 +0900)]
sys/vfs/autofs: Silence down a warning which should really be a debug message

from freebsd/freebsd@7327b4d738a20b6af545efb195cea68fd14ff96a

5 months agoFix build for dhcpcd-9.0.2
Roy Marples [Tue, 21 Apr 2020 10:09:15 +0000 (10:09 +0000)]
Fix build for dhcpcd-9.0.2

5 months agoNote import of dhcpcd-9.0.2
Roy Marples [Tue, 21 Apr 2020 10:06:56 +0000 (10:06 +0000)]
Note import of dhcpcd-9.0.2

5 months agoMerge branch 'vendor/DHCPCD'
Roy Marples [Tue, 21 Apr 2020 10:05:02 +0000 (10:05 +0000)]
Merge branch 'vendor/DHCPCD'

5 months agoImport dhcpcd-9.0.2 with the following changes:
Roy Marples [Tue, 21 Apr 2020 10:03:27 +0000 (10:03 +0000)]
Import dhcpcd-9.0.2 with the following changes:

 * Control sockets are not opened in test mode
 * privsep: no longer aborts if protocol not available
 * inet6: Don't regen temporary addresses without a state
 * inet6: Reduce RA log spam
 * dhcp6: Don't log when things consitently fail
 * inet6: Add temporary directive to slaac option [1]
 * Ensure current interface flags persist when setting a flag
 * DHCP via BPF is now aligned correctly
 * CMSG buffers are now aligned correctly
 * hostnames are no longer clobbered when being forced and a RA is recieved

[1] dhcpcd no longer looks at any possible kernel settings when deciding to
manage IPv6 temporary addresses or not. You now instruct dhcpcd to do this
in dhcpcd.conf. Playing whack-a-mole with various kernel knobs wasn't fun
and some OS's have or are removing RA and thus temporary address managemnt
from the kernel so said knobs are no longer there.

5 months agosbin/fsck_hammer2: Make debug mode more verbose on failure
Tomohiro Kusumi [Mon, 20 Apr 2020 12:36:06 +0000 (21:36 +0900)]
sbin/fsck_hammer2: Make debug mode more verbose on failure

Make failed bref visually clear within radix tree if DebugOpt>1.

6 months agosbin/fsck_hammer2: Add debug mode for DebugOpt>1
Tomohiro Kusumi [Sat, 18 Apr 2020 15:52:39 +0000 (00:52 +0900)]
sbin/fsck_hammer2: Add debug mode for DebugOpt>1

6 months agosbin/fsck_hammer2: Make debug mode more verbose
Tomohiro Kusumi [Sat, 18 Apr 2020 14:12:06 +0000 (23:12 +0900)]
sbin/fsck_hammer2: Make debug mode more verbose

6 months agorc.conf.5: Small markup fix.
Sascha Wildner [Sun, 19 Apr 2020 05:25:48 +0000 (07:25 +0200)]
rc.conf.5: Small markup fix.

6 months agodrm/linux: Really implement irqs_disabled()
François Tigeot [Sat, 18 Apr 2020 14:17:52 +0000 (16:17 +0200)]
drm/linux: Really implement irqs_disabled()

6 months agodrm/linux: Add add_taint()
François Tigeot [Sat, 18 Apr 2020 14:07:27 +0000 (16:07 +0200)]
drm/linux: Add add_taint()

6 months agosbin/fsck_hammer2: Fix delta stats bug (-c option)
Tomohiro Kusumi [Fri, 17 Apr 2020 11:32:23 +0000 (20:32 +0900)]
sbin/fsck_hammer2: Fix delta stats bug (-c option)

It's possible that a cached delta is a part of another delta(s) to be
cached. When this happens, the parent delta needs to include stats
from the child delta, otherwise remaining zone scanning results could
be incorrect.

6 months agorc.conf.5: Describe dhcpcd_chrootdir.
Sascha Wildner [Thu, 16 Apr 2020 13:19:14 +0000 (15:19 +0200)]
rc.conf.5: Describe dhcpcd_chrootdir.

6 months agomtree/BSD.var.dist: Indent with spaces.
Sascha Wildner [Thu, 16 Apr 2020 13:18:58 +0000 (15:18 +0200)]
mtree/BSD.var.dist: Indent with spaces.

6 months agoUpdate the pciconf(8) database.
Sascha Wildner [Thu, 16 Apr 2020 13:20:32 +0000 (15:20 +0200)]
Update the pciconf(8) database.

April 13, 2020 snapshot from https://pci-ids.ucw.cz

6 months agoupgrade: Move dhcpcd files from the old db dir to the relative chroot
Roy Marples [Wed, 15 Apr 2020 14:50:48 +0000 (14:50 +0000)]
upgrade: Move dhcpcd files from the old db dir to the relative chroot

This allows the user to get the same address upon upgrading.

6 months agodhcpcd: Remove dependency on netifs
Roy Marples [Tue, 14 Apr 2020 14:14:48 +0000 (14:14 +0000)]
dhcpcd: Remove dependency on netifs

dhcpcd currently depends on being able to bind to the
unspecified address on the BOOTPC port and DHCPv6-client port
as well as listen to ICMP6.
This means that some routes need to be established first and
the rc.d infrastructure relies on netif being started before that.

We need to document not to configure an interface to start DHCP,
but rather just to start dhcpcd and if any extra configuration is
needed to limit the scope of interfaces it should be done in
dhcpcd.conf instead. However, the default should be fine.

6 months agodrm/i915: Enable stolen memory support
François Tigeot [Tue, 14 Apr 2020 08:27:28 +0000 (10:27 +0200)]
drm/i915: Enable stolen memory support

6 months agodrm/linux: Add uapi/asm/byteorder.h
François Tigeot [Tue, 14 Apr 2020 08:24:29 +0000 (10:24 +0200)]
drm/linux: Add uapi/asm/byteorder.h

6 months agodsynth - Add skip count for ignored and other failure conditions
Matthew Dillon [Tue, 14 Apr 2020 04:49:27 +0000 (21:49 -0700)]
dsynth - Add skip count for ignored and other failure conditions

* Improve implementation for the skip count in the logs and HTML
  interfaces.

Requested-by: tuxillo
6 months agokernel - Streamline refcount API
Matthew Dillon [Tue, 14 Apr 2020 04:47:43 +0000 (21:47 -0700)]
kernel - Streamline refcount API

* Streamline the refcount API, with a few provisios, to improve SMP
  performance.

6 months agomtree: Support dhcpcd chroot
Roy Marples [Mon, 13 Apr 2020 16:46:24 +0000 (16:46 +0000)]
mtree: Support dhcpcd chroot

6 months agodhcpcd: 02-dump is no longer supplied
Roy Marples [Mon, 13 Apr 2020 16:46:03 +0000 (16:46 +0000)]
dhcpcd: 02-dump is no longer supplied

6 months agodhcpcd: Add syslog chroot support
Roy Marples [Mon, 13 Apr 2020 16:45:33 +0000 (16:45 +0000)]
dhcpcd: Add syslog chroot support

6 months agodhcpcd: Build support for Privilege Separation, using the _dhcp user
Roy Marples [Mon, 13 Apr 2020 16:44:49 +0000 (16:44 +0000)]
dhcpcd: Build support for Privilege Separation, using the _dhcp user

6 months agodhcpcd: Note import of new version
Roy Marples [Mon, 13 Apr 2020 16:44:20 +0000 (16:44 +0000)]
dhcpcd: Note import of new version

6 months agoMerge branch 'vendor/DHCPCD'
Roy Marples [Mon, 13 Apr 2020 16:39:54 +0000 (16:39 +0000)]
Merge branch 'vendor/DHCPCD'

6 months agoupgrade: Update _dhcp home dir to /var/chroot/dhcp if empty
Roy Marples [Mon, 13 Apr 2020 16:38:03 +0000 (16:38 +0000)]
upgrade: Update _dhcp home dir to /var/chroot/dhcp if empty

6 months agopasswd: Give _dhcp a homedirectory of /var/chroot/dhcp
Roy Marples [Mon, 13 Apr 2020 16:35:45 +0000 (16:35 +0000)]
passwd: Give _dhcp a homedirectory of /var/chroot/dhcp

6 months agoUpdate to dhcpcd-9.0.1 with the following changes:
Roy Marples [Mon, 13 Apr 2020 16:30:52 +0000 (16:30 +0000)]
Update to dhcpcd-9.0.1 with the following changes:

* privsep: Improve error when we don't have permission to write lease
* privsep: Fix hooks restarting other daemons

6 months agokernel: GC a few old system calls which are libc functions in DragonFly.
Sascha Wildner [Mon, 13 Apr 2020 10:22:31 +0000 (12:22 +0200)]
kernel: GC a few old system calls which are libc functions in DragonFly.

Namely, getdomainname, setdomainname, and uname, all of which were
deprecated in early FreeBSD but never really phased out. They were
likely never used (as system calls) in DragonFly at all.

For more information on the FreeBSD history, see FreeBSD's r184789.

6 months agoifconfig(8): Do not wrongly use 'create' as hostname
Aaron LI [Sun, 12 Apr 2020 14:12:14 +0000 (22:12 +0800)]
ifconfig(8): Do not wrongly use 'create' as hostname

Do not allow to use the 'create' keyword as a hostname when ifconfig(8)
is invoked for an already existing interface.

Without this commit, ifconfig(8) assumes the 'create' keyword as a
hostname and tries to resolve it when 'ifconfig ifname create' invoked
for an already existing interface.  This can produce some misleading
error messages (e.g., 'create: bad value') or even unexpected results
(e.g., when the hostname resolving succeeds).

With this commit, when an interface is already exists and the 'create'
is the only argument, return an error message.  But when there are some
other arguments, just ignore the 'create' keyword and carry on.

Obtained from FreeBSD:
https://github.com/freebsd/freebsd/commit/e383c28ab5b8d0bdc15281e7522c368d56ac1a76
https://reviews.freebsd.org/D17171

6 months agokernel/sysmouse: Add evdev support
Peeter Must [Sun, 12 Apr 2020 10:07:01 +0000 (13:07 +0300)]
kernel/sysmouse: Add evdev support

Obtained-from: FreeBSD

6 months agodrm/linux: Add put_page()
François Tigeot [Fri, 10 Apr 2020 12:38:08 +0000 (14:38 +0200)]
drm/linux: Add put_page()

6 months agobsd-family-tree: Sync with FreeBSD.
Sascha Wildner [Wed, 8 Apr 2020 16:38:15 +0000 (18:38 +0200)]
bsd-family-tree: Sync with FreeBSD.

6 months agocpdup(1): Move version and authors info to cpdup.h and bump version
Aaron LI [Sun, 5 Apr 2020 00:54:16 +0000 (08:54 +0800)]
cpdup(1): Move version and authors info to cpdup.h and bump version

Bump the tool version from 1.20 to 1.21 due to the recent microsecond
timestamp precision support and protocol version bump.

6 months agocpdup(1): Use POSIX-defined timespec fields to be more portable
Aaron LI [Sun, 5 Apr 2020 00:51:56 +0000 (08:51 +0800)]
cpdup(1): Use POSIX-defined timespec fields to be more portable

While we defines 'st_atimespec', 'st_mtimespec' and 'st_ctimespec'
macros in 'struct stat', they are not defined on Linux and maybe other
platforms or C libraries.  Change to check the definitions of
'st_atime', 'st_mtime' and 'st_ctime' macros to check whether we're on a
modern POSIX (>= 2008) platform.

See also: https://github.com/DragonFlyBSD/cpdup/commit/7a715bd5cc6853c3973ce84a5df3c779e47082d1
Credit: https://github.com/ninja-build/ninja/pull/1513

6 months agostat.2: Fix minor identation issue
Aaron LI [Sat, 4 Apr 2020 04:59:10 +0000 (12:59 +0800)]
stat.2: Fix minor identation issue

6 months agoImport dhcpcd-9.0.0 with the following changes:
Roy Marples [Thu, 2 Apr 2020 15:14:14 +0000 (15:14 +0000)]
Import dhcpcd-9.0.0 with the following changes:

 * inet: Allow forcing a host route from an interface without a lease
 * dhcpcd: Don't wait for an address family to complete if not using it

 * INET6: Support a /128 prefix advertised via RA
 * BSD: More address validation from route(4) messages
 * DHCP: Fix a potential segfault on DaD failure
 * IPv4LL: Fix a potential segfault when dropping IPv4LL addresses

 * Decode interface complex interface names eth0.100:2 eth0i100:2.
   This allows us to ignore some virtual interfaces by default
 * ARP: Report L2 header address on conflict for more clarity
 * DHCP: Support jumbo frames (untested)
 * DHCP6: Clean up old lease on failure to confirm/rebind, etc
 * RA: Prefer older routers
 * INET6: Obscure prefixes are now calculated correctly

 * Privilege Separation
 * Default hostname is now a blank string
 * Leases are now dumped over the control socket - you get RA's now as well.
 * Better support for many IPv6 routers
 * RA: Deprecate stale addresses by setting pltime 0
 * DHCP6: Deprecate stale addresses by setting pltime 0

6 months agocsh(1): Local changes for the tcsh upgrade.
Sascha Wildner [Wed, 1 Apr 2020 18:55:58 +0000 (20:55 +0200)]
csh(1): Local changes for the tcsh upgrade.

6 months agoMerge branch 'vendor/TCSH'
Sascha Wildner [Wed, 1 Apr 2020 18:55:08 +0000 (20:55 +0200)]
Merge branch 'vendor/TCSH'

6 months agoVendor branch: upgrade tcsh from 6.19.00 to 6.22.02 vendor/TCSH
Sascha Wildner [Wed, 1 Apr 2020 18:53:41 +0000 (20:53 +0200)]
Vendor branch: upgrade tcsh from 6.19.00 to 6.22.02

6 months agosbin/newfs_msdos: Fix a couple of minor issues with newfs_msdos
Tomohiro Kusumi [Mon, 30 Mar 2020 13:52:54 +0000 (22:52 +0900)]
sbin/newfs_msdos: Fix a couple of minor issues with newfs_msdos

- Do not unnecessarily strdup().
- Check return value of getdiskinfo(), if it failed, bail out.

from freebsd/freebsd@c5c4e23aeb0ac6661e653d907d7826d9ed819934

6 months agosbin/newfs_msdos: Explicitly exit() instead of return in main()
Tomohiro Kusumi [Mon, 30 Mar 2020 13:49:40 +0000 (22:49 +0900)]
sbin/newfs_msdos: Explicitly exit() instead of return in main()

from freebsd/freebsd@7a057d0def567bc80b1ba4101d3823d92cbc979c

6 months agosbin/newfs_msdos: -A is incompatible with -r, not -o
Tomohiro Kusumi [Mon, 30 Mar 2020 13:48:13 +0000 (22:48 +0900)]
sbin/newfs_msdos: -A is incompatible with -r, not -o

from freebsd/freebsd@3da676c080ccd8fbe8aed89aa717642b50fbd9f3

6 months agolt(1): Use 'find -s' instead of 'find | sort'.
Sascha Wildner [Sun, 29 Mar 2020 08:18:45 +0000 (10:18 +0200)]
lt(1): Use 'find -s' instead of 'find | sort'.

This diff of the old behavior vs. new shows the issue:

--- /tmp/t1 2020-03-29 10:09:50.009490000 +0200
+++ /tmp/t2 2020-03-29 10:10:09.909695000 +0200
@@ -48,12 +48,12 @@
     |   |-- SimpleTextOut.h
     |   `-- UgaDraw.h
     |-- Uefi
-    |-- Uefi.h
     |   |-- UefiBaseType.h
     |   |-- UefiGpt.h
     |   |-- UefiInternalFormRepresentation.h
     |   |-- UefiMultiPhase.h
     |   |-- UefiPxe.h
     |   `-- UefiSpec.h
+    |-- Uefi.h
     `-- X64
         `-- ProcessorBind.h

With 'find | sort', lt(1) would incorrectly show the contents of the
'Uefi' directory below the 'Uefi.h' file.

With 'find -s', the 'Uefi.h' file is correctly sorted below 'Uefi'
and its contents.

6 months agokernel: Remove <sys/n{amei,lookup}.h> from all files that don't need it.
Sascha Wildner [Sat, 28 Mar 2020 15:12:56 +0000 (16:12 +0100)]
kernel: Remove <sys/n{amei,lookup}.h> from all files that don't need it.

6 months agokernel/dm: Include <sys/proc.h> for proc0.
Sascha Wildner [Sat, 28 Mar 2020 14:48:55 +0000 (15:48 +0100)]
kernel/dm: Include <sys/proc.h> for proc0.

6 months agoRemove references to math(3) in various manual pages.
Sascha Wildner [Sat, 28 Mar 2020 13:42:45 +0000 (14:42 +0100)]
Remove references to math(3) in various manual pages.

We no longer have a math(3) manual page.

6 months agokernel: Remove <sys/mutex.h> from all files that don't need it (2/2).
Sascha Wildner [Sat, 28 Mar 2020 13:00:49 +0000 (14:00 +0100)]
kernel: Remove <sys/mutex.h> from all files that don't need it (2/2).

98% of these were remains from porting from FreeBSD which could have
been removed after converting to lockmgr(), etc.

Due to an issue in my checking earlier, not everything was cleaned up
correctly.

6 months agokernel: Remove <sys/mutex.h> from all files that don't need it.
Sascha Wildner [Sat, 28 Mar 2020 12:37:38 +0000 (13:37 +0100)]
kernel: Remove <sys/mutex.h> from all files that don't need it.

98% of these were remains from porting from FreeBSD which could have
been removed after converting to lockmgr(), etc.

While here, do the same for <sys/mutex2.h>.

6 months agokernel/iscsi: Include <sys/mutex2.h> in iscsivar.h.
Sascha Wildner [Sat, 28 Mar 2020 01:55:13 +0000 (02:55 +0100)]
kernel/iscsi: Include <sys/mutex2.h> in iscsivar.h.

It uses struct mtx in a struct.

6 months agokernel: Remove <sys/mplock2.h> from all files that do not need it.
Sascha Wildner [Sat, 28 Mar 2020 01:12:03 +0000 (02:12 +0100)]
kernel: Remove <sys/mplock2.h> from all files that do not need it.

6 months ago<sys/mount.h>: Include <sys/mplock2.h> for self sufficiency.
Sascha Wildner [Sat, 28 Mar 2020 01:07:47 +0000 (02:07 +0100)]
<sys/mount.h>: Include <sys/mplock2.h> for self sufficiency.

It uses get_mplock() etc. in some macros it defines, so it should bring
in <sys/mplock2.h> by itself.

6 months agoSync ACPICA with Intel's version 20200326.
Sascha Wildner [Fri, 27 Mar 2020 22:06:32 +0000 (23:06 +0100)]
Sync ACPICA with Intel's version 20200326.

* Code cleanup for early GCC 10.

* Various fixes and improvements in acpiexec, acpixtract and iasl.

For detailed list, please see sys/contrib/dev/acpica/changes.txt.

6 months agoefivar.3: Fix typo.
Sascha Wildner [Wed, 25 Mar 2020 15:10:56 +0000 (16:10 +0100)]
efivar.3: Fix typo.

6 months agoboot/efi: Sync our TianoCore EDK II headers with the edk2-stable202002 tag.
Sascha Wildner [Wed, 25 Mar 2020 05:23:51 +0000 (06:23 +0100)]
boot/efi: Sync our TianoCore EDK II headers with the edk2-stable202002 tag.

Nothing of relevance to us.

6 months agossh-copy-id(1): Fix a printf(1) missing format character warning.
Sascha Wildner [Tue, 24 Mar 2020 15:52:43 +0000 (16:52 +0100)]
ssh-copy-id(1): Fix a printf(1) missing format character warning.

Reported-by: Pierre-Alain TORET <pierre-alain.toret@protonmail.com>
6 months agoHook ssh-copy-id into the build and adjust README.DELETED.
Sascha Wildner [Tue, 24 Mar 2020 15:24:01 +0000 (16:24 +0100)]
Hook ssh-copy-id into the build and adjust README.DELETED.

6 months agoMerge branch 'vendor/OPENSSH'
Sascha Wildner [Tue, 24 Mar 2020 15:14:57 +0000 (16:14 +0100)]
Merge branch 'vendor/OPENSSH'

6 months agoImport OpenSSH-8.0p1's ssh-copy-id and manual page on the vendor branch.
Sascha Wildner [Tue, 24 Mar 2020 15:14:20 +0000 (16:14 +0100)]
Import OpenSSH-8.0p1's ssh-copy-id and manual page on the vendor branch.

6 months agoconfig(8): Replace the old "= {" syntax in config.y with just "{".
Sascha Wildner [Mon, 23 Mar 2020 16:17:27 +0000 (17:17 +0100)]
config(8): Replace the old "= {" syntax in config.y with just "{".

According to FreeBSD it was only for compatibility with
6th edition Unix' yacc(1).

7 months agoAdjust iwm.4/iwmfw.4/fstab.5 a bit.
Sascha Wildner [Fri, 20 Mar 2020 14:48:16 +0000 (15:48 +0100)]
Adjust iwm.4/iwmfw.4/fstab.5 a bit.

* iwm.4/iwmfw.4: Mention new devices and firmware.

Reported-by: noob237 (IRC)
* fstab.5: Mention HAMMER2.

Reported-by: daftaupe (IRC)
7 months agosys/vfs/autofs: Make autofs(5) timeout messages include affected process name and PID
Tomohiro Kusumi [Fri, 20 Mar 2020 14:39:06 +0000 (23:39 +0900)]
sys/vfs/autofs: Make autofs(5) timeout messages include affected process name and PID

from freebsd/freebsd@4a10e991b50fa9c8e0ec6af5f8cc81aa63d0e1f3