dragonfly.git
6 years agolibthread_xu: Fix checking of pthread_barrier_init()'s count argument. v4.8.1
Sascha Wildner [Tue, 1 Aug 2017 10:43:45 +0000 (12:43 +0200)]
libthread_xu: Fix checking of pthread_barrier_init()'s count argument.

6 years agokernel/ieee80211: Add missing braces.
Sascha Wildner [Mon, 31 Jul 2017 08:32:04 +0000 (10:32 +0200)]
kernel/ieee80211: Add missing braces.

6 years agokernel/urtwn: Add missing braces.
Sascha Wildner [Mon, 31 Jul 2017 08:27:12 +0000 (10:27 +0200)]
kernel/urtwn: Add missing braces.

6 years agokernel - Fix improper parens
Matthew Dillon [Tue, 28 Mar 2017 19:40:36 +0000 (12:40 -0700)]
kernel - Fix improper parens

* Fix improper parens.  The code paths luckily worked correctly
  even with the mistakes, for the most part.

* Fix bug in netgraph (netgraph is not used much in DragonFly).

Reported-by: dcb / bugs #2989, 2990, 2991, 2992
6 years agogcore - fix overflow in sscanf
Matthew Dillon [Thu, 30 Mar 2017 21:02:47 +0000 (14:02 -0700)]
gcore - fix overflow in sscanf

* Fix an overflow which can occur in the sscanf() used to parse
  /proc/*/map

Reported-by: dcb
6 years agomixer - Fix sscanf() overflow
Matthew Dillon [Thu, 30 Mar 2017 21:04:14 +0000 (14:04 -0700)]
mixer - Fix sscanf() overflow

* Fix %s buffer sizes in sscanf().

Reported-by: dcb
6 years agomfiutil - Fix static buffer overflow
Matthew Dillon [Tue, 11 Apr 2017 04:41:43 +0000 (21:41 -0700)]
mfiutil - Fix static buffer overflow

* Fix static buffer that is too small.  Use a dynamic asprintf()
  instead.

Dragonfly-bugs: 3002 (dcb)

6 years agokernel - Fix event preset
Matthew Dillon [Tue, 11 Apr 2017 04:47:51 +0000 (21:47 -0700)]
kernel - Fix event preset

* Enable all events was not enabling all events.  Fix the memset().

Dragonfly-bugs: 3004 (dcb)

6 years agowindow - Fix Graphics capability enable test
Matthew Dillon [Tue, 11 Apr 2017 04:50:14 +0000 (21:50 -0700)]
window - Fix Graphics capability enable test

* Fix Graphics capability enable test, code type-o, logical OR has to be AND.

Dragonfly-bugs: 3005 (dcb)

6 years agoopenssh - Fix a broken assignment
Matthew Dillon [Tue, 11 Apr 2017 05:01:03 +0000 (22:01 -0700)]
openssh - Fix a broken assignment

* Fix a broken assignment.  NOTE: OpenSSH master already has this fix.

* Document dangerous sscanf()s, but note that it is not possible for a
  buffer overflow to occur in these cases.

Dragonfly-bugs: 3007 (dcb)

6 years agolibdevstat - Limit sscanf field, fix redundant condition
Matthew Dillon [Tue, 11 Apr 2017 05:13:55 +0000 (22:13 -0700)]
libdevstat - Limit sscanf field, fix redundant condition

* Limit a sscanf field to MAXHOSTNAMELEN - 1.

* Remove a redundant condition already tested by the first part of a
  conditional.

Dragonfly-bugs: 3009 (dcb)

6 years agolibtelnet - Fix improper statement construction (not a bug in the binary)
Matthew Dillon [Tue, 11 Apr 2017 05:19:30 +0000 (22:19 -0700)]
libtelnet - Fix improper statement construction (not a bug in the binary)

* libstand hammer1.c - remove extra format element in debugging printf.
  This code is not compiled by the build anyway.

* Fix statement construction in rsaencpwd.c.  The prior code generated
  the desired result (incrementing the ptr), but there was an extra
  ineffective indirection.  Removed the ineffective indirection.

Dragonfly-bugs: 3010 (dcb)

6 years agoppp - Fix minor overflow in protocol search
Matthew Dillon [Tue, 11 Apr 2017 05:28:36 +0000 (22:28 -0700)]
ppp - Fix minor overflow in protocol search

* Fix a minor redundant expression in sys/net/libalias/alias_irc.c

* Fix a one-byte overflow in cdcontrol.  Not a security issue.

* Fix an overflow in the protocol search.  This can only overflow a
  static array by one element and is not likely able to cause a security
  issue.

Dragonfly-bugs: 3012 (dcb)

6 years agolibc/gmon: Replace sbrk() with mmap()
Antonio Huete Jimenez [Thu, 22 Jun 2017 23:40:14 +0000 (01:40 +0200)]
libc/gmon: Replace sbrk() with mmap()

- Fixes profiling for C++ programs compiled with lang/gcc5.

Taken-from: FreeBSD (svn 288009)

6 years agokernel/acpi: Call AcpiInitializeSubsystem() before AcpiInitializeTables().
Sascha Wildner [Sat, 1 Jul 2017 09:46:29 +0000 (11:46 +0200)]
kernel/acpi: Call AcpiInitializeSubsystem() before AcpiInitializeTables().

Per chapter "Required ACPICA Initialization Sequence" of the ACPICA
Programmer Reference.

Uncovered by recent table handling changes in ACPICA 20170629.

6 years agokernel/acpica: Remove no longer needed #include.
Sascha Wildner [Mon, 3 Jul 2017 19:09:46 +0000 (21:09 +0200)]
kernel/acpica: Remove no longer needed #include.

6 years agokernel/acpica: Return curthread as thread id from AcpiOsGetThreadId().
Sascha Wildner [Mon, 3 Jul 2017 18:53:23 +0000 (20:53 +0200)]
kernel/acpica: Return curthread as thread id from AcpiOsGetThreadId().

Discussed-with: ivadasz

6 years agokernel/acpica: ACPI_THREAD_ID is unsigned.
Sascha Wildner [Mon, 3 Jul 2017 21:06:44 +0000 (23:06 +0200)]
kernel/acpica: ACPI_THREAD_ID is unsigned.

6 years agokernel/acpica: Better check AcpiOsPredefinedOverride()'s InitVal argument.
Sascha Wildner [Mon, 3 Jul 2017 21:20:04 +0000 (23:20 +0200)]
kernel/acpica: Better check AcpiOsPredefinedOverride()'s InitVal argument.

Taken-from: FreeBSD

6 years agokernel/acpi: Untangle the wakecode generation during buildkernel.
Sascha Wildner [Sat, 8 Jul 2017 21:18:23 +0000 (23:18 +0200)]
kernel/acpi: Untangle the wakecode generation during buildkernel.

* Use file2c instead of hexdump and remove hexdump from the bootstrap
  tools.

* Remove the nested make invocation and the genwakecode.sh script
  too. Instead, do all the steps from acpica's Makefile and
  sys/conf/files.

* Finally, comment it all out because right now all of this isn't
  used.

* This commit also silences a "Object directory not changed from
  original" make warning.

Reported-by: zrj
Based-on:    FreeBSD

6 years agolibc - Fix bug in rcmdsh()
Matthew Dillon [Wed, 26 Jul 2017 19:41:20 +0000 (12:41 -0700)]
libc - Fix bug in rcmdsh()

* rcmdsh() (which really nothing should be using any more anyway) used
  a generic wait(NULL) to wait for a child to exit, but this can wind
  up waiting for the wrong pid in a multi-threaded or multi-fork environment.

* Solved by waiting on the specific pid instead.

6 years agolibpuffs: Fix two asserts.
Sascha Wildner [Sat, 29 Jul 2017 08:08:34 +0000 (10:08 +0200)]
libpuffs: Fix two asserts.

Reported-by: dcb
Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/3013>

6 years agoccdconfig(8): Add missing free().
Sascha Wildner [Sat, 29 Jul 2017 08:32:49 +0000 (10:32 +0200)]
ccdconfig(8): Add missing free().

Reported-by: dcb
Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/3014>

6 years agokernel: Add FreeBSD's virtio_scsi(4) driver.
Sascha Wildner [Sun, 30 Jul 2017 19:30:39 +0000 (21:30 +0200)]
kernel: Add FreeBSD's virtio_scsi(4) driver.

Thanks to ivadasz for figuring out the shutdown freeze issue
(see c022ffc9484ecf07d8d7c4fb918d84a6154367be).

Tested-by: ivadasz, Peter Cannici <turkchess123@gmail.com>
6 years agokernel/cam: Add CAM_SCSI_IT_NEXUS_LOST (in preparation for virtio_scsi(4)).
Sascha Wildner [Sun, 30 Jul 2017 19:21:29 +0000 (21:21 +0200)]
kernel/cam: Add CAM_SCSI_IT_NEXUS_LOST (in preparation for virtio_scsi(4)).

6 years agoMake sure that cam(4)'s dashutdown handler runs before DEVICE_SHUTDOWN().
Imre Vadász [Sun, 30 Jul 2017 14:08:58 +0000 (16:08 +0200)]
Make sure that cam(4)'s dashutdown handler runs before DEVICE_SHUTDOWN().

This meant, that the DEVICE_SHUTDOWN() callback of scsi drivers was running
before the final SYNCHRONIZE_CACHE scsi command was sent by cam(4). For
most drivers this was still fine, since usually the DEVICE_SHUTDOWN()
callback - if it's even implemented - only flushes the command queue.

This change avoids freezing at the end of shutdown which was known to
happen with the twa(4), and virtio_scsi(4) drivers.

The SHUTDOWN_PRI_SECOND priority is selected, because it's so far unused,
and inbetween existing handlers in the shutdown_post_sync phase, that are
at SHUTDOWN_PRI_FIRST and at SHUTDOWN_PRI_DEFAULT.

Tested-by: swildner (on twa(4)), ivadasz (on virtio_scsi(4))
6 years agoif_vtnet - Allocate struct vtnet_tx_header entries from a queue.
Imre Vadász [Mon, 20 Mar 2017 19:16:50 +0000 (20:16 +0100)]
if_vtnet - Allocate struct vtnet_tx_header entries from a queue.

* The existing code was sequentially allocating from an array of
  struct vtnet_tx_header, using an appropriately sized area.
  But this scheme turns out to be a very bad idea when we get out-of-order
  completions in the virtqueue.

* Instead allocate struct vtnet_tx_header entries from an SLIST.

* This should avoid crashes from memory-corruption or use-after-free in
  if_vtnet(9), when running in KVM on Linux, using Linux's vhost-net
  in-kernel virtqueue accelerator.

6 years agosound - Delete devfs clone handler for /dev/dsp and /dev/mixer on unload.
Imre Vadász [Wed, 12 Apr 2017 20:52:23 +0000 (22:52 +0200)]
sound - Delete devfs clone handler for /dev/dsp and /dev/mixer on unload.

* This makes sound work again after unloading and then reloading the
  sound(4) module.

* Only add the devfs clone handler, when the preceeding make_dev() was
  successful.

6 years agoRevert "Always use unix line endings"
zrj [Wed, 5 Jul 2017 10:05:19 +0000 (13:05 +0300)]
Revert "Always use unix line endings"

This reverts commit 74d54042dbade9a0b2e5830b9645fd12ebc978f4.

While Eitan Adler intension is understandable, it was done without normalizing
line endings in the repo first nor checking for contrib/ sources.
Global rule applied even for the binary files.

Discussed-with: swildner

6 years agopthreads - Change PTHREAD_STACK_MIN
Matthew Dillon [Tue, 4 Jul 2017 02:58:19 +0000 (19:58 -0700)]
pthreads - Change PTHREAD_STACK_MIN

* Change PTHREAD_STACK_MIN from 1024 to 16384.  Most other platforms
  seems to use 16384.  Even 4096 can cause rtld failures.

* Fixes 'node', which defaults to configuring the pthreads stacksize to
  PTHREAD_STACK_MIN and then proceeded to implode.

Reported-by: tautology
6 years agodrm/i915: Update to Linux 4.7.10
François Tigeot [Thu, 23 Mar 2017 17:45:12 +0000 (18:45 +0100)]
drm/i915: Update to Linux 4.7.10

* Various bugfixes, including GPU-specific ones on Ironlake and more
  recent hardware.
  Runtime power management and atomic modesetting have been specially
  improved.

* Fix Hardware hangs on Ironlake, Sandybridge, Ivybridge, Skylake and
  Kabylake GPUs

* Fix various display flickering issues, including PSR, Broadwell and
  Display-port specific ones

* Kabylake support is no longer considered experimental

* Color management has been added for Broadwell, Skylake, Kabylake as
  well as Cherryview and Broxton GPUs. The intent is to obtain more
  accurate color representation on various types of panel.

6 years agodrm - Fix hrtimer, don't reset timer->function to NULL in timeout handler.
Imre Vadász [Wed, 7 Jun 2017 21:21:01 +0000 (23:21 +0200)]
drm - Fix hrtimer, don't reset timer->function to NULL in timeout handler.

* The same hrtimer object is activated multiple times by i915(4), so we
  mustn't clear timer->function in the timeout handler.

* This seems to fix the powersaving issues in i915(4) from the update to
  Linux 4.7.10 code in 8621f4070e7cb342161183c980ae7fce2fd8124e.

6 years agoix: Fixup TX/RX ring settings for X550, which supports 64/64 TX/RX rings.
Sepherosa Ziehau [Tue, 18 Apr 2017 04:22:26 +0000 (12:22 +0800)]
ix: Fixup TX/RX ring settings for X550, which supports 64/64 TX/RX rings.

6 years agodrm/linux: make flush_work() more robust
François Tigeot [Thu, 1 Jun 2017 08:28:04 +0000 (10:28 +0200)]
drm/linux: make flush_work() more robust

6 years agousched: Allow process to change self cpu affinity
Sepherosa Ziehau [Fri, 26 May 2017 05:21:06 +0000 (13:21 +0800)]
usched: Allow process to change self cpu affinity

6 years agosched: Change CPU_SETSIZE to signed int, same as FreeBSD/Linux.
Sepherosa Ziehau [Fri, 26 May 2017 05:20:23 +0000 (13:20 +0800)]
sched: Change CPU_SETSIZE to signed int, same as FreeBSD/Linux.

6 years agoem: Enable MSI by default on devices has PCI advanced features capability.
Sepherosa Ziehau [Wed, 24 May 2017 06:30:37 +0000 (14:30 +0800)]
em: Enable MSI by default on devices has PCI advanced features capability.

Some versions of I219 does not PCI express capability, but only
PCI advanced features capability.

Dragonfly-bug: http://bugs.dragonflybsd.org/issues/3038

6 years agopf: Normalized, i.e. defragged, packets requiring rehash.
Sepherosa Ziehau [Fri, 12 May 2017 04:42:24 +0000 (12:42 +0800)]
pf: Normalized, i.e. defragged, packets requiring rehash.

DragonFly-bug: https://bugs.dragonflybsd.org/issues/3036
Tested-by: tautology
7 years agokernel - Fix i915 deadlock
Matthew Dillon [Sun, 23 Apr 2017 00:30:54 +0000 (17:30 -0700)]
kernel - Fix i915 deadlock

* (Attempt to) fix a deadlock in the i915 code.  The device lock retry
  code does not release the PG_BUSY on the passed-in placeholder page,
  so the fact that the lock is obtained non-blocking is irrelevant.

  Try to fix this by immediately releasing the placeholder page.  The
  code already checks for an insertion race later on.

7 years agozoneinfo: Create a /usr/share/zoneinfo/UTC link.
Sascha Wildner [Thu, 13 Apr 2017 20:37:51 +0000 (22:37 +0200)]
zoneinfo: Create a /usr/share/zoneinfo/UTC link.

We renamed GMT to UTC in 949d11f282cb90e67a6d24e8017b0ceb83746d29.
This commit is a followup to that commit and fixes tzload() when
called with gmt[] from gmtload().

Because upstream still uses GMT, stuff the link into a separate
file to not pollute the "etcetera" file.

Also, keep the /usr/share/zoneinfo/GMT link for now.

Reported-by: ftigeot
7 years agodrm: bring in Linux compability changes from master
François Tigeot [Wed, 12 Apr 2017 19:54:19 +0000 (21:54 +0200)]
drm: bring in Linux compability changes from master

Just enough to run the drm/i915 driver from Linux 4.7

7 years agoparam - Change __DragonFly_version to 400801
Matthew Dillon [Wed, 12 Apr 2017 18:57:54 +0000 (11:57 -0700)]
param - Change __DragonFly_version to 400801

* Change __DragonFly_version to 400801 for sigtramp changes.

7 years agokernel - Temporarily set the default machdep.pmap_nx_enable to 0
Matthew Dillon [Wed, 12 Apr 2017 18:55:09 +0000 (11:55 -0700)]
kernel - Temporarily set the default machdep.pmap_nx_enable to 0

* Until we work out some issues, temporarily set the default
  machdep.pmap_nx_enable to 0.

* NOTE: This is a loader tunable only.

7 years agokernel - Implement NX (3) - cleanup
Matthew Dillon [Tue, 4 Apr 2017 17:57:40 +0000 (10:57 -0700)]
kernel - Implement NX (3) - cleanup

* Cleanup extra PROT_EXEC's.

7 years agokernel - Implement machdep.pmap_nx_enable TUNABLE
Matthew Dillon [Tue, 4 Apr 2017 17:46:57 +0000 (10:46 -0700)]
kernel - Implement machdep.pmap_nx_enable TUNABLE

* Implement machdep.pmap_nx_enable TUNABLE.  You can set this to 0
  in /boot/loader.conf to disable the NX feature.

* Also conditionalize on the cpu feature bit being present.

7 years agokernel - Implement NX (2)
Matthew Dillon [Mon, 3 Apr 2017 23:18:39 +0000 (16:18 -0700)]
kernel - Implement NX (2)

* Flesh out NX implementation for main kernel.

* Implement NX support for the vkernel.

7 years agokernel - Implement NX
Matthew Dillon [Mon, 3 Apr 2017 20:38:56 +0000 (13:38 -0700)]
kernel - Implement NX

* Implement the NX (no-execute) pmap bit.

* Shift sigtramp down to a page-bound and protect it prot|VM_PROT_EXECUTE.

* Map the rest of the user stack VM_PROT_READ|VM_PROT_WRITE without
  VM_PROT_EXECUTE.

7 years agogcc - Adjust the unwind code to use the new sigtramp probe sysctl
Matthew Dillon [Wed, 29 Mar 2017 18:31:45 +0000 (11:31 -0700)]
gcc - Adjust the unwind code to use the new sigtramp probe sysctl

* Adjust the unwind code to use the new sigtramp probe sysctl instead
  of hardwiring an address range relative to the ps_strings sysctl.

Reported-by: marino
7 years agokernel - Add KERN_PROC_SIGTRAMP
Matthew Dillon [Wed, 29 Mar 2017 18:23:47 +0000 (11:23 -0700)]
kernel - Add KERN_PROC_SIGTRAMP

* Add a sysctl to retrieve the sigtramp address range for gdb.

Reported-by: marino
7 years agoinet6: Restore mbuf hash after defragmentation.
Sepherosa Ziehau [Sat, 8 Apr 2017 13:26:40 +0000 (21:26 +0800)]
inet6: Restore mbuf hash after defragmentation.

Reported-by: zach
7 years agoReally ensure that our world/kernel are built under POSIX locale ("C").
Sascha Wildner [Tue, 4 Apr 2017 11:49:28 +0000 (13:49 +0200)]
Really ensure that our world/kernel are built under POSIX locale ("C").

dedd9a18e4bbd4f206f9d7f4dba97b92a85e5d49 used LANG but that won't
override any LC_* that are already set.

7 years agokernel - Fix broken wakeup in crypto code
Matthew Dillon [Sat, 1 Apr 2017 23:43:28 +0000 (16:43 -0700)]
kernel - Fix broken wakeup in crypto code

* Depending on which crypto driver is being used and the crypto load,
  the crp_sleep variable for the wrong tdinfo is tested to determine
  whether a wakeup is needed or not.  This can result in the crypto thread
  not being woken up when new work is pending.

* Can cause the crypto subsystem to stall indefinitely, in particular
  during a normal shutdown,

Reported-by: jh32
7 years agoFix some cases where an index was used before its limits check.
Sascha Wildner [Fri, 31 Mar 2017 14:58:37 +0000 (16:58 +0200)]
Fix some cases where an index was used before its limits check.

Dragonfly-bugs: 2998, 2999, 3000, 3001

7 years agolibkvm: Fix char pointer dereference.
Sascha Wildner [Fri, 31 Mar 2017 13:18:28 +0000 (15:18 +0200)]
libkvm: Fix char pointer dereference.

7 years agokernel - Fix deadlock in sound system
Matthew Dillon [Thu, 30 Mar 2017 01:23:27 +0000 (18:23 -0700)]
kernel - Fix deadlock in sound system

* There is a deadlock between the sound system and devfs where one thread
  locks the sound system and calls into devfs, and another calls into devfs
  which holds the devfs lock while calling back into the sound system.

* Fixed by unlocking devfs across the callback.

* Easily triggered by the mate desktop (mate-session, sound preference,
  click random sound effects until deadlock occurs).

Reported-by: ozmage
7 years agokernel - MFC b48dd28447fc (sigtramp workaround)
Matthew Dillon [Wed, 29 Mar 2017 17:02:26 +0000 (10:02 -0700)]
kernel - MFC b48dd28447fc (sigtramp workaround)

* Lower sigtramp's %rip as a temporary workaround to a Ryzen bug.

7 years agosound/hda: Sync device ID table with FreeBSD
Sepherosa Ziehau [Mon, 27 Mar 2017 07:17:22 +0000 (15:17 +0800)]
sound/hda: Sync device ID table with FreeBSD

Obtained-from: FreeBSD

7 years agoKernel - quick workaround for Ryzen v4.8.0
Matthew Dillon [Sun, 26 Mar 2017 22:27:29 +0000 (15:27 -0700)]
Kernel - quick workaround for Ryzen

* Quick workaround for a Ryzen issue that we can release with.

7 years agokernel - Stir longer in arc4random
Matthew Dillon [Sun, 26 Mar 2017 17:12:19 +0000 (10:12 -0700)]
kernel - Stir longer in arc4random

* Stir longer in arc4random

Taken-from: FreeBSD
Reported-by: jaykishan mutkawoa
7 years agobuild - Add the 'efisetup' script
Matthew Dillon [Thu, 23 Mar 2017 02:06:57 +0000 (19:06 -0700)]
build - Add the 'efisetup' script

* Add the 'efisetup' script to /usr/sbin.  This script is capable of
  creating a pristine UEFI bootable DragonFlyBSD installation on the
  target drive.  The target drive will be wiped.

  Note that this script does only a basic installation... literally once
  it sets up the partitions it just does an installworld, make distribution,
  and installkernel, and then some minor adjustments to create the initial
  /etc/rc.conf, /etc/fstab, and /boot/loader.conf.

* Requires that you previously did a buildworld and buildkernel
  before running the script.

7 years agokernel - Fix panic in zget() during heavy paging
Matthew Dillon [Thu, 23 Mar 2017 01:43:08 +0000 (18:43 -0700)]
kernel - Fix panic in zget() during heavy paging

* Fix a panic that can occur in zget() when a large number of swap info
  blocks are needed from the swap_zone.

  Fix by reformulation how new items are added to the zone.  This is a
  non-critical code path, but we make it a bit more SMP friendly anyway.

* Use the opportunity to get rid of the VM object ZONE_INTERRUPT uses.
  The two that are left are never destroyed, so there's no need to track
  the pages in an object.

Reported-by: tkusumi
7 years agobuild - Validate sshd_config
Matthew Dillon [Fri, 17 Mar 2017 23:59:45 +0000 (16:59 -0700)]
build - Validate sshd_config

* Make sure the default sshd_config contains certain lines
  that we require.  At the moment, this adjustment makes sure
  that the sshd_config file has the correct PasswordAuthentication
  directive.

* Intended to catch snafus when openssh is updated from the vendor.

7 years agotest - Flesh out randread statistics reporting
Matthew Dillon [Tue, 21 Mar 2017 01:27:34 +0000 (18:27 -0700)]
test - Flesh out randread statistics reporting

* Cleanup the output.  Report the aggregate IOPS, average latency,
  aggregate bandwidth, low and high latencies, and the standard
  deviation for the test on a per-second basis.

* Standard deviation notes:

  68%     Of the samples are within 1 standard deviation, so if the
    reported stddev is 7uS, then 68% of the samples are +/- 7uS
    of the average reported value.

  95.45%    Of the samples are within 2 standard deviations.  +/- 14uS
    in the example.

  99.73%    Of the samples are within 3 standard deviations.  +/- 21uS
    in the example.

7 years agoUpdate the pciconf(8) database.
Sascha Wildner [Wed, 22 Mar 2017 19:59:33 +0000 (20:59 +0100)]
Update the pciconf(8) database.

March 16, 2017 snapshot from http://pciids.sourceforge.net/

7 years agobsd-family-tree: Sync with FreeBSD.
Sascha Wildner [Wed, 22 Mar 2017 19:50:10 +0000 (20:50 +0100)]
bsd-family-tree: Sync with FreeBSD.

7 years agoSync zoneinfo database with tzdata2017b from ftp://ftp.iana.org/tz/releases
Sascha Wildner [Wed, 22 Mar 2017 08:18:30 +0000 (09:18 +0100)]
Sync zoneinfo database with tzdata2017b from ftp://ftp.iana.org/tz/releases

Haiti resumed observance of DST in 2017.  (Thanks to Steffen Thorsen.)

7 years agoBring in uefisign(8) example script.
Sascha Wildner [Sun, 19 Mar 2017 20:42:51 +0000 (21:42 +0100)]
Bring in uefisign(8) example script.

It was forgotten in bb7548fd68273597588b57868a739b2d3a8a8d94.

Taken-from: FreeBSD

7 years agoinstaller: Fix the "missing /var/run/sem" issues better.
Sascha Wildner [Sun, 19 Mar 2017 15:34:37 +0000 (16:34 +0100)]
installer: Fix the "missing /var/run/sem" issues better.

* Add -C to the tmpfs mount of /var/run on the USB image. This
  ensures that the USB image itself keeps the ppp/, sem/, and
  wpa_supplicant/ dirs under /var/run.

* Since we do not cpdup /var/run explicitly during installation
  it ends up empty on the installed system. Ensure that it has
  the subdirectories it needs by running mtree on /var.

* It looks like the 1e5a476188185cf1161f4fe3ffc060465562ef0d
  change could be reverted because the issue never was that
  /var/run/sem wasn't existing _after_ make upgrade. The mtree
  in the preceding installworld takes care of it. It doesn't
  hurt either, so just shuffle the commands a bit downwards.

7 years agoUPDATING: Add note for OpenSSH HPN removal
Thomas Nikolajsen [Thu, 16 Mar 2017 06:28:40 +0000 (07:28 +0100)]
UPDATING: Add note for OpenSSH HPN removal

7 years agokernel/mmcsd: Add some dummy values for d_nheads and d_secpertrack.
Sascha Wildner [Sat, 18 Mar 2017 19:51:32 +0000 (20:51 +0100)]
kernel/mmcsd: Add some dummy values for d_nheads and d_secpertrack.

Values taken from nvme(4). newfs_msdos(8) uses these, and the way
we call it from the installer (not specifying them explicitly) broke
installing to an SD card.

Reported-by: Pontus Lundkvist <p@article.se>
7 years agosshd - Fix default password authentication (2)
Matthew Dillon [Fri, 17 Mar 2017 22:58:23 +0000 (15:58 -0700)]
sshd - Fix default password authentication (2)

* Oops, last commit had to change it in servconf.c, not readconf.c

7 years agosshd - Fix default password authentication
Matthew Dillon [Fri, 17 Mar 2017 22:47:52 +0000 (15:47 -0700)]
sshd - Fix default password authentication

* The default for PasswordAuthentication somehow got reverted to
  being enabled.

* Disable PasswordAuthentication by default.

* Uncomment PasswordAuthentication in the default sshd_config,
  defaulting to 'no', and always overriding sshd's own defaults.

7 years agodf.1: Fix example for -t. It's null, not nullfs.
Sascha Wildner [Fri, 17 Mar 2017 20:32:57 +0000 (21:32 +0100)]
df.1: Fix example for -t. It's null, not nullfs.

Reported-by: marino
7 years agoCorrect param.h entry for this version.
Justin C. Sherrill [Thu, 16 Mar 2017 01:27:19 +0000 (21:27 -0400)]
Correct param.h entry for this version.

Noticed-by: Thomas Nikolajsen
7 years agozone.9: Adjust prototypes for some recent changes.
Sascha Wildner [Mon, 13 Mar 2017 11:21:46 +0000 (12:21 +0100)]
zone.9: Adjust prototypes for some recent changes.

7 years agoNumbering changes to name 4.8 branch correctly. v4.8.0rc
Justin C. Sherrill [Sun, 12 Mar 2017 01:43:46 +0000 (20:43 -0500)]
Numbering changes to name 4.8 branch correctly.

7 years agore: Only limited versions of this chip require explicit padding.
Sepherosa Ziehau [Mon, 27 Feb 2017 18:01:21 +0000 (02:01 +0800)]
re: Only limited versions of this chip require explicit padding.

Certain versions of this chip fail to generate correct UDP checksum
on explicitly padded UDP datagrams.

Reported-and-Tested-by: Daniel Bilik
7 years agokernel - Fix cluster_write() inefficiency
Matthew Dillon [Tue, 7 Mar 2017 01:36:48 +0000 (17:36 -0800)]
kernel - Fix cluster_write() inefficiency

* A bug in the cluster code was causing HAMMER to write out 64KB buffers in
  32KB overlapping segments, resulting in data being written to the media
  twice.

* This fix just about doubles HAMMER's sequential write bandwidth.

7 years agoAlways use unix line endings
Eitan Adler [Sun, 5 Mar 2017 18:27:43 +0000 (10:27 -0800)]
Always use unix line endings

7 years agovkernel: Prevent clang optimizing out the traps.
zrj [Thu, 2 Mar 2017 17:44:23 +0000 (19:44 +0200)]
vkernel: Prevent clang optimizing out the traps.

Turns out clang removes non volatile null-pointers. Prevent that.

7 years agowlan: Remove duplicate typedef.
zrj [Thu, 2 Mar 2017 16:14:51 +0000 (18:14 +0200)]
wlan: Remove duplicate typedef.

7 years agoUnbreak VKERNEL64 for clang compatibility.
zrj [Thu, 2 Mar 2017 15:46:09 +0000 (17:46 +0200)]
Unbreak VKERNEL64 for clang compatibility.

7 years agolibc/getnameinfo: Whitespace fix to my last commit.
Sascha Wildner [Sat, 4 Mar 2017 12:08:14 +0000 (13:08 +0100)]
libc/getnameinfo: Whitespace fix to my last commit.

7 years agolibc/getnameinfo: Clean up the comments in getnameinfo_link() a bit.
Sascha Wildner [Sat, 4 Mar 2017 12:00:43 +0000 (13:00 +0100)]
libc/getnameinfo: Clean up the comments in getnameinfo_link() a bit.

7 years agoSync ACPICA with Intel's version 20170303.
Sascha Wildner [Fri, 3 Mar 2017 21:15:04 +0000 (22:15 +0100)]
Sync ACPICA with Intel's version 20170303.

Nothing big, really:

* The licensing information at the start of each source code module has
  been updated. In addition to the Intel license, the dual GPLv2/BSD
  license has been added for completeness. Now, a single version of the
  source code should be suitable for all ACPICA customers. This is the
  major change for this release since it affects all source code modules.

* Fixed two issues with the common asltypes.h header that could cause
  problems in some environments (Kim Jung-uk).

* Disassembler: fixed a regression introduced in 20170224. A fix for a
  memory leak related to resource descriptor tags (names) could fault
  when the disassembler was generated with 64-bit compilers.

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

7 years agoRemove old timezone Pacific/Johnston via 'make upgrade'.
Sascha Wildner [Fri, 3 Mar 2017 15:41:37 +0000 (16:41 +0100)]
Remove old timezone Pacific/Johnston via 'make upgrade'.

7 years agoSync zoneinfo database with tzdata2017a from ftp://ftp.iana.org/tz/releases
Sascha Wildner [Thu, 2 Mar 2017 13:43:55 +0000 (14:43 +0100)]
Sync zoneinfo database with tzdata2017a from ftp://ftp.iana.org/tz/releases

* Mongolia no longer observes DST.  (Thanks to Ganbold Tsagaankhuu.)

* Chile's Region of Magallanes moves from -04/-03 to -03 year-round.
    Its clocks diverge from America/Santiago starting 2017-05-13 at
    23:00, hiving off a new zone America/Punta_Arenas.  Although the
    Chilean government says this change expires in May 2019, for now
    assume it's permanent.  (Thanks to Juan Correa and Deborah
    Goldsmith.)  This also affects Antarctica/Palmer.

* Fix many entries for historical time stamps for Europe/Madrid
    before 1979, to agree with tables compiled by Pere Planesas of the
    National Astronomical Observatory of Spain.  As a side effect,
    this changes some time stamps for Africa/Ceuta before 1929, which
    are probably guesswork anyway.  (Thanks to Steve Allen and
    Pierpaolo Bernardi for the heads-ups, and to Michael Deckers for
    correcting the 1901 transition.)

* Ecuador observed DST from 1992-11-28 to 1993-02-05.
    (Thanks to Alois Treindl.)

* Asia/Atyrau and Asia/Oral were at +03 (not +04) before 1930-06-21.
    (Thanks to Stepan Golosunov.)

* Switch to numeric time zone abbreviations for South America, as
    part of the ongoing project of removing invented abbreviations.
    This avoids the need to invent an abbreviation for the new Chilean
    zone.  Similarly, switch from invented to numeric time zone
    abbreviations for a number of other zones.

* For Alaska time from 1900 through 1967, instead of "CAT" use the
    abbreviation "AST", the abbreviation commonly used at the time
    (Atlantic Standard Time had not been standardized yet).  Use "AWT"
    and "APT" instead of the invented abbreviations "CAWT" and "CAPT".

* Use "CST" and "CDT" instead of invented abbreviations for Macau
    before 1999 and Taiwan before 1938, and use "JST" instead of the
    invented abbreviation "JCST" for Japan and Korea before 1938.

* Move the Pacific/Johnston link from 'australasia' to 'backward',
    since Johnston is now uninhabited.

* africa (Africa/Monrovia): The 1972 transition was on January 7,
    not May 1.  (Shanks was wrong again! and Howse was right.)

* The 'Theory' file now better documents choice of historical time
    zone abbreviations.  (Problems reported by Michael Deckers.)

7 years agodrm/i915: Fix compilation with clang
François Tigeot [Thu, 2 Mar 2017 08:33:57 +0000 (09:33 +0100)]
drm/i915: Fix compilation with clang

* Add back a lost pointer initialization line

* With this change, a clang-built drm/i915 module now works as expected

Submitted-by: zrj
7 years agorc.d - Add option to load kernel modules from rc.conf(5)
Johannes Hofmann [Thu, 2 Mar 2017 06:46:41 +0000 (07:46 +0100)]
rc.d - Add option to load kernel modules from rc.conf(5)

Due to memory limitations in the early boot phase it is not
advisable to load kernel modules that are not strictly necessary
to mount the root file system via loader.conf(5).
Therefore a new rc script "modules" is added that allows loading of
kernel modules from rc.conf(5).

7 years agoxargs.1: Add some words about -r (taken from FreeBSD).
Sascha Wildner [Wed, 1 Mar 2017 21:05:27 +0000 (22:05 +0100)]
xargs.1: Add some words about -r (taken from FreeBSD).

7 years agorc.conf.5: Adjust the memimg documentation a bit.
Sascha Wildner [Wed, 1 Mar 2017 20:06:48 +0000 (21:06 +0100)]
rc.conf.5: Adjust the memimg documentation a bit.

7 years agoClean up the namespace in a number of standard headers.
Sascha Wildner [Wed, 1 Mar 2017 19:36:39 +0000 (20:36 +0100)]
Clean up the namespace in a number of standard headers.

* In most cases, instead of the full load of <sys/types.h>,
  include <machine/stdint.h> which defines the __-types that
  <monetary.h>, <pwd.h>, <search.h>, <strings.h> and <wordexp.h>
  only need.

* Additionally, extend the visibility of the size_t definition
  and adjust WRDE_NOSYS's visibility because it was only in the
  standard up to Issue 6.

* In <time.h>, include <sys/stdint.h> to get at __pid_t too.

* Likewise, include <sys/stdint.h> in <sys/wait.h> and provide
  a definition of pid_t as required.

7 years agoAdjust whitespace in a couple of standard headers (no functional change).
Sascha Wildner [Wed, 1 Mar 2017 19:24:01 +0000 (20:24 +0100)]
Adjust whitespace in a couple of standard headers (no functional change).

In preparation for another round of namespace cleanup.

7 years agorc.conf.5 - Adjust manpage to the last changes.
Antonio Huete Jimenez [Wed, 1 Mar 2017 19:11:15 +0000 (20:11 +0100)]
rc.conf.5 - Adjust manpage to the last changes.

7 years agoxargs - Add dummy -r option
Matthew Dillon [Wed, 1 Mar 2017 18:01:14 +0000 (10:01 -0800)]
xargs - Add dummy -r option

* Add the -r option for GNU compatbility.  This option is the short form
  for the --no-run-if-empty GNU option, which is our default behavior, so
  we do nothing with it other than allow it.

Taken-from: FreeBSD.

7 years agokernel: Remove unused DIRECTIO option (see 12b70cea73eef6a67).
Sascha Wildner [Wed, 1 Mar 2017 12:53:16 +0000 (13:53 +0100)]
kernel: Remove unused DIRECTIO option (see 12b70cea73eef6a67).

7 years agorc.d - Add an option to specify memimg file for vkernels
Antonio Huete Jimenez [Wed, 1 Mar 2017 01:04:30 +0000 (02:04 +0100)]
rc.d - Add an option to specify memimg file for vkernels

- This option defaults to /var/vkernel/memimg.xxxxxx when not specified
  and it tries to provide a memimg file automatically even when non-privileged
  users run vkernels.

- The default directory for memimg files (/var/vkernel) is created if it doesn't
  exist and set to 1777 mode.

7 years agorc.d - Allow vkernel to run as non-root
Antonio Huete Jimenez [Fri, 24 Feb 2017 20:52:39 +0000 (21:52 +0100)]
rc.d - Allow vkernel to run as non-root

7 years agorc.d - Follow up previous commit
Antonio Huete Jimenez [Fri, 24 Feb 2017 15:42:41 +0000 (16:42 +0100)]
rc.d - Follow up previous commit

- unset all variables that could be potentially reused
- Use lowercase in a warn message

7 years agoinstaller: Turn off soft updates for /boot in the UFS install.
Sascha Wildner [Sun, 26 Feb 2017 03:51:04 +0000 (04:51 +0100)]
installer: Turn off soft updates for /boot in the UFS install.

This was missed when we gave the UFS install a separate /boot partition.

Reported-by: ozmage