dragonfly.git
8 years agoLocal adjustments for OpenSSL-1.0.1p. DragonFly_RELEASE_4_0
Sascha Wildner [Thu, 9 Jul 2015 18:13:09 +0000 (20:13 +0200)]
Local adjustments for OpenSSL-1.0.1p.

8 years agoMerge remote-tracking branch 'crater/vendor/OPENSSL' into rel4_0
Sascha Wildner [Thu, 9 Jul 2015 19:19:33 +0000 (21:19 +0200)]
Merge remote-tracking branch 'crater/vendor/OPENSSL' into rel4_0

8 years agoImport OpenSSL 1.0.1p.
Sascha Wildner [Thu, 9 Jul 2015 17:41:59 +0000 (19:41 +0200)]
Import OpenSSL 1.0.1p.

Fixes CVE-2015-1793 (http://openssl.org/news/secadv_20150709.txt).

8 years agoSync zoneinfo database with tzdata2015e from ftp://ftp.iana.org/tz/releases
Sascha Wildner [Tue, 23 Jun 2015 21:24:02 +0000 (23:24 +0200)]
Sync zoneinfo database with tzdata2015e from ftp://ftp.iana.org/tz/releases

* africa: Morocco suspends DST from 2015-06-14 03:00 through
    2015-07-19 02:00, not 06-13 and 07-18 as we had guessed.
    (Thanks to Milamber.)

* northamerica: Assume Cayman Islands will observe DST starting next year,
    using US rules. Although it isn't guaranteed, it is the most likely.

* southamerica: Typo fix.

8 years agoRevert "<sys/cdefs.h>: Fix a typo introduced (in 2005) with 3d28a5332f9b5."
Sascha Wildner [Fri, 19 Jun 2015 15:51:27 +0000 (17:51 +0200)]
Revert "<sys/cdefs.h>: Fix a typo introduced (in 2005) with 3d28a5332f9b5."

This reverts commit 1336cdbff6122500bbdb9b90787e7b3f6599b6b9.

This fix exposed some bugs (notably that __LONG_LONG_SUPPORTED is
no longer defined for C++11, which broke a couple ports it seems).

So revert it. A more proper fix will be pushed to master.

Reported-by: Rimvydas Jasinskas <rimvydas.jasinskas@gmail.com>
8 years agokernel - Sync ehci controller with FreeBSD
Matthew Dillon [Fri, 19 Jun 2015 02:34:32 +0000 (19:34 -0700)]
kernel - Sync ehci controller with FreeBSD

* Sync ehci controller w/FreeBSD to FreeBSD 8c1b21d9ef,
  ehci.c and ehci.h only.

* Contains better fix for doorbell issue from FreeBSD devs.

* Fixes numerous ehci port issues that the older hack had not fixed.

Testing-by: tm512, dillon
8 years ago<sys/cdefs.h>: Fix a typo introduced (in 2005) with 3d28a5332f9b5.
Sascha Wildner [Sun, 14 Jun 2015 20:39:56 +0000 (22:39 +0200)]
<sys/cdefs.h>: Fix a typo introduced (in 2005) with 3d28a5332f9b5.

8 years agoopenssl: Adjust manual pages for 1.0.1o.
Sascha Wildner [Sat, 13 Jun 2015 16:30:32 +0000 (18:30 +0200)]
openssl: Adjust manual pages for 1.0.1o.

8 years agoMerge remote-tracking branch 'remotes/crater/vendor/OPENSSL' into rel4_0
Sascha Wildner [Sat, 13 Jun 2015 17:33:46 +0000 (19:33 +0200)]
Merge remote-tracking branch 'remotes/crater/vendor/OPENSSL' into rel4_0

8 years agoImport OpenSSL 1.0.1o.
Sascha Wildner [Sat, 13 Jun 2015 16:29:32 +0000 (18:29 +0200)]
Import OpenSSL 1.0.1o.

Fixes an HMAC ABI incompatibility which was introduced in 1.0.1n.

8 years agoopenssl: Adjust manual pages for 1.0.1n. v4.0.6
Sascha Wildner [Thu, 11 Jun 2015 19:06:39 +0000 (21:06 +0200)]
openssl: Adjust manual pages for 1.0.1n.

8 years agoMerge remote-tracking branch 'remotes/crater/vendor/OPENSSL' into rel4_0
Sascha Wildner [Thu, 11 Jun 2015 19:54:59 +0000 (21:54 +0200)]
Merge remote-tracking branch 'remotes/crater/vendor/OPENSSL' into rel4_0

8 years agoImport OpenSSL 1.0.1n.
Sascha Wildner [Thu, 11 Jun 2015 19:03:27 +0000 (21:03 +0200)]
Import OpenSSL 1.0.1n.

Fixes CVE-2015-1788, CVE-2015-1789, CVE-2015-1790, CVE-2015-1791,
and CVE-2015-1792.

Rejects DH handshakes with parameters shorter than 768 bits.

8 years agokernel - Fix improper OOM process kill when no swap configured
Matthew Dillon [Fri, 29 May 2015 16:38:13 +0000 (09:38 -0700)]
kernel - Fix improper OOM process kill when no swap configured

* The avail_shortage calculation used by the pageout demon to track
  whether enough pages could be retired had a degenerate case which
  caused the demon to improperly believe that the machine was out of
  memory when it wasn't.

* Generally would only happen if no swap was configured.

Reported-by: joris
8 years agolibc: Make generation of nslexer.c more robust.
Sascha Wildner [Fri, 15 May 2015 16:43:17 +0000 (18:43 +0200)]
libc: Make generation of nslexer.c more robust.

Quoting FreeBSD's r268620 commit msg:

Ensure that lex errors fail the build instead of being silently ignored
due to the piped call.  Also postpone the update of the nslexer.c file
until we are sure we have generated it properly.

[...]

In DragonFly, this issue was causing a buildworld to stall if certain
-W... warning options were added.

Taken-from: FreeBSD

9 years agoSync zoneinfo database with tzdata2015d from ftp://ftp.iana.org/tz/releases
Sascha Wildner [Sat, 25 Apr 2015 13:23:09 +0000 (15:23 +0200)]
Sync zoneinfo database with tzdata2015d from ftp://ftp.iana.org/tz/releases

Changes affecting future time stamps

* Egypt's spring-forward transition is at 24:00 on April's last Thursday,
    not 00:00 on April's last Friday.  2015's transition will therefore
    be on Thursday, April 30 at 24:00, not Friday, April 24 at 00:00.
    Similar fixes apply to 2026, 2037, 2043, etc.
    (Thanks to Steffen Thorsen.)

* Egypt will not observe DST in 2015 and will consider canceling it
    permanently.  For now, assume no DST indefinitely.
    (Thanks to Ahmed Nazmy and Tim Parenti.)

Changes affecting past time stamps

* The following changes affect some pre-1991 Chile-related time stamps
    in America/Santiago, Antarctica/Palmer, and Pacific/Easter.

      The 1910 transition was January 10, not January 1.

      The 1918 transition was September 10, not September 1.

      The UTC-4 time observed from 1932 to 1942 is now considered to be
      standard time, not year-round DST.

      Santiago observed DST (UTC-3) from 1946-07-15 through 1946-08-31,
      then reverted to standard time, then switched its time zone to
      UTC-5 on 1947-04-01.

      Assume transitions before 1968 were at 00:00, since we have no data
      saying otherwise.

      The spring 1988 transition was 1988-10-09, not 1988-10-02.
      The fall 1990 transition was 1990-03-11, not 1990-03-18.

      Assume no UTC offset change for Pacific/Easter on 1890-01-01,
      and omit all transitions on Pacific/Easter from 1942 through 1946
      since we have no data suggesting that they existed.

    One more zone has been turned into a link, as it differed
    from an existing zone only for older time stamps.  As usual,
    this change affects UTC offsets in pre-1970 time stamps only.
    The affected zone is America/Montreal.

* America/Whitehorse switched from UTC-9 to UTC-8 on 1967-05-28, not
    1966-07-01.  Also, Yukon's time zone history is documented better.
    (Thanks to Brian Inglis and Dennis Ferguson.)

Change affecting past and future time zone abbreviations

* The abbreviations for Hawaii-Aleutian standard and daylight times
    have been changed from HAST/HADT to HST/HDT, as per US Government
    Printing Office style.  This affects only America/Adak since 1983,
    as America/Honolulu was already using the new style.

9 years agovirtio: Bring in SVN r251769 from FreeBSD.
Nuno Antunes [Sun, 12 Apr 2015 08:47:56 +0000 (09:47 +0100)]
virtio: Bring in SVN r251769 from FreeBSD.

* Fixes the following occasional log message when booting:
"vtnet0: error setting host MAC filter table"

* Original FreeBSD commit message below.

QEMU 1.4 made the descriptor requirement stricter - the size of buffer
descriptor must exactly match the number of MAC addresses provided.

Reported-by: nans_nans1@yahoo.de
Fix-pointed-out-by: Brian Venteicher <bryanv@daemoninthecloset.org>
9 years agokernel - Bring in dff23c692 from FreeBSD
Matthew Dillon [Sat, 28 Mar 2015 22:15:14 +0000 (15:15 -0700)]
kernel - Bring in dff23c692 from FreeBSD

Bring in a commit further strengthening iret/%gs handling.  FreeBSD also
made a followup commit that fixes their signal handler for stack faults
which we already effectively implement and did not need.

Original commit message is

    The #ss fault handler erronously does not check for the fault
    originated from the return to usermode. #ss must be handled same as
    #np.

9 years agomail(1): call sendmail, not send-mail
John Marino [Sat, 28 Mar 2015 16:11:53 +0000 (17:11 +0100)]
mail(1): call sendmail, not send-mail

This is a partial MFC of 82c94b79bf89c02cf6a1b0cd528be2e0340facfc .
It is needed because MTA directions fail on 4.0.x due to send-mail
still being identified by mail in that Release.

9 years agoacpi: Don't set non-exist EXT IRQ
Sepherosa Ziehau [Thu, 22 Jan 2015 01:33:04 +0000 (09:33 +0800)]
acpi: Don't set non-exist EXT IRQ

Certain mobo, e.g. gigabyte H97N-WIFI, reports EXT IRQ 37 and 38,
which do not exist at all (max legacy IRQ is 23).  Don't set bus
resource for this kind of IRQ resources.

Tested-by: dillon@
9 years agoSync zoneinfo database with tzdata2015b from ftp://ftp.iana.org/tz/releases
Sascha Wildner [Tue, 24 Mar 2015 17:25:05 +0000 (18:25 +0100)]
Sync zoneinfo database with tzdata2015b from ftp://ftp.iana.org/tz/releases

Changes affecting future time stamps

* Mongolia will start observing DST again this year, from the last Saturday
  in March at 02:00 to the last Saturday in September at 00:00.
  (Thanks to Ganbold Tsagaankhuu.)

* Palestine will start DST on March 28, not March 27.  Also,
    correct the fall 2014 transition from September 26 to October 24.
    Adjust future predictions accordingly.  (Thanks to Steffen Thorsen.)

Changes affecting past time stamps

* The 1982 zone shift in Pacific/Easter has been corrected, fixing a 2015a
    regression.  (Thanks to Stuart Bishop for reporting the problem.)

* 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: America/Antigua, America/Cayman,
    Pacific/Midway, and Pacific/Saipan.

Changes affecting time zone abbreviations

* Correct the 1992-2010 DST abbreviation in Volgograd from "MSK" to "MSD".
    (Thanks to Hank W.)

Changes affecting commentary

* Cite the recent Mexican decree changing Quintana Roo's time zone.
    (Thanks to Carlos Raúl Perasso.)

* Likewise for the recent Chilean decree.  (Thanks to Eduardo Romero Urra.)

* Update info about Mars time.

9 years agoopenssl: In the README.DRAGONFLY, note that the date needs updating too. v4.0.5
Sascha Wildner [Thu, 19 Mar 2015 19:18:41 +0000 (20:18 +0100)]
openssl: In the README.DRAGONFLY, note that the date needs updating too.

9 years agoopenssl: Adjust manual pages for 1.0.1m.
Sascha Wildner [Thu, 19 Mar 2015 19:18:10 +0000 (20:18 +0100)]
openssl: Adjust manual pages for 1.0.1m.

9 years agoMerge remote-tracking branch 'crater/vendor/OPENSSL' into rel4_0
Sascha Wildner [Thu, 19 Mar 2015 20:22:12 +0000 (21:22 +0100)]
Merge remote-tracking branch 'crater/vendor/OPENSSL' into rel4_0

9 years agoImport OpenSSL 1.0.1m.
Sascha Wildner [Thu, 19 Mar 2015 20:01:12 +0000 (21:01 +0100)]
Import OpenSSL 1.0.1m.

Fixes CVE-2015-0286, CVE-2015-0287, CVE-2015-0289, CVE-2015-0293,
CVE-2015-0209, and CVE-2015-0288.

9 years agolibc/realpath: Better POSIX conformance regarding ENOENT and ENOTDIR.
Sascha Wildner [Wed, 18 Mar 2015 18:32:04 +0000 (19:32 +0100)]
libc/realpath: Better POSIX conformance regarding ENOENT and ENOTDIR.

This fixes the "Test keywords with arguments" test of pkg(8), too.

Reported-by: Robin Hahling <robin.hahling@gw-computing.net>
Fix-pointed-out-by: bapt@freebsd
Taken-from:         FreeBSD

9 years agolibc/inet: Add a missing errno on failure.
Sascha Wildner [Sun, 15 Mar 2015 21:40:02 +0000 (22:40 +0100)]
libc/inet: Add a missing errno on failure.

Taken-from: FreeBSD (r261602)

9 years agokernel/netgraph7: Add missing braces.
Sascha Wildner [Thu, 12 Mar 2015 20:53:35 +0000 (21:53 +0100)]
kernel/netgraph7: Add missing braces.

9 years agonet/if_lagg: Fix compilation error caused by MFC v4.0.4
Markus Pfeiffer [Thu, 5 Mar 2015 22:30:23 +0000 (22:30 +0000)]
net/if_lagg: Fix compilation error caused by MFC

callout_init_lk does not exist in RELEASE, and hence we go
back to callout_init_mp. This is non-consequential, since the
callout function is empty at the moment anyway.

9 years agonet/if_lagg: Fix double-free issue
Markus Pfeiffer [Thu, 26 Feb 2015 15:24:45 +0000 (15:24 +0000)]
net/if_lagg: Fix double-free issue

9 years agonetif/if_lagg: Fix panic on MOD_UNLOAD
Markus Pfeiffer [Thu, 26 Feb 2015 12:39:16 +0000 (12:39 +0000)]
netif/if_lagg: Fix panic on MOD_UNLOAD

Remove one instance of if_clone_detach being called.

Reported-By: bycn82 <bycn82@gmail.com>
9 years agoinstaller: Remove some more initrd creation code.
Sascha Wildner [Tue, 3 Mar 2015 20:38:04 +0000 (21:38 +0100)]
installer: Remove some more initrd creation code.

After my revert, this original mkinitrd code (for encrypted setup
originally) came back. Since we can now rely on the ISO having an
initrd to be installed already, we can remove this too.

9 years agonrelease: Solve the initial initrd creation better.
Sascha Wildner [Tue, 3 Mar 2015 20:19:09 +0000 (21:19 +0100)]
nrelease: Solve the initial initrd creation better.

Hard links in cd9660, while not taking up more space in the ISO or on
the CD, all have distinct inode numbers, which causes them to be treated
like individual files when copying them somewhere. This caused the initrd
to overflow when we built it from the installer after booting from the
ISO.

This commit puts initrd creation into the nrelease process instead, making
use of mkinitrd(8)'s -c option which allows us to override the contents
directory to the ${ISOROOT}'s /usr/share/initrd.

Reported-by: opvalues
Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/2798>

9 years agomkinitrd(8): Add a -c option to override the contents directory.
Sascha Wildner [Tue, 3 Mar 2015 20:11:39 +0000 (21:11 +0100)]
mkinitrd(8): Add a -c option to override the contents directory.

9 years agoRevert "installer: Create an initial initrd unconditionally."
Sascha Wildner [Tue, 3 Mar 2015 18:15:20 +0000 (19:15 +0100)]
Revert "installer: Create an initial initrd unconditionally."

This reverts commit 0c69777ed12f9dff4a80f46f9ef730837791cf33.

Due to shortcomings of the CD9660 filesystems, hardlinks end up
having different inode numbers on it, which leads to them being
treated like separate files when copying etc.

As a result, the initrd put together by mkinitrd from a CD9660
would end up being around 230MB large where it actually has to
be below 15MB.

We will solve this in nrelease instead, putting together the
initrd from the building machine.

9 years agonrelease: Remove an unneeded comma.
Sascha Wildner [Tue, 3 Mar 2015 17:28:56 +0000 (18:28 +0100)]
nrelease: Remove an unneeded comma.

9 years agomake.conf: WITH_NEW_XORG and WITH_KMS are no longer required
François Tigeot [Thu, 8 Jan 2015 17:34:13 +0000 (18:34 +0100)]
make.conf: WITH_NEW_XORG and WITH_KMS are no longer required

9 years agokernel/scsi: Fix sense information printing in bootverbose.
Sascha Wildner [Sat, 28 Feb 2015 19:55:30 +0000 (20:55 +0100)]
kernel/scsi: Fix sense information printing in bootverbose.

9 years agoudp: Disable direct detach, if multicast options are set.
Sepherosa Ziehau [Wed, 25 Feb 2015 03:17:35 +0000 (11:17 +0800)]
udp: Disable direct detach, if multicast options are set.

Add additional comment about disabling direct detach when setting
multicast options.

Submitted-by: Romick
DragonFly-bug: http://bugs.dragonflybsd.org/issues/2792

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 agoRevert "hammer - Fix 'history' directive"
Antonio Huete Jimenez [Mon, 16 Feb 2015 15:02:59 +0000 (16:02 +0100)]
Revert "hammer - Fix 'history' directive"

This reverts commit 417cb1b104fd140d4e31775d8873ad473216f7e4 which
broke the behaviour described in the manpage.

Spotted-by: tkusumi
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 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 agohammer - cleanup arg names in procedural prototypes - PR 2770 v4.0.3
Matthew Dillon [Sat, 17 Jan 2015 21:00:13 +0000 (13:00 -0800)]
hammer - cleanup arg names in procedural prototypes - PR 2770

* Cleanup procedural prototypes to match code.

Submitted-by: tkusumi PR/2770.
9 years agohammer - bring-in cleanup from PR 2771 and 2772
Matthew Dillon [Sat, 17 Jan 2015 20:46:01 +0000 (12:46 -0800)]
hammer - bring-in cleanup from PR 2771 and 2772

* Bring in a macro/inline cleanup that makes the code
  a bit more clear.

Submitted-by: tkusumi
9 years agosys/vfs/hammer: fix comments
Tomohiro Kusumi [Mon, 5 Jan 2015 10:03:25 +0000 (19:03 +0900)]
sys/vfs/hammer: fix comments

This patch fixes typo in comments. On-memory record structure hammer_record
is being removed from on-memory RB-Tree, not on-disk B-Tree.

9 years agosbin/hammer: fix output of hammer blockmap command
Tomohiro Kusumi [Thu, 27 Nov 2014 18:40:53 +0000 (03:40 +0900)]
sbin/hammer: fix output of hammer blockmap command

- Correctly name the zone being dumped.

Closes: #2740

9 years agosbin/hammer: fix counter-intuitive output of hammer show command
Tomohiro Kusumi [Tue, 30 Dec 2014 23:16:28 +0000 (08:16 +0900)]
sbin/hammer: fix counter-intuitive output of hammer show command

- Change 'hammer show' ELM output to match the comparison order in the
  RB tree cmp functions.

Closes: #2755

9 years agosys/vfs/hammer: cleanup using existing macro
Tomohiro Kusumi [Fri, 26 Dec 2014 20:38:02 +0000 (05:38 +0900)]
sys/vfs/hammer: cleanup using existing macro

- This patch is a cleanup with no change to behavior of
  hammer_ip_check_directory_empty().
- Using existing macro as well as a new macro HAMMER_RECTYPE_ENTRY_START
  (in the same fashion as HAMMER_RECTYPE_CLEAN_START) makes it easier to
  understand what this function is doing (just like other functions that
  use both key_beg/key_end do).

Closes: #2752

9 years agosys/vfs/hammer: fix off-by-one error in hammer volume-add ioctl
Tomohiro Kusumi [Sun, 18 Jan 2015 18:26:47 +0000 (03:26 +0900)]
sys/vfs/hammer: fix off-by-one error in hammer volume-add ioctl

- This patch should fix off-by-one error regarding maximum volume number.
- Correct how hammer_ioc_volume_add() tests current # of volumes before
  it adds a new volume.

Closes: #2773

9 years agosbin/hammer: remove obsolete "spike" code from hammer show command
Tomohiro Kusumi [Wed, 7 Jan 2015 12:45:43 +0000 (21:45 +0900)]
sbin/hammer: remove obsolete "spike" code from hammer show command

- Remove spike related code from print_btree_node() as it is no longer
  relevant since commit 47197d.
- Not calling print_btree_node() twice makes 'show' directive more
  efficient.

Closes: #2761

9 years agosys/vfs/hammer: fix comments regarding obsolete "spike" code
Tomohiro Kusumi [Thu, 8 Jan 2015 12:29:12 +0000 (21:29 +0900)]
sys/vfs/hammer: fix comments regarding obsolete "spike" code

- This patch fixes comments regarding "spike" code that only existed in
  early days of hammer development.
- The spike comments have been left unchanged even after the code was
  removed in 47197d71536907482d2d215e222600eed3aedc0e.

Closes: #2764

9 years agosbin/hammer: fix potential memory leak
Tomohiro Kusumi [Mon, 12 Jan 2015 16:37:09 +0000 (01:37 +0900)]
sbin/hammer: fix potential memory leak

- This patch properly frees calloc/malloced memory.

Closes: #2766

9 years agosys/vfs/hammer: make btree_search() climb up btree slightly faster
Tomohiro Kusumi [Thu, 8 Jan 2015 15:13:59 +0000 (00:13 +0900)]
sys/vfs/hammer: make btree_search() climb up btree slightly faster

- This cleanup patch lets cursor climb up deep/fat btree slightly faster
  (lightweight), if not slower.
- Remove a duplicate check that traces back to a moment where there was
  btree_node_is_almost_full() and the differentiation was needed.

Closes: #2765

9 years agohammer - Fix timeout for 'dedup' directive
Antonio Huete Jimenez [Thu, 8 Jan 2015 11:30:05 +0000 (12:30 +0100)]
hammer - Fix timeout for 'dedup' directive

- 'hammer dedup' did not stop on timeout set by -t option.
- As the deduplication itself works by comparing one reference
  base element against a candidate base element, hammer(8) collects
  all the elements to be deduplicated and actually perform the needed
  ioctl() calls to make it happen. This is why the SIGALRM code has to
  be handled from within hammer(8).

Reported by: ftigeot
DragonFly-bug: <http://bugs.dragonflybsd.org/issues/2759>

9 years agovkernel - Forward SIGTERM to the child vkernel process.
Antonio Huete Jimenez [Mon, 29 Dec 2014 14:42:47 +0000 (15:42 +0100)]
vkernel - Forward SIGTERM to the child vkernel process.

- Fixes a problem that occurred when sending SIGTERM to the
  parent vkernel process. It died and left child running in
  the background instead of initiating the shutdown.

9 years agosavecore - Fix a resource leak
Antonio Huete Jimenez [Thu, 18 Dec 2014 23:20:24 +0000 (00:20 +0100)]
savecore - Fix a resource leak

- Detected by cppcheck

9 years agolibc/regex - Fix a memory leak
Antonio Huete Jimenez [Thu, 18 Dec 2014 22:17:30 +0000 (23:17 +0100)]
libc/regex - Fix a memory leak

- Detected by cppcheck

9 years agolibc/db - Fix a resource leak
Antonio Huete Jimenez [Thu, 18 Dec 2014 22:01:13 +0000 (23:01 +0100)]
libc/db - Fix a resource leak

- Detected by cppcheck

9 years agolibc - Initialise ret before use
Antonio Huete Jimenez [Thu, 18 Dec 2014 21:41:45 +0000 (22:41 +0100)]
libc - Initialise ret before use

9 years agohammer - Fix 'history' directive
Antonio Huete Jimenez [Tue, 9 Dec 2014 00:10:27 +0000 (01:10 +0100)]
hammer - Fix 'history' directive

- Directive options '@offset,len' work now as they are
  supposed to.

9 years agokernel/ath: Add missing braces (FreeBSD's r277290).
Sascha Wildner [Sat, 17 Jan 2015 08:05:56 +0000 (09:05 +0100)]
kernel/ath: Add missing braces (FreeBSD's r277290).

9 years agoopenssl: Adjust manual pages for 1.0.1l.
Sascha Wildner [Thu, 15 Jan 2015 20:25:46 +0000 (21:25 +0100)]
openssl: Adjust manual pages for 1.0.1l.

9 years agoMerge branch 'vendor/OPENSSL' into rel4_0
Sascha Wildner [Thu, 15 Jan 2015 21:19:46 +0000 (22:19 +0100)]
Merge branch 'vendor/OPENSSL' into rel4_0

9 years agoImport OpenSSL-1.0.1l.
Sascha Wildner [Thu, 15 Jan 2015 20:22:00 +0000 (21:22 +0100)]
Import OpenSSL-1.0.1l.

* Fixes for CVE-2014-3571, CVE-2015-0206, CVE-2014-3569, CVE-2014-3572,
  CVE-2015-0204, CVE-2015-0205, CVE-2014-8275 and CVE-2014-3570.

* Ensure that the session ID context of an SSL is updated when its
  SSL_CTX is updated via SSL_set_SSL_CTX.

* Do not resume sessions on the server if the negotiated protocol
  version does not match the session's version.

* Tighten handling of the ChangeCipherSpec (CCS) message.

* Tighten client-side session ticket handling during renegotiation.

Also, while here, remove the doc/ subdirectory on the vendor branch.
We don't need to distribute it in contrib/.

9 years agolibedit: Install and use the correct <histedit.h>.
Sascha Wildner [Thu, 15 Jan 2015 10:15:19 +0000 (11:15 +0100)]
libedit: Install and use the correct <histedit.h>.

Ever since libedit was moved to contrib/ back in May 2012 (c22639f2f9ab7)
we were still installing the previous <histedit.h> from /usr/src/include.

9 years agokernel: Hide the intrmask_t typedef from userspace with #ifdef _KERNEL.
Imre Vadasz [Tue, 13 Jan 2015 21:26:32 +0000 (22:26 +0100)]
kernel: Hide the intrmask_t typedef from userspace with #ifdef _KERNEL.

9 years agokernel: Remove stray SYSCTL_XUNLOCK from sysctl_sysctl_debug_dump_node().
Imre Vadasz [Thu, 8 Jan 2015 22:53:22 +0000 (23:53 +0100)]
kernel: Remove stray SYSCTL_XUNLOCK from sysctl_sysctl_debug_dump_node().

9 years agokernel/acpi: Add missing ACPI_LOCK_INIT in acpi_thermal.
Imre Vadasz [Thu, 8 Jan 2015 21:04:02 +0000 (22:04 +0100)]
kernel/acpi: Add missing ACPI_LOCK_INIT in acpi_thermal.

9 years agodrm - Fix deadlock in ttm pager
Matthew Dillon [Sat, 10 Jan 2015 17:35:24 +0000 (09:35 -0800)]
drm - Fix deadlock in ttm pager

* Fix a deadlock which most often occurs via the ttm (radeon) VM pager.
  A similar path is also used by i915 (all intel).

* Basically removes an unnecessary lock in the paging path which was creating
  the deadlock.

Reported-by: ivadasz, ftigeot
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