dragonfly.git
9 years agolibevtr: Remove loop with undefined optimized behavior
John Marino [Tue, 10 Feb 2015 09:00:05 +0000 (10:00 +0100)]
libevtr: Remove loop with undefined optimized behavior

Starting with gcc 4.8 I believe, one particular loop in evtr.c fails to
compile.  The error is "interation 3u involved undefined behavior
[-Werror=aggressive-loop-optimizations]".

No alternative I tried worked, so I finally just removed the loop since
it only iterates 4 times.  It's brute force but the code is correct.

9 years agoncurses: Apply patch from upstream to allow building by gcc 5.0
John Marino [Tue, 10 Feb 2015 01:41:18 +0000 (02:41 +0100)]
ncurses: Apply patch from upstream to allow building by gcc 5.0

The gcc 5.0 processor will mangle the headers produced by this script.
It has already been fixed in official patches from upstream.  Applying
the appropriate patch will allow gcc 5.0 to build ncurses, and gcc 4.7
has been verified to continue to work as well.

9 years agolibc: Silence a bunch of set-but-not-used errors found by gcc 5.0
John Marino [Mon, 9 Feb 2015 23:36:18 +0000 (00:36 +0100)]
libc: Silence a bunch of set-but-not-used errors found by gcc 5.0

During testing of upcoming base gcc 5.0, several libc files failed to
compile with -Werror set.  This commit will silence the errors.  For the
majority of these, I designed the variables as "__unused" so the compiler
knows that their (lack of) use is intentional.  For the rest, I just
removed the variables completely.

9 years agoe1000 (em, emx, ig_hal): Sync w/ intel em-7.4.2
Michael Neumann [Sat, 7 Feb 2015 21:11:21 +0000 (22:11 +0100)]
e1000 (em, emx, ig_hal): Sync w/ intel em-7.4.2

This adds support for network chips based on PCH_I218_{LM2,V2,LM3,V3}.

Tested with:
  * 82571, 82573, 82574 (sephe)
  * emx: I217_V (dillon)
  * em/emx: 82574L, I218_V2 (mneumann)

9 years agokernel/sound: Add missing unlock (we panic on lockuninit() on a held lock).
Sascha Wildner [Sun, 8 Feb 2015 22:33:39 +0000 (23:33 +0100)]
kernel/sound: Add missing unlock (we panic on lockuninit() on a held lock).

9 years agomemtemp.4: Add manpage for memtemp
Sepherosa Ziehau [Sun, 8 Feb 2015 12:30:25 +0000 (20:30 +0800)]
memtemp.4: Add manpage for memtemp

9 years agoifnet: Make ifnet and ifindex2ifnet MPSAFE
Sepherosa Ziehau [Thu, 22 Jan 2015 13:28:43 +0000 (21:28 +0800)]
ifnet: Make ifnet and ifindex2ifnet MPSAFE

- Accessing to these two global variables from non-netisr threads uses
  ifnet lock.  This kind of accessing is from
- Accessing to ifindex2ifnet from netisrs are lockless MPSAFE.
- Netisrs no longer access ifnet, instead they access ifnet array as of
  this commit, which is lockless MPSAFE.

Rules for accessing ifnet and ifindex2ifnet is commented near the
declaration of the related global variables/functions in net/if_var.h.

9 years agoidr: Remove a debugging message
François Tigeot [Sat, 7 Feb 2015 21:41:45 +0000 (22:41 +0100)]
idr: Remove a debugging message

9 years agokernel/x86_64: Add SDBG to Features2.
Sascha Wildner [Sun, 8 Feb 2015 00:15:26 +0000 (01:15 +0100)]
kernel/x86_64: Add SDBG to Features2.

From Intel 64 and IA-32 Architectures Software Developer's Manuals:

"A value of 1 indicates the processor supports IA32_DEBUG_INTERFACE MSR
 for silicon debug."

Found in the Xeon E3-1226 v3.

9 years agodrm: Reintroduce drm_kms_free()
François Tigeot [Sat, 7 Feb 2015 16:57:28 +0000 (17:57 +0100)]
drm: Reintroduce drm_kms_free()

* The Linux version of kfree() is a macro with one argument.

* The real kfree() function takes two arguments.

* kfree() cannot be simply called via a function pointer from
  Linux code.

* Re-add the special purpose drm_kms_free() wrapper function
  to handle this situation. It was wrongly removed when drm_crtc.c
  was last synced to Linux.

Reported-by: jh32
9 years agodrm: Start using idr_alloc()
François Tigeot [Sat, 7 Feb 2015 10:11:17 +0000 (11:11 +0100)]
drm: Start using idr_alloc()

9 years agodrm: Sync drm_context.c with Linux 3.10
François Tigeot [Sat, 7 Feb 2015 09:58:06 +0000 (10:58 +0100)]
drm: Sync drm_context.c with Linux 3.10

9 years agoidr: Implement idr_alloc()
François Tigeot [Sat, 7 Feb 2015 09:37:27 +0000 (10:37 +0100)]
idr: Implement idr_alloc()

9 years agoiwn: Release WLAN serializer before ieee80211_ifattach()
Sepherosa Ziehau [Sat, 7 Feb 2015 14:38:52 +0000 (22:38 +0800)]
iwn: Release WLAN serializer before ieee80211_ifattach()

Mainly to avoid dead-locking domsg to netisrs in ieee80211_ifattach()

Reported-by: Rolinh on IRC
9 years agoecc/e5: Strip comma from device description
Sepherosa Ziehau [Fri, 6 Feb 2015 13:12:05 +0000 (21:12 +0800)]
ecc/e5: Strip comma from device description

9 years agoecc/e5: Declare dimmmtr near its usage
Sepherosa Ziehau [Fri, 6 Feb 2015 13:06:13 +0000 (21:06 +0800)]
ecc/e5: Declare dimmmtr near its usage

9 years agoecc/e5: No need to check rank disabled bits
Sepherosa Ziehau [Fri, 6 Feb 2015 13:00:34 +0000 (21:00 +0800)]
ecc/e5: No need to check rank disabled bits

9 years agomemtemp: Add Intel E5 v2 memory thermal sensor support
Sepherosa Ziehau [Fri, 6 Feb 2015 12:49:06 +0000 (20:49 +0800)]
memtemp: Add Intel E5 v2 memory thermal sensor support

9 years agoSync intel_sdvo.c with Linux 3.10
François Tigeot [Fri, 6 Feb 2015 18:05:49 +0000 (19:05 +0100)]
Sync intel_sdvo.c with Linux 3.10

9 years agolib/libhammer: don't hide sysctlbyname(3) results
Tomohiro Kusumi [Mon, 26 Jan 2015 18:20:38 +0000 (03:20 +0900)]
lib/libhammer: don't hide sysctlbyname(3) results

This patch makes libhammer_btree_stats() and libhammer_io_stats() check
return value of each sysctlbyname(3) instead of only returning the last
result.

Closes: #2779

9 years agohammer: fix terminology of "large block"
Tomohiro Kusumi [Sat, 31 Jan 2015 21:35:10 +0000 (06:35 +0900)]
hammer: fix terminology of "large block"

This cleanup patch changes terminology "large block" to "big block".

- Both "large block" and "big block" are widely used in hammer source from
kernel to userspace, however these two refer to the same data structure which
is a 8MB sized chunk within low level blockmapped storage layer.

- The original design document https://www.dragonflybsd.org/hammer/hammer.pdf
uses big block for this data structure. Having two expressions in its
implementation is confusing and makes grep difficult.

Closes: #2782

9 years agolibhammer - Fix a fd leak on the previous commit
Antonio Huete Jimenez [Sat, 7 Feb 2015 11:04:04 +0000 (12:04 +0100)]
libhammer - Fix a fd leak on the previous commit

- Also check fd just in case it's invalid

Submitted-by: tkusumi (with modification)
Closes: #2784

9 years agolibc - Disallow an excessively large pattern space
Matthew Dillon [Sat, 7 Feb 2015 06:16:40 +0000 (22:16 -0800)]
libc - Disallow an excessively large pattern space

* Disallow pattern spaces which would cause intermediate calculations
  to overflow size_t.

* Since the pattern length must be in the hundreds of megabytes to trigger
  the issue on a 32-bit machine (and something insane on a 64-bit machine),
  it is unlikely that any software is at risk.  But still a good idea to
  deal with the case.

CERT: VU#695940

9 years agoRemove no longer used posix4(9) manual page.
Sascha Wildner [Sat, 7 Feb 2015 04:23:09 +0000 (05:23 +0100)]
Remove no longer used posix4(9) manual page.

9 years agodrm/i915: Remove intel_encoder_noop and intel_crtc_noop()
François Tigeot [Fri, 6 Feb 2015 16:48:41 +0000 (17:48 +0100)]
drm/i915: Remove intel_encoder_noop and intel_crtc_noop()

Reducing differences with Linux 3.10

9 years agodrm: Sync drm_buffer.c with Linux 3.10
François Tigeot [Fri, 6 Feb 2015 16:23:36 +0000 (17:23 +0100)]
drm: Sync drm_buffer.c with Linux 3.10

9 years agodrm: Sync drm_crtc.c and drm_crtc_helper.c with Linux 3.10
François Tigeot [Fri, 6 Feb 2015 16:14:47 +0000 (17:14 +0100)]
drm: Sync drm_crtc.c and drm_crtc_helper.c with Linux 3.10

9 years agodrm/i915: Use kzalloc()
François Tigeot [Fri, 6 Feb 2015 15:50:03 +0000 (16:50 +0100)]
drm/i915: Use kzalloc()

Fix little differences with Linux 3.10 when appropriate.

9 years agodrm: Implement kzalloc()
François Tigeot [Fri, 6 Feb 2015 15:44:33 +0000 (16:44 +0100)]
drm: Implement kzalloc()

9 years agoacpica: Fix 3abee989bb021ca7a77508792e45828ce9d53b28
Sepherosa Ziehau [Fri, 6 Feb 2015 06:27:28 +0000 (14:27 +0800)]
acpica: Fix 3abee989bb021ca7a77508792e45828ce9d53b28

STDERR_FILENO instead of magic number 1 should be used.

9 years agoacpica: Unbreak iasl compile
Sepherosa Ziehau [Fri, 6 Feb 2015 05:17:06 +0000 (13:17 +0800)]
acpica: Unbreak iasl compile

9 years agowlan: Destroy main ifp until all vaps are destroyed
Sepherosa Ziehau [Thu, 5 Feb 2015 13:17:27 +0000 (21:17 +0800)]
wlan: Destroy main ifp until all vaps are destroyed

The main ifp is referenced by ieee80211_vap_destroy(), so it must
be destroyed _after_ all vaps are destroyed.

Tested-by: dillon@
9 years agoem/emx: Apply the same TSO workaround as 82571/82572 for i217/i218
Sepherosa Ziehau [Thu, 5 Feb 2015 13:16:52 +0000 (21:16 +0800)]
em/emx: Apply the same TSO workaround as 82571/82572 for i217/i218

Tested-by: dillon@ on i217
9 years agoecc.4: Adjust according to the recent changes
Sepherosa Ziehau [Thu, 5 Feb 2015 14:38:12 +0000 (22:38 +0800)]
ecc.4: Adjust according to the recent changes

9 years agoprocfs - Properly return error codes for ioctl calls
Antonio Huete Jimenez [Thu, 5 Feb 2015 23:29:55 +0000 (00:29 +0100)]
procfs - Properly return error codes for ioctl calls

9 years agokern_clock.c: Clarify that my last commit msg meant to say 'time_uptime'.
Sascha Wildner [Thu, 5 Feb 2015 22:49:01 +0000 (23:49 +0100)]
kern_clock.c: Clarify that my last commit msg meant to say 'time_uptime'.

Also fix some typos in the comments.

9 years agoSync ACPICA with Intel's version 20150204.
Sascha Wildner [Thu, 5 Feb 2015 18:59:20 +0000 (19:59 +0100)]
Sync ACPICA with Intel's version 20150204.

* A raw gpe handling mechanism was created to allow better handling of
  GPE storms that aren't easily managed by the normal handler. The raw
  handler allows disabling/renabling of the the GPE so that interrupt
  storms can be avoided in cases where events cannot be timely serviced.

* Always modify GPE registers under the GPE lock.

* Various small bug fixes.

* Update copyrights.

9 years agolibhammer - Change the way PFS mounts are detected
Antonio Huete Jimenez [Thu, 5 Feb 2015 15:28:14 +0000 (16:28 +0100)]
libhammer - Change the way PFS mounts are detected

- libhammer_find_pfs_mount() now takes a single argument which
  is the unique_uuid used for the search.
- This solves a problem when passing the path of a PFS to commands
  like 'hammer info' which mistakenly took the argument as the PFS#0.
- Adjust manpage to reflect current status.

9 years agokernel/clock: Also document that time_second is since booting.
Sascha Wildner [Thu, 5 Feb 2015 21:27:24 +0000 (22:27 +0100)]
kernel/clock: Also document that time_second is since booting.

9 years agokernel - Fix documentation for time_second
Matthew Dillon [Thu, 5 Feb 2015 20:27:55 +0000 (12:27 -0800)]
kernel - Fix documentation for time_second

* time_second was improperly documented as an uptime.  It is not.
  It is an approximate real time and might not be monotonic.
  time_uptime should be used if an approximate monotonic uptime is
  desired.

9 years agokernel/wlan: Remove an unused malloc type.
Sascha Wildner [Thu, 5 Feb 2015 08:43:28 +0000 (09:43 +0100)]
kernel/wlan: Remove an unused malloc type.

9 years agowlan: Make sure that WLAN serializer is not held for if_{detach,attach}()
Sepherosa Ziehau [Wed, 4 Feb 2015 14:01:19 +0000 (22:01 +0800)]
wlan: Make sure that WLAN serializer is not held for if_{detach,attach}()

Tested-by: dillon@
9 years agoecc: Support Intel E5 v2 memory controller
Sepherosa Ziehau [Wed, 4 Feb 2015 12:40:26 +0000 (20:40 +0800)]
ecc: Support Intel E5 v2 memory controller

9 years agobuild: Unbreak GENERIC building; LINT seems fine.
Sepherosa Ziehau [Wed, 4 Feb 2015 02:44:59 +0000 (10:44 +0800)]
build: Unbreak GENERIC building; LINT seems fine.

9 years agox86_64: Disable mwait extention if there is no sub-states for C1
Sepherosa Ziehau [Tue, 3 Feb 2015 12:42:39 +0000 (20:42 +0800)]
x86_64: Disable mwait extention if there is no sub-states for C1

DragonFly-bug: http://bugs.dragonflybsd.org/issues/2781

9 years agokernel/iwn: Comment out IWN_DEBUG in the Makefile.
Sascha Wildner [Tue, 3 Feb 2015 22:14:01 +0000 (23:14 +0100)]
kernel/iwn: Comment out IWN_DEBUG in the Makefile.

9 years agokernel/wlan: Re-fix printf issues in debug messages.
Sascha Wildner [Tue, 3 Feb 2015 22:11:25 +0000 (23:11 +0100)]
kernel/wlan: Re-fix printf issues in debug messages.

9 years agokernel/ath: Disallow overriding ATH_RXBUF and ATH_TXBUF.
Sascha Wildner [Tue, 3 Feb 2015 22:20:55 +0000 (23:20 +0100)]
kernel/ath: Disallow overriding ATH_RXBUF and ATH_TXBUF.

They are now forced to 512.

9 years agokernel/ath: Fix building with AH_DEBUG.
Sascha Wildner [Tue, 3 Feb 2015 21:56:02 +0000 (22:56 +0100)]
kernel/ath: Fix building with AH_DEBUG.

9 years agoiwn/wpi: Fix building firmwares into the kernel.
Sascha Wildner [Tue, 3 Feb 2015 21:29:04 +0000 (22:29 +0100)]
iwn/wpi: Fix building firmwares into the kernel.

9 years agokernel/iwn - Fix MAC address printing in verbose mode
Johannes Hofmann [Fri, 30 Jan 2015 19:30:11 +0000 (20:30 +0100)]
kernel/iwn - Fix MAC address printing in verbose mode

* Fix MAC address printing in verbose mode after report
  from FreeBSD

9 years agokernel/wpi - Add back ASSERT_ALTQ_SQ_DEFAULT
Johannes Hofmann [Thu, 29 Jan 2015 22:27:18 +0000 (23:27 +0100)]
kernel/wpi - Add back ASSERT_ALTQ_SQ_DEFAULT

* Add back ASSERT_ALTQ_SQ_DEFAULT to wpi_start()

9 years agokernel/wpi - Use IFNET_STAT_INC macros
Johannes Hofmann [Thu, 29 Jan 2015 22:19:25 +0000 (23:19 +0100)]
kernel/wpi - Use IFNET_STAT_INC macros

* Switch back to use IFNET_STAT_INC macros

9 years agokernel/wpi - Update wpi firmware to iwlwifi-3945-15.32.2.9
Johannes Hofmann [Thu, 29 Jan 2015 22:00:32 +0000 (23:00 +0100)]
kernel/wpi - Update wpi firmware to iwlwifi-3945-15.32.2.9

* Update wpi firmware to iwlwifi-3945-15.32.2.9

Taken-from: FreeBSD

9 years agokernel/wpi - Report wpi from FreeBSD
Johannes Hofmann [Thu, 29 Jan 2015 21:55:08 +0000 (22:55 +0100)]
kernel/wpi - Report wpi from FreeBSD

* Report wpi from FreeBSD as of FreeBSD git revision d692929f2

9 years agowlan - update README.DRAGONFLY for driver porting
Matthew Dillon [Tue, 20 Jan 2015 23:51:44 +0000 (15:51 -0800)]
wlan - update README.DRAGONFLY for driver porting

* Update README.DRAGONFLY to describe in detail how to port
  low level wifi drivers.

9 years agokernel/ath - export athdev_printf()
Matthew Dillon [Tue, 20 Jan 2015 22:22:30 +0000 (14:22 -0800)]
kernel/ath - export athdev_printf()

* Fix the export of athdev_printf() so it is unconditional.

9 years agowlan - export ieee80211_add_ssid()
Matthew Dillon [Tue, 20 Jan 2015 22:21:04 +0000 (14:21 -0800)]
wlan - export ieee80211_add_ssid()

* Export ieee80211_add_ssid() so iwn can use it.

9 years agokernel/iwn - Report iwn from FreeBSD
Matthew Dillon [Tue, 20 Jan 2015 22:20:09 +0000 (14:20 -0800)]
kernel/iwn - Report iwn from FreeBSD

* Report iwn from FreeBSD

9 years agokernel/ath - Synchronize with FreeBSD
Matthew Dillon [Tue, 20 Jan 2015 16:51:00 +0000 (08:51 -0800)]
kernel/ath - Synchronize with FreeBSD

* Synchronize ath with FreeBSD.

9 years agowlan - Finish ieee80211_realign()
Matthew Dillon [Sun, 11 Jan 2015 20:12:07 +0000 (12:12 -0800)]
wlan - Finish ieee80211_realign()

* Finish implementing ieee80211_realign() which is now being called
  in more paths, particularly IWN.

* Fixes IWN.

9 years agowlan - Update wlan from Adrian / FreeBSD
Matthew Dillon [Sun, 11 Jan 2015 17:50:12 +0000 (09:50 -0800)]
wlan - Update wlan from Adrian / FreeBSD

* Update the wlan infrastructure, initially working with ath.

9 years agousb4bsd: Re-port the if_rum driver
Markus Pfeiffer [Mon, 2 Feb 2015 06:57:55 +0000 (06:57 +0000)]
usb4bsd: Re-port the if_rum driver

9 years agoif_bridge - Fix man page
Matthew Dillon [Tue, 3 Feb 2015 17:14:59 +0000 (09:14 -0800)]
if_bridge - Fix man page

* Man page incorrectly said MAC cache was 1024 entries.  It is 4096.

Reported-by: marino
9 years agoif_bridge - Increase MAC cache maximum to 4096
Matthew Dillon [Tue, 3 Feb 2015 03:33:02 +0000 (19:33 -0800)]
if_bridge - Increase MAC cache maximum to 4096

* Increase the default maximum number of records the bridge can keep track
  of from 100 to 4096, which is more contemporary with what hardware
  bridges deal with.

9 years agoif_bridge - Fix issue where source MAC is not recorded.
Matthew Dillon [Tue, 3 Feb 2015 03:28:32 +0000 (19:28 -0800)]
if_bridge - Fix issue where source MAC is not recorded.

* The bridge has to record which interface the source MAC came from
  so transmissions back to that MAC can be unicast.  Otherwise transmissions
  will be broadcast to all bridge elements.

  The receive packet path case where a packet is sent to the bridge's own
  MAC address (terminating on the bridge host) from one of the member
  interfaces was not recording the MAC, resulting in duplicate packets
  (most obvious when testing with 'ping').

* Fix the code path in question so the MAC is properly recorded.

9 years agolibc -- dmalloc: Fix uninitialized variable in memrealloc().
Imre Vadasz [Mon, 2 Feb 2015 00:39:00 +0000 (01:39 +0100)]
libc -- dmalloc: Fix uninitialized variable in memrealloc().

9 years agolibc/db: Fix build with HASH_STATISTICS defined.
Sascha Wildner [Sun, 1 Feb 2015 14:26:50 +0000 (15:26 +0100)]
libc/db: Fix build with HASH_STATISTICS defined.

9 years agolibc/getifaddrs: Remove dead code.
Sascha Wildner [Sun, 1 Feb 2015 13:47:37 +0000 (14:47 +0100)]
libc/getifaddrs: Remove dead code.

We have NET_RT_IFLIST and ifm_data, but we don't have the BSDi specific
ifam_data.

9 years agodrm/i915: Update to Linux 3.10
François Tigeot [Sun, 25 Jan 2015 18:33:18 +0000 (19:33 +0100)]
drm/i915: Update to Linux 3.10

* Page flip improvements, increased robustness after GPU hangs.
  Races have been fixed in the vblank and pageflip completion
  interrupt handlers of GEN2-GEN4 GPUs.

* Hotplug IRQ storm detection and mitigation.

* Various bug fixes and performance improvements from GEN4 to
  Haswell GPUs.
  Less "Unclaimed register" messages should be visible on Haswell.

* Improved support for Valleyview / Baytrail GPUs.

* Better overclocking support from Sandy Bridge to Haswell.
  Improved frequency scaling (turbo) on Haswell.

* Improved display detection and modesetting. It is now possible to
  precompute possible desired display pipe configurations without
  changing the hardware state.

* Daniel Vetter's blog contains more detailed information:
  http://blog.ffwll.ch/2013/04/neat-drmi915-stuff-for-310.html

9 years agoSync zoneinfo database with tzdata2015a from ftp://ftp.iana.org/tz/releases
Sascha Wildner [Sat, 31 Jan 2015 23:38:08 +0000 (00:38 +0100)]
Sync zoneinfo database with tzdata2015a from ftp://ftp.iana.org/tz/releases

Changes affecting future time stamps

* The Mexican state of Quintana Roo, represented by America/Cancun,
    will shift from Central Time with DST to Eastern Time without DST
    on 2015-02-01 at 02:00.  (Thanks to Steffen Thorsen and Gwillim Law.)

* Chile will not change clocks in April or thereafter; its new standard time
    will be its old daylight saving time.  This affects America/Santiago,
    Pacific/Easter, and Antarctica/Palmer.  (Thanks to Juan Correa.)

* New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49.
    (Thanks to Tim Parenti.)

Changes affecting past time stamps

* Iceland observed DST in 1919 and 1921, and its 1939 fallback
    transition was Oct. 29, not Nov. 29.  Remove incorrect data from
    Shanks about time in Iceland between 1837 and 1908.

* Some more zones have been turned into links, when they differed
    from existing zones only for older time stamps.  As usual,
    these changes affect UTC offsets in pre-1970 time stamps only.
    The affected zones are: Asia/Aden, Asia/Bahrain, Asia/Kuwait,
    and Asia/Muscat.

Changes affecting commentary

* The leapseconds file commentary now mentions the expiration date.
    (Problem reported by Martin Burnicki.)

* Update Mexican Library of Congress URL.

9 years agolibcrypto: Raise WARNS to 2 and remove HAVE_CRYPTODEV definition.
Robin Hahling [Sat, 31 Jan 2015 10:06:38 +0000 (11:06 +0100)]
libcrypto: Raise WARNS to 2 and remove HAVE_CRYPTODEV definition.

Add DragonFly as supporting cryptodev to vendor sources instead of
using HAVE_CRYPTODEV for it (which led to a redefinition warning).

This patch will be submitted upstream.

9 years agokernel - Remove if_re debugging message
Matthew Dillon [Sat, 31 Jan 2015 19:16:37 +0000 (11:16 -0800)]
kernel - Remove if_re debugging message

* Remove the 'Debug: OACTIVE was not set when re_tx_free was below minimum!'
  kprintf.  The case is known to happen every once in a while, we no longer
  need to validate that the path is being hit.

Reported-by: Tim Darby
9 years agokernel - Add sysctl to loosen ND packet restrictions
Matthew Dillon [Sat, 31 Jan 2015 19:03:01 +0000 (11:03 -0800)]
kernel - Add sysctl to loosen ND packet restrictions

* Add a sysctl to allow ND packet restrictions to be loosened,
  default is off.  A (hopefully very) few IPV6 configurations might need
  it.

* Use of this sysctl is NOT recommended as it opens up multiple avenues
  for messing up IPV6 routing.

Submitted-by: gpr PR/2780
Taken-From: FreeBSD

9 years ago<sys/resource.h>: Add RLIM_SAVED_{CUR,MAX} and separate BSD specific stuff.
Sascha Wildner [Sat, 31 Jan 2015 10:59:20 +0000 (11:59 +0100)]
<sys/resource.h>: Add RLIM_SAVED_{CUR,MAX} and separate BSD specific stuff.

9 years ago<sys/resource.h>: Adjust whitespace (no functional change).
Sascha Wildner [Sat, 31 Jan 2015 10:58:41 +0000 (11:58 +0100)]
<sys/resource.h>: Adjust whitespace (no functional change).

9 years agohammer2 - fix I/O race, flesh out bulkfree
Matthew Dillon [Fri, 30 Jan 2015 02:26:34 +0000 (18:26 -0800)]
hammer2 - fix I/O race, flesh out bulkfree

* Fix an I/O race which could cause hammer2 to block on an iocb forever.
  A TAILQ was being tested outside of a spin-lock and could race the
  related atomic op on the flag.

* Add signal checking for the bulkfree scan, allowing it to be interrupted.

* Loop sbase/sstop to cover the whole volume.  The in-memory bitmap must
  be bzero()d on each loop.

9 years agohammer2 - work on bmap->avail tracking, fix DIO issue w/block reuse
Matthew Dillon [Thu, 29 Jan 2015 18:21:46 +0000 (10:21 -0800)]
hammer2 - work on bmap->avail tracking, fix DIO issue w/block reuse

* Start working on tracking bmap->avail in a way that the bulkfree
  code can undo.

* DIO was allowing mixed 16/64K buffers, but bulkfree doesn't invalidate
  cached DIOs and the re-use case might want a larger buffer.  For now
  deal with it by just having DIO use 64K buffers.

9 years agoUPDATING: Mention recently removed kernel options.
Sascha Wildner [Wed, 28 Jan 2015 21:02:46 +0000 (22:02 +0100)]
UPDATING: Mention recently removed kernel options.

9 years agoRemove <sys/_posix.h>. It serves no purpose anymore.
Sascha Wildner [Wed, 28 Jan 2015 20:58:53 +0000 (21:58 +0100)]
Remove <sys/_posix.h>. It serves no purpose anymore.

9 years agokernel: Retire the P1003_1B and _KPOSIX_VERSION kernel options.
Sascha Wildner [Wed, 28 Jan 2015 20:56:43 +0000 (21:56 +0100)]
kernel: Retire the P1003_1B and _KPOSIX_VERSION kernel options.

9 years ago<sys/semaphore.h>: Remove dead p1003_1b code.
Sascha Wildner [Wed, 28 Jan 2015 19:25:08 +0000 (20:25 +0100)]
<sys/semaphore.h>: Remove dead p1003_1b code.

9 years ago<sys/sysctl.h>: Remove <sys/_posix.h> include. It is not needed here.
Sascha Wildner [Wed, 28 Jan 2015 19:27:02 +0000 (20:27 +0100)]
<sys/sysctl.h>: Remove <sys/_posix.h> include. It is not needed here.

9 years agokernel/mib: Remove <sys/_posix.h> dependency.
Sascha Wildner [Wed, 28 Jan 2015 20:20:34 +0000 (21:20 +0100)]
kernel/mib: Remove <sys/_posix.h> dependency.

This commit bumps the value of the kern.posix1version sysctl from 199309 to
200112. I know no port which checks this sysctl.

9 years agokernel/snd_hda: Enable uncacheable DMA attribute as default again.
Imre Vadasz [Wed, 28 Jan 2015 19:32:18 +0000 (20:32 +0100)]
kernel/snd_hda: Enable uncacheable DMA attribute as default again.

* Set the HDAC_F_DMA_NOCACHE flag as default (Reinserts a line that was
  removed in commit 403fad76b1ecab3ce8ef68b48445be3a9b0a4e74).

* Allocate at least PAGE_SIZE aligned memory in hdac_dma_alloc() when
  HDAC_F_DMA_NOCACHE is set.

9 years ago<sys/mman.h>: Some cleanup.
Sascha Wildner [Wed, 28 Jan 2015 19:11:20 +0000 (20:11 +0100)]
<sys/mman.h>: Some cleanup.

* Handle _P1003_1B_VISIBLE and _POSIX_SOURCE checks with __POSIX_VISIBLE.

* Separate BSD specific defines/prototypes better.

9 years ago<sys/mman.h>: Whitespace cleanup (no functional change).
Sascha Wildner [Mon, 26 Jan 2015 19:19:57 +0000 (20:19 +0100)]
<sys/mman.h>: Whitespace cleanup (no functional change).

9 years agobsd.hostlib.mk: Fix case where SRCS is defined but empty
John Marino [Wed, 28 Jan 2015 11:47:55 +0000 (12:47 +0100)]
bsd.hostlib.mk: Fix case where SRCS is defined but empty

This is similar to the recent changes to bsd.lib.mk and bsd.prog.mk.
The check covers two augmentations to OBJS, plus let's add some indents
for readability.  Note the second augmentation didn't have a bug in it,
so including it inside the wrap only saves having to evaluate it.

9 years agoinet6: Dispatch nd6_timer to netisr0 to run
Sepherosa Ziehau [Sat, 24 Jan 2015 05:42:14 +0000 (13:42 +0800)]
inet6: Dispatch nd6_timer to netisr0 to run

This function now accesses ifindex2ifnet global variable in netisr0.

9 years agolib/libhammer: cleanups
Tomohiro Kusumi [Sun, 25 Jan 2015 14:13:04 +0000 (23:13 +0900)]
lib/libhammer: cleanups

Using pointer dereference instead of several mntbuf[curmount].f_xxx
makes code clear and also makes lines fit within 80 characters.

9 years agolib/libhammer: cleanups
Tomohiro Kusumi [Sun, 25 Jan 2015 13:41:59 +0000 (22:41 +0900)]
lib/libhammer: cleanups

This patch has some minor cleanups of libhammer.

hunk1: Remove parentheses
hunk2: Remove parentheses
hunk3: Remove forward declaration of obsolete function.
       find_pfs_mount() was re-implemented as a part of libhammer
       and commit 4f09feab replaces it with libhammer version.

9 years agolib/libhammer: fix minor memory leaks
Tomohiro Kusumi [Sun, 25 Jan 2015 13:38:50 +0000 (22:38 +0900)]
lib/libhammer: fix minor memory leaks

This patch fixes minor memory leaks of libhammer.

hunk1: This isn't necessary since it never gets here.
       _libhammer_malloc() exit(1) if it failed to calloc().
hunk2: Add missing close(fd).
hunk3: Add missing free(mntbuf).

9 years agohammer: some trivial fixes
Tomohiro Kusumi [Sat, 24 Jan 2015 15:55:21 +0000 (00:55 +0900)]
hammer: some trivial fixes

This patch fixes some trivial things.

hunk1: Cleanup incomplete sentence
hunk2: Sync comment with changes made in 4a2796f3
hunk3: Use right function name
hunk4: Add missing comment
hunk5: Add missing \n

Closes: #2777

9 years agobsd.*.mk: Fix bug when SRCS is explicitly defined empty
John Marino [Tue, 27 Jan 2015 22:20:44 +0000 (23:20 +0100)]
bsd.*.mk: Fix bug when SRCS is explicitly defined empty

There exists a valid possibility of setting a makefile to build a program
or library exclusively with OBJS defined.  In the case of bsd.prog.mk,
not defining SRCS will cause the definition of OBJS to be overwritten
with ${PROG}.c or ${PROG}.cc.  Defining SRCS as an empty list will stop
OBJS from being overwritten, but there's a bug.  It adds ".o" to the end
of the list.

For example:
======================
OBJS= first.o second.o
SRCS=
.include <bsd.prog.mk>
======================
make -V OBJS
first.o second.o .o

This is caused by a transformation assuming SRCS has at least one item
in the list.  It's fixed by only performing the transformation if SRCS
is not empty.  I'm adding this check to both bsd.prog.mk and bsd.lib.mk

9 years agolibc/sigaltstack: Return EPERM upon disabling the active stack, not EINVAL.
Sascha Wildner [Tue, 27 Jan 2015 21:54:57 +0000 (22:54 +0100)]
libc/sigaltstack: Return EPERM upon disabling the active stack, not EINVAL.

Per POSIX, FreeBSD and OpenBSD agree too. NetBSD doesn't, hmmm.

9 years agokernel/sound: Always create the devfs aliases when loading a sound driver.
Imre Vadasz [Tue, 27 Jan 2015 18:36:16 +0000 (19:36 +0100)]
kernel/sound: Always create the devfs aliases when loading a sound driver.

9 years agokernel/snd_hda: Fix module unloading.
Sascha Wildner [Tue, 27 Jan 2015 09:28:49 +0000 (10:28 +0100)]
kernel/snd_hda: Fix module unloading.

Submitted-by: ivadasz
9 years agokernel/snd_hda: Re-apply 6d233c5d040778c2655923f2a20676e7e519ceca.
Sascha Wildner [Tue, 27 Jan 2015 09:27:59 +0000 (10:27 +0100)]
kernel/snd_hda: Re-apply 6d233c5d040778c2655923f2a20676e7e519ceca.

It still occurs for us.

Pointed-out-by: ivadasz
9 years agoClarify message about 'make rescue' after installworld.
Sascha Wildner [Tue, 27 Jan 2015 08:12:20 +0000 (09:12 +0100)]
Clarify message about 'make rescue' after installworld.

9 years agoopenssh: Adjust DragonFly version to actual openssh p1 release date.
Robin Hahling [Tue, 27 Jan 2015 05:56:42 +0000 (06:56 +0100)]
openssh: Adjust DragonFly version to actual openssh p1 release date.