dragonfly.git
9 years agokernel - Fix a major (pageable) memory leak v4.0.2
Matthew Dillon [Wed, 31 Dec 2014 22:32:45 +0000 (14:32 -0800)]
kernel - Fix a major (pageable) memory leak

* MFC 15553805ce from master.  Only MFC the actual one-line fix, do not
  MFC all the debug code and other stuff.

* This fixes a memory leak which can cause a system to run out of swap
  space relatively easily.

9 years agohammer(8): Fix closing brace indent in 'show' output.
Sascha Wildner [Sat, 27 Dec 2014 00:53:35 +0000 (01:53 +0100)]
hammer(8): Fix closing brace indent in 'show' output.

Commit 39e88285cb81d7847bb54a08e0f50a61be890e08 extended the bad
indication to two chars ("B " or "BM") but forgot to adjust the
indent of the closing brace.

9 years agokernel/netmap: Switch sysctls over to dev.netmap like in FreeBSD.
Sascha Wildner [Mon, 22 Dec 2014 20:12:27 +0000 (21:12 +0100)]
kernel/netmap: Switch sysctls over to dev.netmap like in FreeBSD.

9 years agoAdd dev.* sysctl hierarchy to 4.0.
Sascha Wildner [Mon, 22 Dec 2014 20:17:44 +0000 (21:17 +0100)]
Add dev.* sysctl hierarchy to 4.0.

9 years agokernel: Don't confuse kmalloc() and mbuf flags.
Sascha Wildner [Mon, 22 Dec 2014 11:49:03 +0000 (12:49 +0100)]
kernel: Don't confuse kmalloc() and mbuf flags.

9 years ago<sys/file2.h>: Correct include guard check.
Sascha Wildner [Sun, 21 Dec 2014 18:28:26 +0000 (19:28 +0100)]
<sys/file2.h>: Correct include guard check.

9 years agotwa(4): Fix a crash with TWA_DEBUG >= 3.
Sascha Wildner [Mon, 15 Dec 2014 22:34:16 +0000 (23:34 +0100)]
twa(4): Fix a crash with TWA_DEBUG >= 3.

tw_osli_dbg_dprintf() uses device_printf(sc->bus_dev, ...) so we can't
use it before sc->bus_dev is actually set.

9 years agousb4bsd/if_rum: Add missing locking around rum_start_locked().
Imre Vadasz [Mon, 8 Dec 2014 15:01:24 +0000 (16:01 +0100)]
usb4bsd/if_rum: Add missing locking around rum_start_locked().

9 years agonamecache: Remove a diagnostic message
François Tigeot [Thu, 4 Dec 2014 14:22:11 +0000 (15:22 +0100)]
namecache: Remove a diagnostic message

It only scares users these days.

9 years agodevd(8): Fix asus.conf installation.
Sascha Wildner [Thu, 4 Dec 2014 18:27:47 +0000 (19:27 +0100)]
devd(8): Fix asus.conf installation.

9 years agolink_elf: Work around a GCC optimization bug. Fixes ddb stack traces.
Imre Vadasz [Sat, 29 Nov 2014 20:28:53 +0000 (21:28 +0100)]
link_elf: Work around a GCC optimization bug. Fixes ddb stack traces.

Taken-from: FreeBSD r102348

9 years agovkernel64 - Fix pmap panic
Matthew Dillon [Fri, 28 Nov 2014 06:57:36 +0000 (22:57 -0800)]
vkernel64 - Fix pmap panic

* Fix a pmap panic complaining about the pm_active cpumask not being zero
  when the pmap is released/destroyed.

* The vkernel64 swtch code was improperly setting the active bits from
  the gd_other_cpus field instead of the gd_cpumask field, which wound
  up setting lots of bits instead of the one bit we wanted to set.

* Long-known bug was difficult to reproduce consistently enough to
  locate until Robert found a quick way.

Reproduced-by: Robert Garrett
9 years agokernel/acpi: Add missing ACPI_SERIAL_INIT calls for lock initialization.
Imre Vadasz [Wed, 26 Nov 2014 13:37:52 +0000 (14:37 +0100)]
kernel/acpi: Add missing ACPI_SERIAL_INIT calls for lock initialization.

9 years agoMerge branch 'DragonFly_RELEASE_4_0' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Tue, 25 Nov 2014 18:58:53 +0000 (10:58 -0800)]
Merge branch 'DragonFly_RELEASE_4_0' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into DragonFly_RELEASE_4_0

9 years agokernel - Fix panic on upmap/kpmap read via procfs.
Matthew Dillon [Tue, 25 Nov 2014 18:57:13 +0000 (10:57 -0800)]
kernel - Fix panic on upmap/kpmap read via procfs.

* Fix a panic when upmap/kpmap is accessed via procfs.

Reported-by: Joris Giovannangeli
9 years ago loader: Fix typos in help.common v4.0.1
Thomas Nikolajsen [Mon, 24 Nov 2014 21:39:34 +0000 (22:39 +0100)]
loader: Fix typos in help.common

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

9 years ago loader: Fix XHCI description in help.common
Thomas Nikolajsen [Mon, 24 Nov 2014 21:37:10 +0000 (22:37 +0100)]
loader: Fix XHCI description in help.common

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 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 agoudp: Fix parameter order of udp_addrcpu()
Sepherosa Ziehau [Sun, 23 Nov 2014 21:32:08 +0000 (05:32 +0800)]
udp: Fix parameter order of udp_addrcpu()

9 years agoRemove obsolete ieee80211_amrr.9 manual page.
Sascha Wildner [Thu, 30 Oct 2014 15:19:37 +0000 (16:19 +0100)]
Remove obsolete ieee80211_amrr.9 manual page.

9 years agorc.8: Mention 'reload', which is enabled frequently to kill -HUP daemons.
Sascha Wildner [Wed, 29 Oct 2014 18:08:59 +0000 (19:08 +0100)]
rc.8: Mention 'reload', which is enabled frequently to kill -HUP daemons.

Reported-by: Matteo Cypriani <mcy@lm7.fr>
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 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 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 ago-h (human-readable counters) for netstat
Antonio Nikishaev [Sun, 23 Nov 2014 11:23:33 +0000 (15:23 +0400)]
-h (human-readable counters) for netstat

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 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 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 agoWorld: Remove the X11BASE variable
François Tigeot [Sun, 23 Nov 2014 15:32:59 +0000 (16:32 +0100)]
World: Remove the X11BASE variable

Requested-by: marino
9 years agoOpenSSH: Correctly set xauth's path (2/2)
François Tigeot [Sun, 23 Nov 2014 11:41:12 +0000 (12:41 +0100)]
OpenSSH: Correctly set xauth's path (2/2)

X11BASE is used internally by dports and setting it globally
can be dangerous.
Only define this variable in the OpenSSH makefiles.

9 years agoservice(8): Sync with FreeBSD.
Robin Hahling [Sat, 22 Nov 2014 11:47:38 +0000 (12:47 +0100)]
service(8): Sync with FreeBSD.

9 years agoservice(8): Fix error message being displayed when invoking service
Robin Hahling [Sat, 22 Nov 2014 12:41:09 +0000 (13:41 +0100)]
service(8): Fix error message being displayed when invoking service

service(8) has been imported from FreeBSD. However, DragonFly rc(8) does
not have 'nojail', thus this would have no effect on the call to
rcorder(8).

9 years agorc.subr: Add function to find scripts in local_startup directories
Robin Hahling [Sat, 22 Nov 2014 12:08:11 +0000 (13:08 +0100)]
rc.subr: Add function to find scripts in local_startup directories

* Add 'find_local_scripts()' function which is useful for
service(8).

* Fix reference to function in service.sh. This fixes two issues in
  service(8) for which 'service -e' and 'service -l' would simply fail
  to list local startup scripts.

'find_local_scripts()' has been imported from FreeBSD, where it is
called 'find_local_scripts_new()'.

9 years agoOpenSSH: Correctly set xauth's path
François Tigeot [Sun, 23 Nov 2014 10:11:42 +0000 (11:11 +0100)]
OpenSSH: Correctly set xauth's path

Revision 111f4c913a18de9586649cc1a374240679ec903a saw the removal
of X11BASE from the tree.

Howewer, it is still required by ssh(1) and sshd(8) to set the
default location of xauth(1).

Put it back but change the value to /usr/local following the change
from pkgsrc to dports.

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 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 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 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 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 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/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 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 agoSync zoneinfo database with tzdata2014j from ftp://ftp.iana.org/tz/releases v4.0.0 v4.0.0rc3
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 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 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 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 agokernel - Add reapctl() system call for managing sub-processes (3) -> procctl() v4.0.0rc2
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 - 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 agodev/drm: Implement kqueue support; Wake up blocking reads
Imre Vadasz [Fri, 7 Nov 2014 19:49:37 +0000 (20:49 +0100)]
dev/drm: Implement kqueue support; Wake up blocking reads

* Add a call to drm_event_wakeup() in drm/radeon.

* Flesh out the stubbed kqueue support.

* Blocking reads were not woken up because of a typo in the wakeup call.

9 years agousb4bsd/if_urndis: Add a missing KKASSERT().
Sascha Wildner [Thu, 6 Nov 2014 21:35:39 +0000 (22:35 +0100)]
usb4bsd/if_urndis: Add a missing KKASSERT().

While here, remove an unused URNDIS_LOCK_ASSERT() parameter.

9 years agourndis.4: No ifmedia support in this driver.
Sascha Wildner [Thu, 6 Nov 2014 18:59:34 +0000 (19:59 +0100)]
urndis.4: No ifmedia support in this driver.

9 years agokernel - Improve m->hold_count assertions, fix page-zeroing code bug
Matthew Dillon [Wed, 5 Nov 2014 19:06:28 +0000 (11:06 -0800)]
kernel - Improve m->hold_count assertions, fix page-zeroing code bug

* Improve assertions on m->hold_count to provide more information.

* Fix a bug in vm_page_free_fromq_fast() where an assertion can get
  hit due to a SMP race.  This is only used by the page-zeroing code.

9 years agokernel - Fix exec optimization race
Matthew Dillon [Wed, 5 Nov 2014 19:04:11 +0000 (11:04 -0800)]
kernel - Fix exec optimization race

* Fix an improper vm_page_unhold() in exec_map_page() which
  under heavy memory loads can cause a later assertion
  on m->hold_count == 0.

* Triggered every few days by bulk builds on pkgbox64.

9 years agousb4bsd: Fix if_urndis/umodem probing conflict.
Sascha Wildner [Thu, 6 Nov 2014 18:45:41 +0000 (19:45 +0100)]
usb4bsd: Fix if_urndis/umodem probing conflict.

Previously, if_urndis would not detect certain devices (among them
the HTC One) due to a conflict with certain USB modems from Huawei.

Fix this by making umodem check explicitly for Huawei as the vendor.

As far as I can see, devd(8) would now load both umodem.ko and
if_urndis.ko for these modems but only umodem.ko would attach, so
we should be fine.

However, so far only the urndis(4) part was actually tested.

Submitted-by: Yellow Rabbit <yrabbit@sdf.lonestar.org>
Tested-by: Robin Hahling <robin.hahling@gw-computing.net>
Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/2725>

9 years agokernel: Allow pf to build without INET6
François Tigeot [Wed, 5 Nov 2014 09:11:31 +0000 (10:11 +0100)]
kernel: Allow pf to build without INET6

Submitted-by: lhmwzy
9 years agosysv_shm: allow attaching to REMOVED shm segments
Joris Giovannangeli [Sun, 2 Nov 2014 18:08:18 +0000 (19:08 +0100)]
sysv_shm: allow attaching to REMOVED shm segments

 * Add kern.ipc.shm_allow_removed to allow for this behavior

 * chrome relies on this behavior

Taken-from: FreeBSD

9 years agousb4bsd: Fix usb_etherther and cleanup if_axe
Markus Pfeiffer [Mon, 3 Nov 2014 22:33:31 +0000 (22:33 +0000)]
usb4bsd: Fix usb_etherther and cleanup if_axe

Since mii relies on a struct ifnet being the first part of a
softc for a network driver, make usb_ethernet adhere to this rule.
This fixes panics with usb_ethernet caused by parts of the
uether_softc being overwritten by the mii code.

9 years agoftp - bring 1.205 from netbsd
Matthew Dillon [Mon, 27 Oct 2014 18:53:46 +0000 (11:53 -0700)]
ftp - bring 1.205 from netbsd

* Don't pay attention to special characters if they don't come
  from the command line (from jmcneill)

* Also, for DragonFly specifically I am removing the use of
  popen() entirely, even for command-line-specified features.

9 years agobuild.7: document rescue target
Robin Hahling [Sun, 26 Oct 2014 07:41:01 +0000 (08:41 +0100)]
build.7: document rescue target

9 years ago4.0 release candidate tag. v4.0.0rc
Justin C. Sherrill [Sun, 26 Oct 2014 03:30:13 +0000 (23:30 -0400)]
4.0 release candidate tag.

9 years agoSync zoneinfo database with tzdata2014i from ftp://ftp.iana.org/tz/releases
Sascha Wildner [Sun, 26 Oct 2014 03:31:08 +0000 (04:31 +0100)]
Sync zoneinfo database with tzdata2014i from ftp://ftp.iana.org/tz/releases

* asia: Many time stamps have been corrected for Asia/Ho_Chi_Minh
    before 1976. Asia/Phnom_Penh and Asia/Vientiane have been turned
    into links, as they differed from existing zones only for older
    time stamps.

* australasia: Pacific/Fiji will observe DST from 2014-11-02 02:00 to
    2015-01-18 03:00. A new Zone Pacific/Bougainville, for the part
    of Papua New Guinea that plans to switch from UTC+10 to UTC+11 on
    2014-12-28 at 02:00.

* europe: Since Belarus is not changing its clocks even though Moscow is,
    the time zone abbreviation in Europe/Minsk is changing from FET
    to its more-traditional value MSK on 2014-10-26 at 01:00.

* northamerica: Some comment fixes.

As usual, the NEWS file has more details.

9 years agoupmap.4: Add missing .El
Sascha Wildner [Sat, 25 Oct 2014 17:31:39 +0000 (19:31 +0200)]
upmap.4: Add missing .El

9 years agomdoc.local: Add version 3.9 for .Dx
Sascha Wildner [Sat, 25 Oct 2014 17:30:49 +0000 (19:30 +0200)]
mdoc.local: Add version 3.9 for .Dx

While here, also add 9.3 for .Fx

9 years agoAdd a upmap(4)/kpmap(4) manual page.
Sascha Wildner [Sat, 25 Oct 2014 15:05:27 +0000 (17:05 +0200)]
Add a upmap(4)/kpmap(4) manual page.

Submitted-by: Robin Hahling <robin.hahling@gw-computing.net>
9 years agodrm/radeon: Handle -fms-extensions better (fixes the clang build).
Sascha Wildner [Sat, 25 Oct 2014 13:39:56 +0000 (15:39 +0200)]
drm/radeon: Handle -fms-extensions better (fixes the clang build).

FreeBSD has since switched to only using it for GCC (which apparently
complains about anonymous unions). In clang, it will enable Microsoft's
__wchar_t type, which (as in FreeBSD) conflicts with our own one.

We actually only need it for gcc44. Our gcc47 builds radeon.ko fine
without it.

9 years agodev/drm: For now, only build radeon drivers with base compilers
John Marino [Sat, 25 Oct 2014 10:38:54 +0000 (12:38 +0200)]
dev/drm: For now, only build radeon drivers with base compilers

Currently, at least clang35 can't build radeon drivers due to how system
headers are included.  I suspect dports gcc compilers may also have the
same issue.  Until this issue is understood and fixed, limit the building
of radeon modules to the base compilers.

9 years agokern.mk: isolate gcc-only flags to gcc compilers (determined by CCVER)
John Marino [Sat, 25 Oct 2014 10:28:56 +0000 (12:28 +0200)]
kern.mk: isolate gcc-only flags to gcc compilers (determined by CCVER)

9 years agolibstand: Isolate gcc-specific flags, avoid native compilations
John Marino [Sat, 25 Oct 2014 07:28:32 +0000 (09:28 +0200)]
libstand: Isolate gcc-specific flags, avoid native compilations

Only set -mpreferred-stack-boundary when using GCC.  While here, add
a bunch of flags that avoid cpu-specific instructions.  Similar flags
are seen in the boot code.

9 years agoboot/pc32: specify some flags based on CCVER
John Marino [Sat, 25 Oct 2014 07:22:42 +0000 (09:22 +0200)]
boot/pc32: specify some flags based on CCVER

Some flags are gcc-specific, so only set them if CCVER begins with
the substring "gcc".  Some assembly files can only be built by the
binutils GNU assembler, so define ASSEMBLER flags which CCVER starting
with "clang" will augment.  There is no change for the current base
compilers.

9 years agoboot/dloader: Remove duplicate CFLAGS
John Marino [Sat, 25 Oct 2014 07:04:29 +0000 (09:04 +0200)]
boot/dloader: Remove duplicate CFLAGS

The -ffreestanding flag gets defined by ../pc32/Makefile.inc which
both platforms pull in.  The -m32 flag is defined by ../pc64/Makefile
which only x86_64 pulls in.

9 years agopc64/acpica: specify cmpw in acpi_wakecode.S
John Marino [Sat, 25 Oct 2014 06:45:46 +0000 (08:45 +0200)]
pc64/acpica: specify cmpw in acpi_wakecode.S

The "cmp" instruction is ambiguious in acpi_wakecode.S.  The GNU assembler
should emit an error, but instead it just assumes that the operand is of
a wide type.  The clang assembler does throw an error, so let's explicitly
use "cmpw" to resolve the ambuiguity.

9 years agodrm1: Remove formatted manual pages via 'make upgrade', too.
Sascha Wildner [Fri, 24 Oct 2014 16:22:28 +0000 (18:22 +0200)]
drm1: Remove formatted manual pages via 'make upgrade', too.

9 years agoRemove forgotten backslash.
Sascha Wildner [Fri, 24 Oct 2014 05:05:27 +0000 (07:05 +0200)]
Remove forgotten backslash.

9 years agoRemove remaining drm1 bits
François Tigeot [Thu, 23 Oct 2014 20:42:58 +0000 (22:42 +0200)]
Remove remaining drm1 bits

* Remove kernel compilation options and manpages for old drivers

* Make sure make upgrade removes old kernel modules and other
  files

9 years agodrm: Remove unused PCI ids
François Tigeot [Thu, 23 Oct 2014 20:11:33 +0000 (22:11 +0200)]
drm: Remove unused PCI ids

9 years agokernel: Drop drm1 drivers
François Tigeot [Thu, 23 Oct 2014 19:14:29 +0000 (21:14 +0200)]
kernel: Drop drm1 drivers

* They were used for 3D OpenGL acceleration with ancient graphic cards
  from the 1990s to early 2000s

* Mesa removed support for them in August 2011, before its 8.0 release

* No Mesa 7.x version beeing available in dports anymore these drivers
  have become completely useless

9 years agoreboot - Mask SIGTERM to fix a self-immolation issue
Matthew Dillon [Thu, 23 Oct 2014 17:17:07 +0000 (10:17 -0700)]
reboot - Mask SIGTERM to fix a self-immolation issue

* reboot is getting SIGTERM'd, possibly from its parent shell, before
  it can finish telling the system to reboot.  Mask this signal as well.

* But possibly exposed by earlier SMP work that could result in the
  signal getting in front of the final system call to reboot.

Submitted-by: YONETANI Tomokazu
9 years agotip(1): Raise WARNS to 2 and fix all corresponding warnings.
Sascha Wildner [Thu, 23 Oct 2014 16:56:51 +0000 (18:56 +0200)]
tip(1): Raise WARNS to 2 and fix all corresponding warnings.

Also ansify, use -std=gnu99 like everywhere else and do some more
cleanups.

9 years agodrm: msleep() must not sleep forever
François Tigeot [Thu, 23 Oct 2014 15:36:30 +0000 (17:36 +0200)]
drm: msleep() must not sleep forever

* In some cases, the msleep() implementation called tsleep() with a
  timeout value of zero, making the calling thread sleep forever.

* Ensure tsleep() is always called with a minimal timeout value of
  one tick to avoid this situation.

9 years agoopenssl: Update version/date in the manual pages.
Sascha Wildner [Thu, 23 Oct 2014 07:26:27 +0000 (09:26 +0200)]
openssl: Update version/date in the manual pages.

9 years agobsd-family-tree: Sync with FreeBSD (for Mac OS X 10.10).
Sascha Wildner [Wed, 22 Oct 2014 20:33:54 +0000 (22:33 +0200)]
bsd-family-tree: Sync with FreeBSD (for Mac OS X 10.10).

9 years agoLocal adjustments for OpenSSL-1.0.1j.
Sascha Wildner [Wed, 22 Oct 2014 17:41:56 +0000 (19:41 +0200)]
Local adjustments for OpenSSL-1.0.1j.

9 years agoMerge branch 'vendor/OPENSSL'
Sascha Wildner [Wed, 22 Oct 2014 17:30:55 +0000 (19:30 +0200)]
Merge branch 'vendor/OPENSSL'

9 years agoImport OpenSSL-1.0.1j.
Sascha Wildner [Wed, 22 Oct 2014 17:27:43 +0000 (19:27 +0200)]
Import OpenSSL-1.0.1j.

* Fixes for CVE-2014-3513, CVE-2014-3566, CVE-2014-3567 and
  CVE-2014-3568.

* Additional DigestInfo checks.

9 years agotip(1): Fix various warnings and errors emitted by clang
John Marino [Wed, 22 Oct 2014 12:28:45 +0000 (14:28 +0200)]
tip(1): Fix various warnings and errors emitted by clang

The most serious were void/return mismatches, but clang also complained
about ambiguous brackets and mis-matching printf formats.  It also didn't
like one particular K&R-formatted function, but I'm not sure why not.

9 years agoReally set default binutils to version 2.24
John Marino [Wed, 22 Oct 2014 09:06:39 +0000 (11:06 +0200)]
Really set default binutils to version 2.24

The last update of binutils missed changing the default in bsd.cpu.mk,
which means all the bootstrap and other tools were built with binutils
2.22 instead of 2.24.  This oversight is rectified now.

9 years agoboot: remove sparc, powerpc, ia64 code and references
John Marino [Wed, 22 Oct 2014 07:23:40 +0000 (09:23 +0200)]
boot: remove sparc, powerpc, ia64 code and references

While I'm here, remove the practically blank README.  Apparently this was
on Matt's "To-Do" list, but that was 4 years ago so I don't think it's
going to get done.

9 years agorouted - Apply FreeBSD-SA-14:21.routed
Matthew Dillon [Tue, 21 Oct 2014 22:16:18 +0000 (15:16 -0700)]
routed - Apply FreeBSD-SA-14:21.routed

* Apply patch to fix null-pointer DOS.

9 years agocsu: Remove $CFLAGS from intermediate object targets
John Marino [Tue, 21 Oct 2014 18:25:30 +0000 (20:25 +0200)]
csu: Remove $CFLAGS from intermediate object targets

These makefile case from FreeBSD, but the flags were called $ACFLAGS,
not $CFLAGS, and they are empty by default.  I noticed clang's
assembler screaming about unused flags and then noticed this mistake.

9 years agocustomcc: Improve wrapper script efficiency and capabilities
John Marino [Tue, 21 Oct 2014 13:11:34 +0000 (15:11 +0200)]
customcc: Improve wrapper script efficiency and capabilities

The wrapper script had some deficies, such as:
 * awk called every invocation
 * cc and gcc treated the same
 * c++ and g++ treated the same
 * evals for variables not used
 * every invocation of c++ or g++ called cc -dumpmachine
 * g++ hardcoded to dports include scheme
 * no support for "CC" or "gcov" (both defined by base compilers)

The update addresses these by:
 * awk eliminated by pushing INCOPT definition to defaults/compilers.conf
 * cc -dumpmachine eliminated during creation of defaults/compilers.conf
   It was only used for dports gcc, so with the assumption that the dports
   compiler matches the uname information (a decent assumption), this
   was predefined, yet overridable by /etc/compilers.conf
 * cc is treated separately from gcc
 * CC and c++ are treated the same but separately from g++
 * by wrapper default, gcc and g++ refer to base gcc4.7, but the default
   compilers.conf sets them to the same as the specified dports gcc
 * Support for clang, clang++, clang-cpp, CC, and gcov was added
 * Support for base clang, clang++, and clang-cpp was added in
   anticipation of bringing clang into base.
 * variables are only evaluated if used.
 * supports the ability to have gcc, g++, clang, clang++ point to base
   compilers while cc, c++, CC point to custom compiler.  However, the
   custom compiler can also point to any combination of cc, gcc, c++, and
   g++ and that's controllable by compilers.conf.

The /etc/defaults/compilers.conf file was augmented and support for
clang35 from dports added.  man 5 compilers.conf was edited accordingly
with placeholders for <version>_CLANG, <version>_CLANGCXX and
<version>_CLANGCPP which aren't applicable until clang comes into base.

9 years agokernel - Fix int/long truncation problem in rman_reserve_resource()
Matthew Dillon [Tue, 21 Oct 2014 06:08:50 +0000 (23:08 -0700)]
kernel - Fix int/long truncation problem in rman_reserve_resource()

* Use ulmin/ulmax instead of min/max in three places, fixing a 32-bit
  truncation problem when setting up memory resources that caused our
  48-core opteron to panic.

* An earlier commit adjusting count values to be more correct revealed
  the bug.

* Fixes booting the kernel on our 48-core opteron w/128G of ram.

9 years agokernel: FWIW, add FreeBSD's led(4) framework.
Sascha Wildner [Sun, 19 Oct 2014 18:22:43 +0000 (20:22 +0200)]
kernel: FWIW, add FreeBSD's led(4) framework.

It's not big and some ACPI code can utilize it.

Also add -l to morse(6) to output in led(4) compatible format.

Thanks to Markus Pfeiffer and Johannes Hofmann for testing and
finding issues.

Taken-from: FreeBSD

9 years agokernel - Add the nitems(x) macro from FreeBSD to sys/param.h
Matthew Dillon [Sun, 10 Aug 2014 08:24:56 +0000 (01:24 -0700)]
kernel - Add the nitems(x) macro from FreeBSD to sys/param.h

* Horrible name but... ok.

9 years agodma(8): Better integration with our periodic scripts.
Sascha Wildner [Sun, 19 Oct 2014 11:37:04 +0000 (13:37 +0200)]
dma(8): Better integration with our periodic scripts.

* Make dma(8) accept the -Ac option when run as 'mailq'. Also make it
  run as 'hoststat' and 'purgestat' (does nothing in this case).

* Adjust the 440.status-mailq daily periodic script to also check for
  "Mail queue is empty", which is dma(8)'s corresponding text.

Note: We really should be suppressing the checking of the submit queue
      automatically if mailer.conf is set up for dma(8) but I'm not
      sure yet what's the best way.

Reported and tested by Max Herrgard <herrgard@gmail.com>.