4 years agoinet: Dispatch in_ifdetach to netisr0 to run
Sepherosa Ziehau [Sun, 11 May 2014 06:57:06 +0000 (14:57 +0800)]
inet: Dispatch in_ifdetach to netisr0 to run

- It only goes through two inpcb lists.  Accessing to these two lists
  is lockless MPSAFE only if the accessing is in netisr0.
- It only modifies inpcbs' multicast option, which should be modified
  in netisr0.

4 years agopfsync: Dispatch in_{add,del}multi to netisr0
Sepherosa Ziehau [Sat, 10 May 2014 13:48:44 +0000 (21:48 +0800)]
pfsync: Dispatch in_{add,del}multi to netisr0

Netisr0 is where multicast is handled.

4 years agokernel/acpi: Use ACPI_SUCCESS()/ACPI_FAILURE() in a few places.
Sascha Wildner [Sat, 10 May 2014 23:30:05 +0000 (01:30 +0200)]
kernel/acpi: Use ACPI_SUCCESS()/ACPI_FAILURE() in a few places.

4 years agokernel/acpi: Move the declaration of _debug_acpi to acpivar.h.
Sascha Wildner [Sat, 10 May 2014 23:11:37 +0000 (01:11 +0200)]
kernel/acpi: Move the declaration of _debug_acpi to acpivar.h.

4 years agokernel - Fix racing assertion
Matthew Dillon [Fri, 9 May 2014 17:24:56 +0000 (10:24 -0700)]
kernel - Fix racing assertion

* Two semaphore assertions could panic the box because they were testing
  conditions subject to SMP races.

* Move the assertions past the lock so they are no longer subject to SMP

Reported-by: marino
4 years agoigmp: Dispatch fast and slow timeout handler to netisr0
Sepherosa Ziehau [Thu, 8 May 2014 13:02:36 +0000 (21:02 +0800)]
igmp: Dispatch fast and slow timeout handler to netisr0

Netisr0 is where IGMP is to be handled.

4 years agotcp: Multicast sockopts do not make sense on TCP sockets
Sepherosa Ziehau [Wed, 7 May 2014 14:33:40 +0000 (22:33 +0800)]
tcp: Multicast sockopts do not make sense on TCP sockets

4 years agokernel: Remove two oldusb wlan drivers, rum and ural.
Sascha Wildner [Wed, 7 May 2014 13:01:43 +0000 (15:01 +0200)]
kernel: Remove two oldusb wlan drivers, rum and ural.

Both don't work even with oldusb because they have never been
ported to the current ieee80211 framework. In fact, they were
unhooked from the build at the time.

Both also exist for usb4bsd. rum(4) was ported to DragonFly
while ural(4) has yet to be ported.

4 years agoUpdate files for file-5.18 import.
Peter Avalos [Tue, 6 May 2014 17:52:16 +0000 (10:52 -0700)]
Update files for file-5.18 import.

4 years agoMerge branch 'vendor/FILE'
Peter Avalos [Tue, 6 May 2014 22:37:33 +0000 (15:37 -0700)]
Merge branch 'vendor/FILE'

4 years agokernel: Fix some boolean_t vs. int confusion.
Sascha Wildner [Tue, 6 May 2014 19:52:29 +0000 (21:52 +0200)]
kernel: Fix some boolean_t vs. int confusion.

When boolean_t is defined to be _Bool instead of int (not part of this
commit), this is what gcc is sad about.

4 years agoImport file-5.18.
Peter Avalos [Tue, 6 May 2014 17:40:32 +0000 (10:40 -0700)]
Import file-5.18.

See ChangeLog for details.

4 years agonrelease: Copying pkg.conf.sample to pkg.conf is no longer needed.
Sascha Wildner [Tue, 6 May 2014 09:20:11 +0000 (11:20 +0200)]
nrelease: Copying pkg.conf.sample to pkg.conf is no longer needed.

4 years agohammer2 - dmsg stabilization
Matthew Dillon [Mon, 5 May 2014 06:52:24 +0000 (23:52 -0700)]
hammer2 - dmsg stabilization

This is a general stabilization pass testing xdisk resumption on various
communications failures (killing the local or remote hammer2 service demon).

* Simulate failures on recursive transactions in a bottom-up fashion

* bcmp() does not return an inequality (neg, zero, or positive).  It
  returns only 0 or 1.  Change fs_label RBTREE test to strcmp()

* ref-count the state structure, use dmsg_state_hold()/dmsg_state_drop()
  to control it.  Fix at least one memory leak.

* Consolidate simulated transaction failure core into a helper
  function dmsg_msg_simulate_failure().

* Clean up the tx state on the front-end after the msg has extracted
  necessary information from it, instead of in the transmit thread.
  This is so the state fields are updated synchronously and not delayed
  by the transmit queue.

* Change xdisk's error test to avoid accidently failing a BIO due to
  a communications issue (verses an actual IO error on the remote physical

* Remove some invalid assertions, add assertions.

4 years agohammer2 - Retool dmsg mechanics to improve virtual circuit design 2/2
Matthew Dillon [Mon, 5 May 2014 02:52:05 +0000 (19:52 -0700)]
hammer2 - Retool dmsg mechanics to improve virtual circuit design 2/2

* Use transaction stacking to effectively connect resources to consumers.
  Issuing a transaction over a received SPAN effectively creates a virtual
  circuit to the originator.

* The hammer2 service demon (userland) is currently being used to route,
  but direct kernel<->kernel socket connections are now theoretically
  possible for later performance work.  Current performance is going
  to be low due to layering.

* Get subr_diskiocom and the xdisk driver mostly working again.  The
  code is a lot cleaner but still needs considerable stability work and
  better unwinding during failure conditions.

* Start work on hammer2<->hammer2 communications.

4 years ago<setjmp.h>: Make _setjmp() and _longjmp() visible for SUSv2 too.
Sascha Wildner [Sun, 4 May 2014 14:01:36 +0000 (16:01 +0200)]
<setjmp.h>: Make _setjmp() and _longjmp() visible for SUSv2 too.

They were around even earlier (CAE XPG4v2, actually) but to support that
we would need _XOPEN_SOURCE_EXTENSIONS support which we currently lack.

4 years agoix.4: Mention polling(4) support.
Sascha Wildner [Sun, 4 May 2014 12:11:00 +0000 (14:11 +0200)]
ix.4: Mention polling(4) support.

4 years agoix: Add polling(4) support
Sepherosa Ziehau [Wed, 30 Apr 2014 12:23:51 +0000 (20:23 +0800)]
ix: Add polling(4) support

4 years ago wlan/atheros - Remove debugging
Matthew Dillon [Sat, 3 May 2014 22:54:54 +0000 (15:54 -0700)]
 wlan/atheros - Remove debugging

* Remove left-over debug kprintf.

4 years agowlan/atheros - Synchronize sleep state code from FreeBSD
Matthew Dillon [Sat, 3 May 2014 21:25:53 +0000 (14:25 -0700)]
wlan/atheros - Synchronize sleep state code from FreeBSD

* Synchronize Adrian Chadd's sleep state code and wlan updates.

* With this commit if the wlan or ath interface is in a 'down' state,
  it will use full sleep mode and save power.

* We get all of ATH through today but the 802_11 changes are a bit
  too substantial so this commit only brings in the sleep state code
  through today (3-May-2014).

* There is a bunch of other 802_11 work that needs to be brought in
  but it's like 20,000 lines of patches so... not today.

* Verified operational on Acer C720 chromebook.  full-sleep mode saves
  0.3-0.4W.  Network sleep mode code is also verified to be operational
  but does not appear to save any power at the moment.

  Also verified: beacons are working properly for wakeups on packet

4 years ago<setjmp.h>: Fix up visibility checks a bit (avoid checking _ANSI_SOURCE).
Sascha Wildner [Sat, 3 May 2014 21:26:32 +0000 (23:26 +0200)]
<setjmp.h>: Fix up visibility checks a bit (avoid checking _ANSI_SOURCE).

4 years agokernel/bwn: Fix a typo. This fixes RF switch state polling.
Imre Vadasz [Sat, 3 May 2014 18:53:26 +0000 (20:53 +0200)]
kernel/bwn: Fix a typo. This fixes RF switch state polling.

Fixes the RF switch state polling by comparing with the revision of the
PHY instead of the revision of the RADIO.

4 years agoMerge branch 'vendor/LIBPCAP'
Matthew Dillon [Sat, 3 May 2014 15:50:32 +0000 (08:50 -0700)]
Merge branch 'vendor/LIBPCAP'

Merge for 1.4.0

4 years agoImport libpcap-1.4.0.
Matthew Dillon [Sat, 3 May 2014 15:46:52 +0000 (08:46 -0700)]
Import libpcap-1.4.0.

See CHANGES for the details.

4 years agodrm/i915: Use the Linux workqueue API
François Tigeot [Sat, 3 May 2014 09:12:14 +0000 (11:12 +0200)]
drm/i915: Use the Linux workqueue API

Opportunistically reduce differences with Linux 3.8.13

4 years agolinux/workqueue.h: Adapt to DragonFly
François Tigeot [Sat, 3 May 2014 08:55:10 +0000 (10:55 +0200)]
linux/workqueue.h: Adapt to DragonFly

* Protect callout structures from concurrent operations on MP machines

* Add some functions used by the drm/i915 code from Linux 3.8.x

4 years agolinux/timer.h: Add round_jiffies_up_relative()
François Tigeot [Sat, 3 May 2014 08:53:41 +0000 (10:53 +0200)]
linux/timer.h: Add round_jiffies_up_relative()

4 years agodrm: Import linux/workqueue.h from FreeBSD's OFED stack
François Tigeot [Sat, 3 May 2014 08:52:02 +0000 (10:52 +0200)]
drm: Import linux/workqueue.h from FreeBSD's OFED stack

4 years ago<setjmp.h>: <sys/cdefs.h> must be included before <machine/setjmp.h>.
Sascha Wildner [Sat, 3 May 2014 00:25:52 +0000 (02:25 +0200)]
<setjmp.h>: <sys/cdefs.h> must be included before <machine/setjmp.h>.

4 years agoRemove some more files via 'make upgrade' and fix a typo.
Sascha Wildner [Fri, 2 May 2014 08:14:24 +0000 (10:14 +0200)]
Remove some more files via 'make upgrade' and fix a typo.

4 years agopcidevs: Remove some IDs we don't use.
Sascha Wildner [Fri, 2 May 2014 00:22:22 +0000 (02:22 +0200)]
pcidevs: Remove some IDs we don't use.

4 years agokernel/ral: Switch back to using pcidevs.h.
Sascha Wildner [Fri, 2 May 2014 00:21:58 +0000 (02:21 +0200)]
kernel/ral: Switch back to using pcidevs.h.

It was lost with feb94d24033db5d8fe8e5e4807103d48f3638ceb.

4 years agoRemove ATM protocol support.
Sascha Wildner [Thu, 1 May 2014 22:31:57 +0000 (00:31 +0200)]
Remove ATM protocol support.

FreeBSD ditched it about 6 years ago. Also, I'm not sure if this ever
worked on x86_64.

4 years agokernel: Sync ACPICA with Intel's version 20140424.
Sascha Wildner [Wed, 30 Apr 2014 10:25:14 +0000 (12:25 +0200)]
kernel: Sync ACPICA with Intel's version 20140424.

Some highlights:

* Implemented support to skip/ignore NULL address entries in the

* Removed an extraneous error message for the case where there
  are a large number of system GPEs (> 124).

* Implemented and deployed additional configuration support for
  the public ACPICA external interfaces.

* iASL and disassembler: Add full support for the LPIT table
  (Low Power Idle Table).

* AcpiDump utility:
  1) Add option to force the use of the RSDT (over the XSDT).
  2) Improve validation of the RSDP signature (use 8 chars
     instead of 4).

* Debugger: Updated the GPE command (which simulates a GPE by
  executing the GPE code paths in ACPICA).

* Unix application OSL: Update line-editing support.

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

4 years agoAdd the <stdnoreturn.h> header for C11 conformance.
Sascha Wildner [Wed, 30 Apr 2014 09:39:03 +0000 (11:39 +0200)]
Add the <stdnoreturn.h> header for C11 conformance.

Per clause 7.23 from the final draft.

Taken-from: FreeBSD

4 years agoAdd the <stdalign.h> header for C11 conformance.
Sascha Wildner [Mon, 21 Apr 2014 14:08:47 +0000 (16:08 +0200)]
Add the <stdalign.h> header for C11 conformance.

Per clause 7.15 from the final draft.

Along with it, add some helper macros to <sys/cdefs.h>.

While here, adjust an #ifdef in <sys/cdefs.h>.

Taken-from: FreeBSD

4 years ago<assert.h>: Define a static_assert macro for C11.
Sascha Wildner [Mon, 21 Apr 2014 12:27:35 +0000 (14:27 +0200)]
<assert.h>: Define a static_assert macro for C11.

Per clause 7.2 from the final draft:

"The header <assert.h> defines the assert and static_assert macros [...]
 The macro static_assert expands to _Static_assert."

4 years agoOpenSSL: Check the correct pointer in EC_POINT_invert.
Sascha Wildner [Wed, 30 Apr 2014 09:33:31 +0000 (11:33 +0200)]
OpenSSL: Check the correct pointer in EC_POINT_invert.

It looks like this was copied from EC_POINT_dbl() but the check was
overlooked when adjusting.

Reported-by: plundra on #dragonflybsd
Taken-from:  OpenBSD

4 years agoOpenSSL: Add fix for CVE-2010-5298.
Sascha Wildner [Wed, 30 Apr 2014 08:58:52 +0000 (10:58 +0200)]
OpenSSL: Add fix for CVE-2010-5298.

4 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Markus Pfeiffer [Tue, 29 Apr 2014 22:47:05 +0000 (23:47 +0100)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

4 years agousr.bin/top: Correct formatting for PIDs
Markus Pfeiffer [Tue, 29 Apr 2014 22:44:53 +0000 (23:44 +0100)]
usr.bin/top: Correct formatting for PIDs

DragonFly PIDs can now be up to 6 digits long

4 years agokernel/acpi: Add the ACPI_LV_REPAIR debug level (added in ACPICA 20091214).
Sascha Wildner [Tue, 29 Apr 2014 20:48:43 +0000 (22:48 +0200)]
kernel/acpi: Add the ACPI_LV_REPAIR debug level (added in ACPICA 20091214).

Also sync the list of debug levels in the manual page.

4 years agobin/ps: adjust PIDLEN
Markus Pfeiffer [Tue, 29 Apr 2014 19:49:40 +0000 (20:49 +0100)]
bin/ps: adjust PIDLEN

DragonFly's pids can now become 6 digits long

4 years agobsd-family-tree: Sync with FreeBSD.
Sascha Wildner [Mon, 28 Apr 2014 17:05:57 +0000 (19:05 +0200)]
bsd-family-tree: Sync with FreeBSD.

4 years agopflogd: Make pflog readable by tcpdump
Peeter [Mon, 28 Apr 2014 08:12:00 +0000 (10:12 +0200)]
pflogd: Make pflog readable by tcpdump

pflogd was previously writing incorrectly to the pflog logfile

Changes obtained from FreeBSD

4 years agodrm/i915: Reduce i915_irq.c diffs with Linux 3.8.13
François Tigeot [Sun, 27 Apr 2014 09:26:47 +0000 (11:26 +0200)]
drm/i915: Reduce i915_irq.c diffs with Linux 3.8.13

* i915_handle_rps_change() renamed to ironlake_handle_rps_change()

* pch_irq_handler() replaced by ibx_irq_handler() and cpt_irq_handler()

* Make ironlake_irq_handler() more similar to its Linux 3.8.13 version

* Make ivybridge_irq_handler() more similar to its Linux 3.8.13 version

4 years agokernel/vtnet: Zeroing memory before reusing.
Imre Vadasz [Sat, 26 Apr 2014 10:01:13 +0000 (12:01 +0200)]
kernel/vtnet: Zeroing memory before reusing.

* Forgot a memset to clear sc->vtnet_macfilter before reusing.

* Forgot an __aligned(2) in another case where we need a local
  variable of size 2 to be stored in physically contiguous memory.

* Deletes an unneeded assertion and comment.

4 years agokernel/acpi: Improve a message a bit.
Sascha Wildner [Sat, 26 Apr 2014 10:21:27 +0000 (12:21 +0200)]
kernel/acpi: Improve a message a bit.

4 years agokernel/vtnet: Replace a kmalloc by contigmalloc.
Imre Vadasz [Sat, 26 Apr 2014 06:36:33 +0000 (08:36 +0200)]
kernel/vtnet: Replace a kmalloc by contigmalloc.

* To get physically contiguous memory, we have to use contigmalloc instead
  of kmalloc.

* Use a 2 byte alignment to make sure that a 2 byte local variable is
  stored in physically contiguous memory.

Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2666>

4 years agovtnet.4: Fix SYNOPSIS ("device if_vtnet" -> "device vtnet").
Sascha Wildner [Fri, 25 Apr 2014 13:45:44 +0000 (15:45 +0200)]
vtnet.4: Fix SYNOPSIS ("device if_vtnet" -> "device vtnet").

4 years agoAdjust newsyslog(8) and pkill(1) for the new PID_MAX.
Sascha Wildner [Wed, 23 Apr 2014 18:00:47 +0000 (20:00 +0200)]
Adjust newsyslog(8) and pkill(1) for the new PID_MAX.

Reported-by: marino
4 years agokernel/drm: Fix two warnings in the radeon driver.
Sascha Wildner [Wed, 23 Apr 2014 09:35:34 +0000 (11:35 +0200)]
kernel/drm: Fix two warnings in the radeon driver.

4 years agovtnet.4: Use .Mt for email addresses.
Sascha Wildner [Wed, 23 Apr 2014 07:52:47 +0000 (09:52 +0200)]
vtnet.4: Use .Mt for email addresses.

4 years agohammer2 - Retool dmsg mechanics to improve virtual circuit design 1/2
Matthew Dillon [Wed, 23 Apr 2014 07:04:04 +0000 (00:04 -0700)]
hammer2 - Retool dmsg mechanics to improve virtual circuit design 1/2

* Rip-out the circuit structures and forging code.  These changes simplify
  the DMSG code considerably.

* Retool the core command/response messaging mechanics to allow either
  side of a transaction to initiate commands and receive responses.

  This means we cannot use DMSGF_REPLY to determine whether the transmit-side
  or receive-side state RBTREE holds the msgid.  Instead we add two more
  flags DMSGF_REVTRANS and DMSGF_REVCIRC to tell the receiver which RBTREE
  holds the msgid and/or circuit id.

* Retool to allow transaction stacking.  Sub-transactions can now run under
  their parents.

* Retool the transaction code to provide virtual circuit functionality
  through the use of transaction stacking.

  With these changes, the normal SPAN mechanism which operates using
  open transactions can also be used to route messages over the SPAN.
  There is no longer a need to forge a return path because sub-transaction
  commands can now be initiated 'out' over an active, received SPAN

  This part is not completely working yet, it needs the actual routing
  code and some adjustments to the SPAN mechanism to prevent path ripups
  from interfering with any in-progress transactions.  Ultimately the
  availability of a new path would have two be detected by the end points
  so new 'connections' can be forged over the new, better path.

4 years agodrm/i915: Use the Linux timer API
François Tigeot [Tue, 22 Apr 2014 18:21:11 +0000 (20:21 +0200)]
drm/i915: Use the Linux timer API

Reduce differences with Linux 3.8.13

4 years agodrm: Use the Linux timer API
François Tigeot [Tue, 22 Apr 2014 18:18:43 +0000 (20:18 +0200)]
drm: Use the Linux timer API

Reduce differences with Linux 3.8.13

4 years agolinux/timer.h: Adapt to Dragonfly
François Tigeot [Tue, 22 Apr 2014 18:15:34 +0000 (20:15 +0200)]
linux/timer.h: Adapt to Dragonfly

* Protect callout structures from concurrent operations on MP machines

* Expand the API for use with drm code from Linux 3.8.x

4 years agodrm: Import linux/timer.h from FreeBSD's OFED stack
François Tigeot [Tue, 22 Apr 2014 18:14:01 +0000 (20:14 +0200)]
drm: Import linux/timer.h from FreeBSD's OFED stack

4 years agokernel - Improve pid-reuse algorithm, fix bug
Matthew Dillon [Mon, 21 Apr 2014 22:00:00 +0000 (15:00 -0700)]
kernel - Improve pid-reuse algorithm, fix bug

* Fix a bug where under extreme loads it was possible for a PID to be
  allocated twice.

* Implement a minimum pid-reuse delay of 10 seconds.  No pid, session id,
  or pgid will be reused for at least 10 seconds after being reaped.

  This shouldn't really be necessary but it should help scripts, particularly
  bulk builds, which rely on testing out-of-band PIDs with pwait.

* Increase PID_MAX from 99999 to 999999

Reported-by: marino
4 years agovtnet.4: Add a reference to ifmedia(4).
Sascha Wildner [Mon, 21 Apr 2014 21:56:40 +0000 (23:56 +0200)]
vtnet.4: Add a reference to ifmedia(4).

4 years agoImporting slightly modified virtio-net by vsrinivas
Imre Vadasz [Sat, 19 Apr 2014 16:44:45 +0000 (18:44 +0200)]
Importing slightly modified virtio-net by vsrinivas

* TSO and LRO are off for now by default.

* Makefile changes. Adapting manpages. Fixing a typo in vtnet_tx_offload.

* Allocating tx headers with contigmalloc during attach instead of using
  kmalloc in the transmit path.
  In the worst case we need one tx header for two virtqueue ring entries.

* Additionally some whitespace fixes

4 years agokernel: Remove some unused options (forgotten in the IPX removal).
Sascha Wildner [Mon, 21 Apr 2014 18:21:44 +0000 (20:21 +0200)]
kernel: Remove some unused options (forgotten in the IPX removal).

4 years agohammer2 - more dmsg/separation work
Matthew Dillon [Mon, 21 Apr 2014 03:12:01 +0000 (20:12 -0700)]
hammer2 - more dmsg/separation work

* Use msg->tcmd in a few places.

* Remove some debugging.

* Move the iocom in the hammer2 VFS from the pmp to the hmp, allowing
  all supported PFSs to be advertised without having to mount each one.

* Preliminary work on hammer2-generated SPANs for all PFSs on a
  hammer2_volume.  Since multiple PFSs can be advertised, we can
  no longer use AUTOTXSPAN (which can only transmit one).

* More adjustments to newfs_hammer2.  When generating multiple PFSs,
  each one is given its own clid and fsid.

4 years agohammer2 - more dmsg/separation work
Matthew Dillon [Mon, 21 Apr 2014 03:07:24 +0000 (20:07 -0700)]
hammer2 - more dmsg/separation work

* More separation work in libdmsg, kern_dmsg.c, and kernel dmsg consumers.

* subr_diskiocom.c should no longer need hammer2_disk.h (sys/dmsg.h)
  for the kernel build.

* Add dmsg->tcmd to smooth some switch() use cases.

4 years agoRevert "Add missing libraries to some program Makefiles"
François Tigeot [Sun, 20 Apr 2014 18:54:29 +0000 (20:54 +0200)]
Revert "Add missing libraries to some program Makefiles"

This reverts commit 35617968ec499b8b149c69bdcacfb952b81264bc.

* It turns out the above referenced changes were not necessary; other
  /lib fixes made the link issue go away.

* This commit should fix issue #2661

4 years agoRemove support for the IPX and NCP protocols, and for NWFS.
Sascha Wildner [Sun, 20 Apr 2014 14:38:10 +0000 (16:38 +0200)]
Remove support for the IPX and NCP protocols, and for NWFS.

This was on the list for a longer time now. FreeBSD removed it
recently, too. Their commit msg has some more info:

"IPX was a network transport protocol in Novell's NetWare network
 operating system from late 80s and then 90s. The NetWare itself
 switched to TCP/IP as default transport in 1998. Later, in this
 century the Novell Open Enterprise Server became successor of
 Novell NetWare. The last release that claimed to still support
 IPX was OES 2 in 2007. Routing equipment vendors (e.g. Cisco)
 discontinued support for IPX in 2011."

The commit removes support for NCP (NetWare Core Protocol) and
NWFS (NetWare File System) along with it (both gone from FreeBSD
too since a while).

4 years agoroute.8: Remove NS remains.
Sascha Wildner [Sun, 20 Apr 2014 12:04:41 +0000 (14:04 +0200)]
route.8: Remove NS remains.

4 years agoRemove some XEROX Network Systems (NS) protocol remains.
Sascha Wildner [Sun, 20 Apr 2014 11:43:15 +0000 (13:43 +0200)]
Remove some XEROX Network Systems (NS) protocol remains.

We removed most of it in 2011 (62b5ec1d702a90f4c4f06347b3ad258a29ff8929).

4 years agohammer2 - more dmsg/separation work, add nmasters field to inode
Matthew Dillon [Sun, 20 Apr 2014 03:56:14 +0000 (20:56 -0700)]
hammer2 - more dmsg/separation work, add nmasters field to inode

* More separation and stability work

* Remove unused HAMMER2_OPFLAG_SUPROOT (the super-root can be
  distinguished by pfs_type).

* Add pfs_nmasters field to the inode structure.  This will be
  used to record how many hard masters a PFS has so the
  cluster code can determine the status of the cluster.

4 years agodmsg, hammer2 - refactor remove hammer2-specific code
Matthew Dillon [Sun, 20 Apr 2014 03:55:28 +0000 (20:55 -0700)]
dmsg, hammer2 - refactor remove hammer2-specific code

* More cleanups in libdmsg and various hammer2 utilities

* Stability pass, get the hammer2 service demon working again.

4 years agohammer2 - Revise newfs_hammer2
Matthew Dillon [Sun, 20 Apr 2014 00:56:57 +0000 (17:56 -0700)]
hammer2 - Revise newfs_hammer2

* Bring newfs_hammer2 up-to-date with the cluster mechanics I intend to use
  for the filesytem.

  Generally change the default label from "ROOT" to "LOCAL", the intention
  being that all formatted volumes will at least mount device@LOCAL in order
  to make a HAMMER2 volume available to the cluster protocol.  Once the
  volume is made available, the intension is to then allow other PFSs can
  be created/deleted/managed via the cluster protocol.

  newfs_hammer2 will also create a BOOT and ROOT PFS by default, intended for
  simple non-clustered configurations, and the -L label option works
  differently now.

* Generally speaking, all block devices to be used in the cluster must be
  formatted with newfs_hammer2.  A formatted HAMMER2 volume can be used to
  host any number of PFSs (Pseudo-FileSystems).  Each PFS is independent
  and can be part of different clusters.

4 years agokernel: fix buildkernel by adding include to subr_diskiocom.c
Markus Pfeiffer [Sat, 19 Apr 2014 20:52:42 +0000 (21:52 +0100)]
kernel: fix buildkernel by adding include to subr_diskiocom.c

Include vfs/hammer2/hammer2_disk.h to sys/kern/subr_diskiocom.c

4 years agohammer2 - refactor libdmsg volume configuration
Matthew Dillon [Sat, 19 Apr 2014 19:55:21 +0000 (12:55 -0700)]
hammer2 - refactor libdmsg volume configuration

* Move the libdmsg volume configuration structures and commands, which
  are hammer2-specific, over to hammer2.

4 years agolibdmsg - refactor remove hammer2-specific code
Matthew Dillon [Sat, 19 Apr 2014 19:52:38 +0000 (12:52 -0700)]
libdmsg - refactor remove hammer2-specific code

* Remove hammer2-specific code.

* Refactor the callback API to allow the hammer service code to handle
  the H2-specific LNK_CONN commands... mostly VOLCONF.

4 years agoExclude libdmsg temporarily from the build until it is fixed.
Sascha Wildner [Sat, 19 Apr 2014 17:58:44 +0000 (19:58 +0200)]
Exclude libdmsg temporarily from the build until it is fixed.

Requested-by: dillon
4 years agonetinet/in - Fix yet another NULL pointer panic.
Antonio Huete Jimenez [Tue, 15 Apr 2014 14:20:16 +0000 (16:20 +0200)]
netinet/in - Fix yet another NULL pointer panic.

DragonFly-bug: <http://bugs.dragonflybsd.org/issues/2662>
Submitted-by: Vasily Postnicov
This commit closes #2662

4 years agopasswd(1): Allow password changes for PAM users
François Tigeot [Sat, 19 Apr 2014 08:32:03 +0000 (10:32 +0200)]
passwd(1): Allow password changes for PAM users

* passwd(1) previously only allowed changes for local or NIS users, which
  doesn't make sense

* Fixes FreeBSD PR bin/59638

* Tested with a DragonFly (password change) and a Debian system (login)

4 years agohammer2 - Shift dmsg structures around
Matthew Dillon [Sat, 19 Apr 2014 00:37:12 +0000 (17:37 -0700)]
hammer2 - Shift dmsg structures around

* Shift dmsg structures around so sys/dmsg.h does not contain hammer2-specific
  structures.  Move those structures to hammer2_disk.h

4 years agourtwn.4: Fix synopsis (usb4bsd -> usb).
Sascha Wildner [Thu, 17 Apr 2014 13:21:31 +0000 (15:21 +0200)]
urtwn.4: Fix synopsis (usb4bsd -> usb).

4 years agoDynamic root: Add "/lib" to gold and ld linker search paths
John Marino [Thu, 17 Apr 2014 07:06:17 +0000 (09:06 +0200)]
Dynamic root: Add "/lib" to gold and ld linker search paths

This fixes numerous new dports failures seen during linking.

4 years agomount{,d}(8): Use the pidfile(3) API for handling mountd's PID file.
Sascha Wildner [Wed, 16 Apr 2014 17:40:07 +0000 (19:40 +0200)]
mount{,d}(8): Use the pidfile(3) API for handling mountd's PID file.

Taken-from: FreeBSD

4 years agolibthread_xu - Clean up the red zone on library unload
Matthew Dillon [Wed, 16 Apr 2014 17:01:14 +0000 (10:01 -0700)]
libthread_xu - Clean up the red zone on library unload

* If the main program is not linked against -pthread but dynamically
  loads a shared library that is via dlopen(), then dlclose()'s it,
  libthread_xu leaves red-zone and cached thread stacks dangling.

  The second attempt to (indirectly) load libthread_xu then fails with a
  red-zone panic.

* Add a destructor for libthread_xu to unmap the red-zone and to clean out
  any cached thread stacks.

* Note that neither libthread_xu nor most other large libraries are designed
  to be unloaded.  That is, even if loading/unloading works, numerous libraries
  will almost certainly leak memory.  This change prevents the fatal error but
  doesn't fix the general memory leakage problem.

  IMHO Only libraries designed to be unloadable should be unloaded.

Reported-by: Vasily Postnicov <shamaz.mazum@gmail.com>
4 years agoFix a number of typos in messages and manual pages.
Sascha Wildner [Wed, 16 Apr 2014 16:34:59 +0000 (18:34 +0200)]
Fix a number of typos in messages and manual pages.

4 years agoinitrd: Fix installation during make release
François Tigeot [Wed, 16 Apr 2014 08:47:14 +0000 (10:47 +0200)]
initrd: Fix installation during make release

* mkinitrd needs to know ramdisk images are to be installed in
  ${DESTDIR}/boot/kernel and not just /boot/kernel

* ${DESTDIR}/boot/kernel also has to exist first. Create it with

4 years agoloader/acpi: Fix/remove some comments and remove a misleading error msg.
Sascha Wildner [Tue, 15 Apr 2014 20:10:29 +0000 (22:10 +0200)]
loader/acpi: Fix/remove some comments and remove a misleading error msg.

4 years agoacpi: machdep.acpi_root should have the RSDP, so taking that should be fine.
Sascha Wildner [Tue, 15 Apr 2014 20:07:27 +0000 (22:07 +0200)]
acpi: machdep.acpi_root should have the RSDP, so taking that should be fine.

4 years agokernel/acpi: In the OS dependent layer, sync the debug code w/ FreeBSD.
Sascha Wildner [Tue, 15 Apr 2014 19:28:49 +0000 (21:28 +0200)]
kernel/acpi: In the OS dependent layer, sync the debug code w/ FreeBSD.

* Remove an unused function.

* Enter the debugger only when ACPI_DEBUG is set.

* Fix indent and whitespace.

4 years agoinitrd: Not everyone keeps their source in /usr/src.
Sascha Wildner [Tue, 15 Apr 2014 19:24:05 +0000 (21:24 +0200)]
initrd: Not everyone keeps their source in /usr/src.

4 years agounits(1): Sync the manual page with FreeBSD too.
Sascha Wildner [Tue, 15 Apr 2014 16:53:57 +0000 (18:53 +0200)]
units(1): Sync the manual page with FreeBSD too.

While here, add back units.c's SVN ID.

4 years agoDynamic root: Remove old libraries from /usr/lib
François Tigeot [Tue, 15 Apr 2014 08:06:38 +0000 (10:06 +0200)]
Dynamic root: Remove old libraries from /usr/lib

4 years agoUpdate the pciconf(8) database.
Sascha Wildner [Tue, 15 Apr 2014 07:33:22 +0000 (09:33 +0200)]
Update the pciconf(8) database.

April 14, 2014 snapshot from http://pciids.sourceforge.net/

4 years agounits(1): bring in latest changes from FreeBSD
Eitan Adler [Mon, 14 Apr 2014 22:40:55 +0000 (15:40 -0700)]
units(1): bring in latest changes from FreeBSD

In the interest of further compatibility with GNU units this brings in:
: -U for units file
: -v for verbose
: -V for version
: libedit support
:  -f support for multiple files

And other additional improvements.

Note that this introduces a breaking change from prior: -V and -v have been swapped (and a new -v has been added).

4 years agoFix typo
YONETANI Tomokazu [Mon, 14 Apr 2014 21:51:29 +0000 (06:51 +0900)]
Fix typo

4 years agounits(1): update to the latest library from FreeBSD
Eitan Adler [Mon, 14 Apr 2014 20:58:32 +0000 (13:58 -0700)]
units(1): update to the latest library from FreeBSD

This brings some new units along with enhanced compatibility with GNU units(1).

4 years agokernel: Sync ACPICA with Intel's version 20140325.
Sascha Wildner [Mon, 14 Apr 2014 21:06:12 +0000 (23:06 +0200)]
kernel: Sync ACPICA with Intel's version 20140325.

As far as I can see, the most important change is a fix for the auto-
serialization of control methods so that the currently executing AML
SyncLevel is ignored when invoking such a method. This fixes an issue
seen in some systems showing AE_AML_MUTEX exceptions since 20140214
which had to set hw.acpi.auto_serialize_methods to 0 to work around
the issue.

This was actually reported for DragonFly by Andrey Oktyabrskiy (see

See sys/contrib/dev/acpica/changes.txt for a complete list of all

4 years agobuildsystem: Fix libfoo.so links for /lib libraries
François Tigeot [Mon, 14 Apr 2014 10:20:43 +0000 (12:20 +0200)]
buildsystem: Fix libfoo.so links for /lib libraries

* When installing to a non-default location by using DESTDIR on the make
  installworld command line, /usr/lib/libfoo.so links pointed to wrong

* DESTDIR is used both as an installworld parameter and internally by the
  build system and these two cases expect different behaviors

* Symlinks locations in /usr/obj must be relative to the host (builder)
  filesystem namespace
  libc.so -> /usr/obj/usr/src/world_x86_64/lib/libc.so

* Symlinks locations in the final destination directory must be relative to
  the target world filesystem namespace
  libc.so -> /lib/libc.so

* The symlinks themselves must be absolute in order to not break
  installations where /usr is a symlink

Inspired-by: FreeBSD's historical transition to /lib
4 years agoDynamic root: Move required libraries to /lib
François Tigeot [Sun, 13 Apr 2014 07:03:10 +0000 (09:03 +0200)]
Dynamic root: Move required libraries to /lib

* Add /lib to the standard run-time loader library search path

* Ensure libxxx.so symbolic links stay in /usr/lib, the build
  tools won't pick them up in /lib

4 years agoDynamic root: Build /bin and /sbin dynamically
François Tigeot [Sun, 13 Apr 2014 07:01:55 +0000 (09:01 +0200)]
Dynamic root: Build /bin and /sbin dynamically

* Introduce a NO_DYNAMICROOT variable for people wanting to keep
  fully static /bin and /sbin directories

* Keep building /sbin/init statically

* Keep a few other binaries static to avoid moving too many libraries
  to /lib and/or creating many symlinks.
  Those few binaries do not handle user names and thus don't need to be
  NSS aware/dynamically linked.

* In particular, keeping udevd static allow us to avoid moving libpthread
  and its associated links to libc_r or libthread_xu

4 years agoDynamic root: Move ld-elf.so.2 to /libexec
François Tigeot [Sat, 12 Apr 2014 06:41:54 +0000 (08:41 +0200)]
Dynamic root: Move ld-elf.so.2 to /libexec

* Install it first to avoid breaking upgrades for systems previously
  having it located in /usr/libexec. install(1), beeing a dynamic binary,
  needs it at runtime.

* Since ld-elf.so.2's path is embedded in ELF binaries, also create a
  symbolic link in the old location to support existing binaries.

* Code to handle chflags attributes obtained from FreeBSD.

4 years agoDynamic root: Create /lib and /libexec
François Tigeot [Sat, 12 Apr 2014 06:18:31 +0000 (08:18 +0200)]
Dynamic root: Create /lib and /libexec

Make the installer also install these directories