dragonfly.git
9 years agovirtio_pci: Use device_probe_and_attach(), instead of DEVICE_ATTACH().
Imre Vadasz [Sat, 22 Nov 2014 08:29:49 +0000 (09:29 +0100)]
virtio_pci: Use device_probe_and_attach(), instead of DEVICE_ATTACH().

* By directly calling DEVICE_ATTACH(), we didn't get automatically created
  sysctl nodes (added in 8e4d13764bdfc916c23fb22158c65e486dce631c), and
  we didn't get automatic dmesg messages on child driver attachement
  (e.g. "vtblk0: <VirtIO Block Adapter> on virtio_pci1") .

* Since we have no direct equivalent to FreeBSD's device_attach(), use
  device_probe_and_attach(). This means we do a vtpci_set_status() cycle
  even if no matching driver is found.

9 years agokernel - Add lock canceling features
Matthew Dillon [Sat, 22 Nov 2014 08:10:19 +0000 (00:10 -0800)]
kernel - Add lock canceling features

* The current (typically exclusive) lock holder can enable cancel mode
  by executing lockmgr(lk, LK_CANCEL_BEG, 0).  This call always succeeds.
  The lock state is not otherwise affected.

  Any current threads blocked on the lock or any future thread which
  attempts to gain the lock, who also specify the LK_CANCELABLE flag,
  will be canceled as long as cancel mode is active and their operation
  will return ENOLCK.

  NOTE! Threads which do not specify LK_CANCELABLE are not affected by
cancel mode and their blocking locks will block normally.

  WARNING!  Cancel mode is not stackable.  The system will panic if you
  enable cancel mode on a lock where it is already enabled.

* The current (typically exclusive) lock holder can terminate cancel mode
  by executing lockmgr(lk, LK_CANCEL_END, 0).  This call always succeeds.
  Once canceled, any other threads that would block on the lock and specify
  the LK_CANCELABLE flag will block normally and not be canceled.

  The current lock holder can also terminate cancel mode by simply releasing
  the last lock with LK_RELEASE.  That is, a release where the lock count
  returns to 0.

* Lock canceling is an optional feature.  Your lock cannot be canceled unless
  you specify LK_CANCELABLE.

9 years agokernel - Increase default MAXTSIZ from 128M to 256M
Matthew Dillon [Fri, 21 Nov 2014 02:13:10 +0000 (18:13 -0800)]
kernel - Increase default MAXTSIZ from 128M to 256M

* Increase the default max text size from 128m to 256m.  Note that this
  value can also be overridden in /boot/loader.conf via kern.maxtsiz.

* Currently only chrome compiled w/ full debugging has a text size
  which exceeds 128M.  The normally compiled chrome is hitting 93MB
  though so we might as well up the limit now.

9 years agoinstaller: Add an initial testing tool.
Antonio Huete Jimenez [Thu, 20 Nov 2014 21:33:33 +0000 (22:33 +0100)]
installer: Add an initial testing tool.

- It forks the backend and runs the frontend on the parent
  process so all runs in one go.
- The idea is to be able to test certain functions from the
  installer without the need to run the whole thing.
- This is just the initial stuff!

9 years agodhclient: Fix a busy loop
Markus Pfeiffer [Thu, 20 Nov 2014 19:55:32 +0000 (19:55 +0000)]
dhclient: Fix a busy loop

The ifi->linkstat variable seemed to be not updated after the poll
returns in dispatch.c. This might only be a hack, but it makes the
busylooping go away.

9 years agomsk.4: Document that MSI is turned off by default.
Sascha Wildner [Thu, 20 Nov 2014 19:09:34 +0000 (20:09 +0100)]
msk.4: Document that MSI is turned off by default.

9 years agosound/pcm - Attempt to fix 'play interrupt timeout, channel dead' error
Matthew Dillon [Thu, 20 Nov 2014 18:58:14 +0000 (10:58 -0800)]
sound/pcm - Attempt to fix 'play interrupt timeout, channel dead' error

* Fix the timeout calculation to properly calculate the buffering
  timeout.

* Adjusted code taken from bug 2067 submission.

PR: 2067

9 years agocarp: ctlinput method only processes PRC_IFDOWN and PRC_IFUP
Sepherosa Ziehau [Thu, 20 Nov 2014 05:53:28 +0000 (13:53 +0800)]
carp: ctlinput method only processes PRC_IFDOWN and PRC_IFUP

9 years agokernel - Improve slab cleanup performance
Matthew Dillon [Wed, 19 Nov 2014 19:55:46 +0000 (11:55 -0800)]
kernel - Improve slab cleanup performance

* Convert ZoneAry[], FreeZones, and FreeOVZones from singly linked lists
  to doubly linked LISTs.  SLZone structure changes size but globaldata
  should stay the same.

* Primarily affects slab_cleanup() which appears to be able to eat
  an excessive amount of cpu on monster (systems with large amounts
  of memory), and may fix a spin lock timeout panic.

* We may need some more work to moderate the amount of time slab_cleanup()
  takes.

9 years agotools - A bunch of bugfixes for hammer-backup.sh
Antonio Huete Jimenez [Wed, 19 Nov 2014 16:05:15 +0000 (17:05 +0100)]
tools - A bunch of bugfixes for hammer-backup.sh

  - Fix a problem when trying to backup / PFS
  - Return errors on checksum failure. This can be used by other
    scripts to verify the files are not corrupt.
  - Force absolute paths to specify which PFS to backup
  - Fix a problem with incremental non-compressed backups
  - Set a memory limit to xz to avoid massive memory usage

9 years agotop: fix per status process count reporting
Joris Giovannangeli [Wed, 19 Nov 2014 11:41:32 +0000 (12:41 +0100)]
top: fix per status process count reporting

9 years agoFWIW, bring in FreeBSD's rgephy(4) manual page.
Sascha Wildner [Tue, 18 Nov 2014 22:46:42 +0000 (23:46 +0100)]
FWIW, bring in FreeBSD's rgephy(4) manual page.

flag0 support has been commented out since I could not find it in our
code.

9 years agosvc.8: Fix a number of references to other manual pages.
Sascha Wildner [Tue, 18 Nov 2014 22:38:01 +0000 (23:38 +0100)]
svc.8: Fix a number of references to other manual pages.

9 years agousbdi.9: Some small fixes.
Sascha Wildner [Tue, 18 Nov 2014 22:33:00 +0000 (23:33 +0100)]
usbdi.9: Some small fixes.

9 years agocpuctl.4: Some small fixes.
Sascha Wildner [Tue, 18 Nov 2014 22:30:17 +0000 (23:30 +0100)]
cpuctl.4: Some small fixes.

9 years agohammer - Better trailing '/' handling on PFS paths
Antonio Huete Jimenez [Tue, 18 Nov 2014 13:15:49 +0000 (14:15 +0100)]
hammer - Better trailing '/' handling on PFS paths

- Remove all trailing slashes from PFS paths to make sure
  there are no problems when performing operations on them.

9 years agovn_lock.9: Capitalize .Dt
Sascha Wildner [Tue, 18 Nov 2014 22:23:52 +0000 (23:23 +0100)]
vn_lock.9: Capitalize .Dt

9 years agocpuctl: Fix path in 'files'.
Sascha Wildner [Tue, 18 Nov 2014 21:38:11 +0000 (22:38 +0100)]
cpuctl: Fix path in 'files'.

9 years agodrm: Use lockmgr locks with Linux wait queues
François Tigeot [Tue, 18 Nov 2014 21:18:03 +0000 (22:18 +0100)]
drm: Use lockmgr locks with Linux wait queues

* On Linux, it is possible to grab a second spinlock in an already
  spinlock-protected code section.

* The wait_event() macro is used in such a situation in the i915 driver.
  One of the event checks itself tries to grab a second lock. What's more,
  this second lock is a lockmgr lock in the DragonFly kernel. This results
  in the following situation:

    spinlock
    lockmgr LK_EXCLUSIVE
    spinunlock

* Unfortunately if the lockmgr lock can't be acquired, the thread is put
  to sleep and a thread sleeping with a spinlock held leads to a general
  system freeze or a kernel panic.

* For that reason, we can't use a spinlock in Linux wait queues. Change
  the internal wait_queue_head_t lock to a lockmgr lock.

Thanks go to Imre Vadász for spotting this horrible issue.

9 years agoImport cpuctl pseudo device from FreeBSD
Joris Giovannangeli [Tue, 18 Nov 2014 20:49:21 +0000 (21:49 +0100)]
Import cpuctl pseudo device from FreeBSD

The cpuctl pseudo device allows to perform cpu microcode updates.

9 years agoloader: Fix XHCI description in help.common
Thomas Nikolajsen [Tue, 18 Nov 2014 21:06:22 +0000 (22:06 +0100)]
loader: Fix XHCI description in help.common

9 years agoloader: Fix typos in help.common
Thomas Nikolajsen [Tue, 18 Nov 2014 19:46:14 +0000 (20:46 +0100)]
loader: Fix typos in help.common

- ahci(4) doesn't use .0 for disable hint
- fix slice name in example

9 years agodrm: Make wait_event_interruptible interruptible and fix its return value.
Imre Vadasz [Sat, 15 Nov 2014 15:59:06 +0000 (16:59 +0100)]
drm: Make wait_event_interruptible interruptible and fix its return value.

* __wait_event_common now works like wait_event_interruptible_timeout does
  in Linux.

* wait_event_interruptible uses different return values than the other
  wait_event variants.

* translate -ERESTARTSYS to -EINTR in two obvious places in radeon_gem.c,
  before returning from an ioctl handler.

9 years agoVOP_OPENCLOSE.9: Fix a reference.
Sascha Wildner [Tue, 18 Nov 2014 11:53:37 +0000 (12:53 +0100)]
VOP_OPENCLOSE.9: Fix a reference.

9 years agovn_lock.9: Some small cleanup.
Sascha Wildner [Tue, 18 Nov 2014 11:53:00 +0000 (12:53 +0100)]
vn_lock.9: Some small cleanup.

9 years agoudp: Minor udp_ctlinput cleanup
Sepherosa Ziehau [Tue, 18 Nov 2014 07:07:06 +0000 (15:07 +0800)]
udp: Minor udp_ctlinput cleanup

9 years agotcp: Minor tcp_ctlinput cleanup
Sepherosa Ziehau [Tue, 18 Nov 2014 06:58:31 +0000 (14:58 +0800)]
tcp: Minor tcp_ctlinput cleanup

- Remove unnecessary crit section
- Const-fy

9 years agotcp: Discard non-error cmd after PRC_IS_REDIRECT(cmd) test
Sepherosa Ziehau [Tue, 18 Nov 2014 06:27:37 +0000 (14:27 +0800)]
tcp: Discard non-error cmd after PRC_IS_REDIRECT(cmd) test

Original code actually ignores all ICMP redirects.

9 years agoman9: Fix Makefile sorting.
Sascha Wildner [Mon, 17 Nov 2014 23:42:19 +0000 (00:42 +0100)]
man9: Fix Makefile sorting.

9 years agomanpages: Forgot to hook vn_lock.9 into the build.
Antonio Huete Jimenez [Mon, 17 Nov 2014 22:23:59 +0000 (23:23 +0100)]
manpages: Forgot to hook vn_lock.9 into the build.

9 years agomanpages: Add an updated version of vn_lock.9
Antonio Huete Jimenez [Mon, 17 Nov 2014 22:17:03 +0000 (23:17 +0100)]
manpages: Add an updated version of vn_lock.9

9 years agomanpages: VFS Compat API manpage update.
Antonio Huete Jimenez [Sat, 15 Nov 2014 17:33:28 +0000 (18:33 +0100)]
manpages: VFS Compat API manpage update.

- Reflect a bit better what's on the current codebase with
  regards to the old VFS API, which is still in use for many
  filesystems.
- Pseudocode present on the old API manpages has been removed.

In-discussion with: swildner

9 years agorcrun(8): Add rcstatus command to show the status of a rc script
Robin Hahling [Mon, 17 Nov 2014 15:53:22 +0000 (16:53 +0100)]
rcrun(8): Add rcstatus command to show the status of a rc script

* Add rcrun status, and its shortcut rcstatus, to show the status of a
  rc script.
* Update rcrun(8) manual page entry to reflect the change.

9 years agocamcontrol(8): update usage() for the new 'devlist -b' flag
Robin Hahling [Mon, 17 Nov 2014 07:14:42 +0000 (08:14 +0100)]
camcontrol(8): update usage() for the new 'devlist -b' flag

9 years agoicmp: Don't convert saved ip header's length into host byte order
Sepherosa Ziehau [Mon, 17 Nov 2014 06:42:39 +0000 (14:42 +0800)]
icmp: Don't convert saved ip header's length into host byte order

No kernel code depends on this and it actually whacks the icmp header
passed to userland through SOCK_RAW socket.  ICMP redirect processing
does not need fix (it does not do the convertion).

9 years agoicmp: Fix wrong icmp header cast
Sepherosa Ziehau [Mon, 17 Nov 2014 06:22:33 +0000 (14:22 +0800)]
icmp: Fix wrong icmp header cast

This was introduced by efa391c40c414e7071b2041f1888180deb1806b9

9 years agorc.subr: Add required_modules processing.
Peter Avalos [Sun, 31 Aug 2014 14:33:15 +0000 (07:33 -0700)]
rc.subr: Add required_modules processing.

This will kldload appropriate modules, needed by some dports (e.g.
openvpn).

Obtained-from:   FreeBSD

9 years agoicmp: Use inet_ntop() to log ip addresses
Sepherosa Ziehau [Mon, 17 Nov 2014 01:38:17 +0000 (09:38 +0800)]
icmp: Use inet_ntop() to log ip addresses

9 years agoproto: ctlinput is a pr method; not a pru method
Sepherosa Ziehau [Mon, 17 Nov 2014 00:52:52 +0000 (08:52 +0800)]
proto: ctlinput is a pr method; not a pru method

9 years agodrm: Use the ERESTARTSYS error code
François Tigeot [Sun, 16 Nov 2014 22:14:17 +0000 (23:14 +0100)]
drm: Use the ERESTARTSYS error code

* Linux kernel functions can return -ERESTARTSYS in some cases, a
  negative value indicating an error (typically -512)

* Howewer, ERESTARTSYS was previously as ERESTART, itself defined
  as -1 in *BSD kernels

* The -ERESTARTSYS return value thus was positive on the DragonFly
  kernel, potentially breaking various drm error checks.

* Fix this issue by defining ERESTARTSYS separately

Thanks-to: Imre Vadasz for discovering the original problem

9 years agodrm: Add linux/mm.h
François Tigeot [Sun, 16 Nov 2014 21:20:18 +0000 (22:20 +0100)]
drm: Add linux/mm.h

Obtained-from: FreeBSD's OFED framework

9 years agocamcontrol(8): Add '-b' flag to 'camcontrol devlist'
Robin Hahling [Sun, 16 Nov 2014 21:04:15 +0000 (22:04 +0100)]
camcontrol(8): Add '-b' flag to 'camcontrol devlist'

This prints only the existing buses and their parent sims, useful for
creating a sim->bus->device map.

Taken-from: FreeBSD

9 years agopatch(1): Add dry-run alias for compatibility with other implementations
Robin Hahling [Sun, 16 Nov 2014 19:11:36 +0000 (20:11 +0100)]
patch(1): Add dry-run alias for compatibility with other implementations

Other implementations of patch(1), including GNU patch, "svn patch" and
FreeBSD patch have a --dry-run option which does the same as our -C or
--check option.

Add --dry-run alias to increase compatibility.

Taken-from: FreeBSD

9 years agodrm/radeon: Replace some custom code by Linux wait queues
François Tigeot [Sun, 16 Nov 2014 17:29:44 +0000 (18:29 +0100)]
drm/radeon: Replace some custom code by Linux wait queues

9 years agodrm/ttm: Fix ttm_bo_wait_unreserved()
François Tigeot [Sun, 16 Nov 2014 17:09:45 +0000 (18:09 +0100)]
drm/ttm: Fix ttm_bo_wait_unreserved()

By using the wait event API and code from Linux 3.8.13

The old implementation of this function had a tendency to wrongly
go to an uninterruptible sleep state.

9 years agosysctl: Give each device its own context and subtree
François Tigeot [Sun, 16 Nov 2014 11:35:45 +0000 (12:35 +0100)]
sysctl: Give each device its own context and subtree

* Add device_get_sysctl_ctx() and device_get_sysctl_tree() functions

* All devices now have an associated sysctl tree under the "dev" root

Obtained-from: FreeBSD

9 years agonewsyslog(8): use the size of the file instead of the blocks...
Robin Hahling [Sun, 16 Nov 2014 10:13:01 +0000 (11:13 +0100)]
newsyslog(8): use the size of the file instead of the blocks...

... it takes on disk, as advertised in newsyslog.conf(5).

Taken-from: FreeBSD

9 years agodrm: Change sruct drm_local_map
François Tigeot [Sat, 15 Nov 2014 10:13:08 +0000 (11:13 +0100)]
drm: Change sruct drm_local_map

Make it identical to the version from Linux 3.8.13.

9 years agoicmp: Use inet_ntop() instead of inet_ntoa()
Sepherosa Ziehau [Sun, 16 Nov 2014 08:32:19 +0000 (16:32 +0800)]
icmp: Use inet_ntop() instead of inet_ntoa()

9 years agobuild: Add ICMPPRINTFS as global option
Sepherosa Ziehau [Sun, 16 Nov 2014 07:56:01 +0000 (15:56 +0800)]
build: Add ICMPPRINTFS as global option

9 years agolibkern: Add inet_ntop()
Sepherosa Ziehau [Sun, 16 Nov 2014 06:33:42 +0000 (14:33 +0800)]
libkern: Add inet_ntop()

Taken-from: FreeBSD r213103

9 years agoicmp: Utilize in_cksum_skip()
Sepherosa Ziehau [Sun, 16 Nov 2014 05:55:13 +0000 (13:55 +0800)]
icmp: Utilize in_cksum_skip()

This avoids unnecessary m_data and m_len adjustment before and after
in_cksum().

9 years agoincsum: Const-fy mbuf parameter
Sepherosa Ziehau [Sun, 16 Nov 2014 05:40:01 +0000 (13:40 +0800)]
incsum: Const-fy mbuf parameter

9 years agouipc: Remove never used last pr entry of localdomain
Sepherosa Ziehau [Sun, 16 Nov 2014 04:08:54 +0000 (12:08 +0800)]
uipc: Remove never used last pr entry of localdomain

9 years agokernel/netgraph7: Port the kernel part of the netgraph7 bluetooth stack.
Sascha Wildner [Sat, 15 Nov 2014 22:31:48 +0000 (23:31 +0100)]
kernel/netgraph7: Port the kernel part of the netgraph7 bluetooth stack.

It still needs more testing/debugging, along with the userland part.

In-discussion-with: nant

9 years agodrm: Rename drm_os_freebsd.h to drm_os_linux.h
François Tigeot [Sat, 15 Nov 2014 20:23:12 +0000 (21:23 +0100)]
drm: Rename drm_os_freebsd.h to drm_os_linux.h

Move DRM_READ() and DRM_WRITE() macros to the new file

9 years agodate(1): Add "-R" flag to use RFC 2822 date and time output format
Robin Hahling [Sat, 15 Nov 2014 18:57:37 +0000 (19:57 +0100)]
date(1): Add "-R" flag to use RFC 2822 date and time output format

As stated in the man page, this is equivalent to use
"%a, %d %b %Y %T %z" as the output format while LC_TIME is set to the
"C" locale.

This is compatible with date(1) from the GNU core utilities.

Taken-from: FreeBSD

While here, remove $DragonFly$ line from man page.

9 years agodrm: linux/io.h is really asm/io.h, rename it
François Tigeot [Sat, 15 Nov 2014 17:46:18 +0000 (18:46 +0100)]
drm: linux/io.h is really asm/io.h, rename it

While there, also add ioremap() and ioremap_wc() to the new file

9 years agokernel/usb4bsd: Bring in the axge(4) ethernet driver.
Sascha Wildner [Sat, 15 Nov 2014 16:50:05 +0000 (17:50 +0100)]
kernel/usb4bsd: Bring in the axge(4) ethernet driver.

It supports USB Gigabit Ethernet adapters based on the
ASIX Electronics AX88179 USB 3.0 and AX88178A USB 2.0
chipsets.

Taken-from: FreeBSD

9 years agokernel: Add snd_uaudio(4) to LINT.
Sascha Wildner [Sat, 15 Nov 2014 12:51:20 +0000 (13:51 +0100)]
kernel: Add snd_uaudio(4) to LINT.

9 years agokernel: Refer to it as "ACPICA", not "ACPI CA" or "ACPI-CA".
Sascha Wildner [Sat, 15 Nov 2014 12:07:52 +0000 (13:07 +0100)]
kernel: Refer to it as "ACPICA", not "ACPI CA" or "ACPI-CA".

9 years agoUpdate the pciconf(8) database.
Sascha Wildner [Sat, 15 Nov 2014 11:06:49 +0000 (12:06 +0100)]
Update the pciconf(8) database.

November 11, 2014 snapshot from http://pciids.sourceforge.net/

9 years agokernel/ndis - Fix flag usage in a macro.
Antonio Huete Jimenez [Fri, 14 Nov 2014 22:26:06 +0000 (23:26 +0100)]
kernel/ndis - Fix flag usage in a macro.

- For identifying system processes, Use P_SYSTEM for
  AT_PASSIVE_LEVEL() macro.

9 years agokernel - Rename unused flag.
Antonio Huete Jimenez [Fri, 14 Nov 2014 22:17:40 +0000 (23:17 +0100)]
kernel - Rename unused flag.

- This flag used to identify whether a process was a system one.
  Currently, we can use P_SYSTEM flag for that.

9 years agopkill - Fix a problem identifying system threads.
Antonio Huete Jimenez [Fri, 14 Nov 2014 21:51:52 +0000 (22:51 +0100)]
pkill - Fix a problem identifying system threads.

- As of commit 65a0e3d68b951f39cc39be7808e11e9de908d9fc the test to
  check whether a process is a system one or not was replaced by a
  wrong one. Restore that behaviour so that they are excluded by pkill(1).

9 years agoprocctl.2: Some cleanup.
Sascha Wildner [Fri, 14 Nov 2014 11:51:10 +0000 (12:51 +0100)]
procctl.2: Some cleanup.

9 years agoprocctl: Remove a header file that was renamed with 'make upgrade'.
Sascha Wildner [Fri, 14 Nov 2014 11:51:02 +0000 (12:51 +0100)]
procctl: Remove a header file that was renamed with 'make upgrade'.

9 years agoSync ACPICA with Intel's version 20141107.
Sascha Wildner [Thu, 13 Nov 2014 20:05:10 +0000 (21:05 +0100)]
Sync ACPICA with Intel's version 20141107.

* Support ASL+, which is an extension to ASL supporting C-style operators
  and expressions.

  Legacy ASL:
        If (LOr (LOr (LEqual (And (R510, 0x03FB), 0x02E0), LEqual (
            And (R520, 0x03FB), 0x02E0)), LOr (LEqual (And (R530, 0x03FB),
            0x02E0), LEqual (And (R540, 0x03FB), 0x02E0))))
        {
    ...
}

  ASL+:
        If (((R510 & 0x03FB) == 0x02E0) ||
            ((R520 & 0x03FB) == 0x02E0) ||
            ((R530 & 0x03FB) == 0x02E0) ||
            ((R540 & 0x03FB) == 0x02E0))
        {
    ...
}

* Updates of the GPIO operation region handler interface.

* Various other changes.

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

9 years agokernel/acpica: Restrict 'options ACPI_DEBUG' to printing debug output.
Sascha Wildner [Thu, 13 Nov 2014 19:58:18 +0000 (20:58 +0100)]
kernel/acpica: Restrict 'options ACPI_DEBUG' to printing debug output.

For now, stop compiling the debugger/disassembler into the kernel when
ACPI_DEBUG is in the config. It seems they are really only meant for
userland and getting them to compile for the kernel isn't easily
possible with newer ACPI releases (starting with 20140926).

Also, our ACPI module build wasn't set up properly for calling them
from DDB anyway.

The code is just commented out and it might all get fixed at a later
point in time.

9 years agoboot/loader: Autoload XHCI support (xhci.ko).
Sascha Wildner [Wed, 12 Nov 2014 21:39:47 +0000 (22:39 +0100)]
boot/loader: Autoload XHCI support (xhci.ko).

This should help with issues people were having when trying to
boot a DragonFly USB IMG from a thumb drive plugged into a
USB 3 port.

9 years agonrelease/rconfig: Remove some usbd(8) remains.
Sascha Wildner [Wed, 12 Nov 2014 21:36:44 +0000 (22:36 +0100)]
nrelease/rconfig: Remove some usbd(8) remains.

9 years agoSync zoneinfo database with tzdata2014j from ftp://ftp.iana.org/tz/releases
Sascha Wildner [Wed, 12 Nov 2014 20:20:21 +0000 (21:20 +0100)]
Sync zoneinfo database with tzdata2014j from ftp://ftp.iana.org/tz/releases

* Turks & Caicos' switch from US eastern time to UTC-4 year-round
    did not occur on 2014-11-02 at 02:00.  It's currently scheduled
    for 2015-11-01 at 02:00.  (Thanks to Chris Walton.)

* Many corrections to pre-1989 time stamps of Asia/Seoul and
    Asia/Pyongyang.

* Change various zones into links where they differ only in pre-1970
    time stamps.

* Miscenallenous commentary adjustments.

9 years agosvc - Implement -g, -G -u, -j, -c, -m
Matthew Dillon [Wed, 12 Nov 2014 02:54:43 +0000 (18:54 -0800)]
svc - Implement -g, -G -u, -j, -c, -m

* Implement the gid, group-list, uid, jail, and chroot specifications.

* Reformulate the jail and chroot a bit.  Remove -J and -C and instead
  introduce -m to request that svc mount devfs in a jail or chroot.

* Adjust the exit sequencing and update the manual page.

9 years agojls - Fix seg-fault and formatting
Matthew Dillon [Wed, 12 Nov 2014 02:24:08 +0000 (18:24 -0800)]
jls - Fix seg-fault and formatting

* Fix seg-fault when no IPs are configured for a jail.

* Improve formatting, increase path to 15 characters.

9 years agosvc - Implement more features
Matthew Dillon [Wed, 12 Nov 2014 00:33:24 +0000 (16:33 -0800)]
svc - Implement more features

* All stdout/stderr output now goes to a pipe and a pipe buffering thread
  to read it into a circular buffer as well as write it to the log file.

  The program is now able to retain ~8KB worth of output in its circular
  buffer whether there is a log file attached to the service or not.

* When /dev/null is specified as the log file, short-cut the descriptor to -1
  instead of actually writing to /dev/null.

* log, logf, and tailf directives now work.

* Properly escape '.' on a line by itself for all buffered data dumped
  over a remote link (allowing logs to contain our command response
  terminator).

* Implement -f (foreground option) and clean-up descriptor initialization.

* Implement -s (sync on exit)

9 years agomiibus.4: Sync the list of miibus users with what we have.
Sascha Wildner [Tue, 11 Nov 2014 20:25:17 +0000 (21:25 +0100)]
miibus.4: Sync the list of miibus users with what we have.

9 years agokernel/usb4bsd: Remove an unused malloc type.
Sascha Wildner [Tue, 11 Nov 2014 19:45:16 +0000 (20:45 +0100)]
kernel/usb4bsd: Remove an unused malloc type.

It looks like old remains.

9 years agokernel - Add reapctl() system call for managing sub-processes (5) -> procctl
Matthew Dillon [Tue, 11 Nov 2014 19:17:01 +0000 (11:17 -0800)]
kernel - Add reapctl() system call for managing sub-processes (5) -> procctl

* Last commit was incomplete.  reaper_get() must be used to obtain
  the reaper in the RFNOWAIT case.

9 years agosvc - bug fixes
Matthew Dillon [Tue, 11 Nov 2014 19:04:52 +0000 (11:04 -0800)]
svc - bug fixes

* Setup our reaper before doing the initial start, otherwise we won't
  see sub-processes.

* Fix a bug in the label match code.

* Adjust debugging and fflush()s.

9 years agokernel - Add reapctl() system call for managing sub-processes (4) -> procctl
Matthew Dillon [Tue, 11 Nov 2014 18:49:10 +0000 (10:49 -0800)]
kernel - Add reapctl() system call for managing sub-processes (4) -> procctl

* Reparent to the correct reaper in the fork/RFNOWAIT case.

9 years agolibc/setjump: Align stack at 16-bytes before function call
John Marino [Tue, 11 Nov 2014 12:58:14 +0000 (13:58 +0100)]
libc/setjump: Align stack at 16-bytes before function call

This is required by amd64 ABI.  Comments were added where stack was
"accidentally" properly aligned.  The problem manifested on with a
bus error when built by clang.

While here, preserve the floating float exceptions flags.  Per POSIX,
siglongjump() shall be equivalent to longjump() except that it must
match sigsetjump() instead of setjump() and except for the effect on the
signal mask.  Therefore it should preserve the FP exception flags.

Also add the GNU-stack notes, all libc object files are supposed to have
them (although I am pretty sure they don't).

Taken from:
FreeBSD svn 217106 (7 Jan 2011)
FreeBSD svn 227023 (2 Nov 2011)
FreeBSD svn 267307 (9 Jun 2014)

9 years agosvc - misc improvements
Matthew Dillon [Tue, 11 Nov 2014 07:47:47 +0000 (23:47 -0800)]
svc - misc improvements

* Disallow extremely dangerous command sequences like 'svc exit' without
  a label (which would wildcard everything).

* Allow the label to be specified as 'all' for when you really want to
  operate on everything with a dangerous command.

* Clean up the socket and pid files on normal exit/kill, even if the
  service is not present.

* Add 'help' directive and -h option to cover our bases.

9 years agosvc - Initial commit, preliminary service manager
Matthew Dillon [Tue, 11 Nov 2014 06:54:42 +0000 (22:54 -0800)]
svc - Initial commit, preliminary service manager

* This is a preliminary service manager frontend and demon.
  It is not yet ready for prime-time (lots of support bits
  are missing).

* The main premise of this program is to be able to create
  and manage services in a more robust fashion, obtain status,
  log recent output or all output, and so forth.

  Among the many features, this program uses the new REAPER support
  to ensure that all processes related to the service can be accounted
  for.

* Includes a comprehensive manual page that lists all target features
  (many of which are not yet implemented as of this commit).

9 years agokernel - Add reapctl() system call for managing sub-processes (3) -> procctl()
Matthew Dillon [Tue, 11 Nov 2014 06:37:47 +0000 (22:37 -0800)]
kernel - Add reapctl() system call for managing sub-processes (3) -> procctl()

* After discussions, rename reapctl() -> procctl() and adjust
  the API to be compatible with FreeBSD.

* bapt will implement the same exact feature in FreeBSD via procctl().

9 years agokernel: Remove two more oldusb remains.
Sascha Wildner [Mon, 10 Nov 2014 11:08:25 +0000 (12:08 +0100)]
kernel: Remove two more oldusb remains.

9 years agoRemove the old USB stack and related userland, etc.
Sascha Wildner [Mon, 10 Nov 2014 10:49:03 +0000 (11:49 +0100)]
Remove the old USB stack and related userland, etc.

As detailed in UPDATING, users with a custom configuration file which
was derived from a *GENERIC file before we made usb4bsd default (this
happened in 3.6) might need to remove or comment out a couple of
devices which are now unknown.

9 years agonet/if_clone: Panic if the same cloner is attached twice
Markus Pfeiffer [Mon, 10 Nov 2014 10:21:46 +0000 (10:21 +0000)]
net/if_clone: Panic if the same cloner is attached twice

if_clone_attach used to allow attaching the same cloner twice,
which then lead to infinite loops when trying to create
a clone with an invalid name.
This patch adds a check whether the cloner is already
attached, and if so, panics.

9 years agotruephy: Clean up some leftover debug kprintf
Markus Pfeiffer [Mon, 10 Nov 2014 10:31:15 +0000 (10:31 +0000)]
truephy: Clean up some leftover debug kprintf

9 years agousb4bsd: Add FreeBSD revisions to files
Markus Pfeiffer [Mon, 10 Nov 2014 09:30:24 +0000 (09:30 +0000)]
usb4bsd: Add FreeBSD revisions to files

9 years agokernel - Add reapctl() system call for managing sub-processes (2)
Matthew Dillon [Mon, 10 Nov 2014 04:10:37 +0000 (20:10 -0800)]
kernel - Add reapctl() system call for managing sub-processes (2)

* subtract 1 from refs returned in status, so they roughly match the
  number of processes which are direct children of the caller.

* Load udata.status.pid_head even if we have not acquired reaping control.
  This can be useful information either way.

9 years agokernel - Add reapctl() system call for managing sub-processes
Matthew Dillon [Mon, 10 Nov 2014 04:03:02 +0000 (20:03 -0800)]
kernel - Add reapctl() system call for managing sub-processes

* Add reapctl().  This system call allows the current process to become
  the designated reaper for all sub-processes that are directly or indirectly
  forked under it, even if they detach.

  Instead of reparenting to init, related sub-processes will reparent to
  up the tree to the nearest process with reaping management enabled.

* The system call can be run by any user.  Multiple processes in the
  running topology can be reap masters for the processes under them,
  include sub-processes being reap-masters for processes under them,
  recursively.

* The system call provides an easy way to ensure that all processes under
  the current process, when it is a reap master, to be killed.  The first
  child pid under management can be queried, killed, waited upon, and the
  service monitor then simply loops until no children remain.

  Normally this information might not be available or require a 'ps' style
  (expensive) run to obtain.  This way it can be done trivially and
  dependably via reapctl().

9 years agousb4bsd: Fix SRCS sorting.
Sascha Wildner [Mon, 10 Nov 2014 00:43:20 +0000 (01:43 +0100)]
usb4bsd: Fix SRCS sorting.

9 years agousb4bsd: Add usb_pf.c to the module Makefile too.
Sascha Wildner [Mon, 10 Nov 2014 00:41:48 +0000 (01:41 +0100)]
usb4bsd: Add usb_pf.c to the module Makefile too.

9 years agousb4bsd: Make usb_pf work
Markus Pfeiffer [Sun, 9 Nov 2014 13:17:02 +0000 (13:17 +0000)]
usb4bsd: Make usb_pf work

Together with usbdump this allows dumping of usb traffic just like
tcpdump allows dumping of network traffic.

At the moment it is necessary to create the cloned device manually
for the usb bus one wants to monitor.

9 years agortld-elf - save/restore args fp regs as well (clang)
Matthew Dillon [Sun, 9 Nov 2014 21:27:54 +0000 (13:27 -0800)]
rtld-elf - save/restore args fp regs as well (clang)

* Note: this has no real effect on gcc based systems.

* fp registers %xmm0-7 can be used for arguments to procedures.  With
  GCC we didn't have to save/restore them for the rtld binder because
  rtld didn't use any FP registers and GCC did not insert any for
  structural copies.

  But CLANG does, so the binder has to save/restore these registers or
  dynamically linked calls which take FP arguments will explode on the
  first call.

* For example, A simple clang program to printf("%f", 1.0); a few times...
  the first output would be 0.0 instead of 1.0 due to the binder blowing
  away the procedure argument to dtoa().  The bug also blows up awk and
  dports and... well.

Reported-by: marino
9 years agoyacc(1): Some local adjustments for byacc-20141006.
Sascha Wildner [Sun, 9 Nov 2014 13:16:29 +0000 (14:16 +0100)]
yacc(1): Some local adjustments for byacc-20141006.

This also doubles the MAXTABLE size (which is configurable in 20141006
and the reason for this upgrade), because a newer iasl(8) was whining
about it.

9 years agoMerge branch 'vendor/BYACC'
Sascha Wildner [Sun, 9 Nov 2014 14:26:04 +0000 (15:26 +0100)]
Merge branch 'vendor/BYACC'

9 years agodrm: Remove some useless macros
François Tigeot [Sun, 9 Nov 2014 13:16:33 +0000 (14:16 +0100)]
drm: Remove some useless macros

9 years agobyacc-20141006: Adjust some forgotten things on the vendor branch.
Sascha Wildner [Sun, 9 Nov 2014 13:02:53 +0000 (14:02 +0100)]
byacc-20141006: Adjust some forgotten things on the vendor branch.

* skeleton.c is now yaccpar.c

* New file mstring.c

* Adjust README.DELETED

9 years agopci.9: Some more cleanup.
Sascha Wildner [Sun, 9 Nov 2014 12:49:49 +0000 (13:49 +0100)]
pci.9: Some more cleanup.