4 years agoiwn: fix compilation without INVARIANTS DragonFly_RELEASE_3_4
Johannes Hofmann [Sat, 9 Nov 2013 20:13:49 +0000 (21:13 +0100)]
iwn: fix compilation without INVARIANTS

wlan_serializer is now held consistently, so we can get rid
of the conditional locking which breaks building without

noticed-by: Andrey Oktyabrskiy

4 years agoppp(8): Fix a logic error.
Sascha Wildner [Wed, 16 Oct 2013 04:15:50 +0000 (06:15 +0200)]
ppp(8): Fix a logic error.

MPPE only accepts protocol numbers 0x21 through 0xfa.

Confirmed-by: FreeBSD
4 years agolibc/nftw: Bring in some fixes from FreeBSD.
Sascha Wildner [Wed, 16 Oct 2013 16:45:45 +0000 (18:45 +0200)]
libc/nftw: Bring in some fixes from FreeBSD.

* Silently skip directories causing loops (instead of erroring with ELOOP).

* Refresh OpenBSD CVS IDs.

* Don't check maxfds against OPEN_MAX.

4 years agobtx: Add FreeBSD's r256293 (fixes boot on Jetway NF81 mobo with RAID enabled).
Sascha Wildner [Tue, 15 Oct 2013 19:00:10 +0000 (21:00 +0200)]
btx: Add FreeBSD's r256293 (fixes boot on Jetway NF81 mobo with RAID enabled).

FreeBSD's commit msg:

Sanitize the %eflags returned by BIOS routines.  Some BIOS routines enter
protected mode and may leave protected-mode-specific flags like PSL_NT set
when they return to real mode.  This can cause a fault when BTX re-enters
protected mode after the BIOS mode returns.

Reported-by: Julian Pidancet <julian.pidancet@gmail.com>
Taken-from:  FreeBSD

4 years agokernel - Fix bug when running swapon a gpt slice
Matthew Dillon [Fri, 11 Oct 2013 19:44:03 +0000 (12:44 -0700)]
kernel - Fix bug when running swapon a gpt slice

* diskpsize() and related API functions to obtain the number of blocks
  in a disk specification was punting if there was no dragonfly disklabel.
  This path was being specifically used by swapon.

* Do not require a dragonfly disklabel when the whole-slice partition is
  specified (i.e. /dev/daXsY with no a...z suffix).

* Swapon now works on gpt swap slices.

Reported-by: julianp
4 years agoRestore ability to build Release 3.4 branch from master
John Marino [Mon, 7 Oct 2013 13:01:31 +0000 (15:01 +0200)]
Restore ability to build Release 3.4 branch from master

Currently it is not possible to build the Release 3.4 branch with a system
built from the head of the master branch.  The problem lies with libgrep
which attempts to define a symbol that now exists on the host system, so
bootstrapping grep fails.  This small patch will omit the wcwidth.c
source file if the host version is 503 (__DragonFly_version 300503) or
higher, and only when bootstrapping.  This fix is only applied to the 3.4
Release branch as it is not needed on the master branch.

4 years agolibc: Fix some warnings on the 3.4 RELEASE branch (unbreaks build).
Sascha Wildner [Fri, 27 Sep 2013 09:36:10 +0000 (11:36 +0200)]
libc: Fix some warnings on the 3.4 RELEASE branch (unbreaks build).

The recently MFC'd fix to enable warnings in libc uncovered them.

4 years agoacpi: Be lenient about unknown revision of FADT, MADT, XSDT and RSDT
Sepherosa Ziehau [Tue, 24 Sep 2013 05:52:41 +0000 (13:52 +0800)]
acpi: Be lenient about unknown revision of FADT, MADT, XSDT and RSDT

Revision 5 FADT is found on on ASRock H77 Pro4-M, which is beyond the
revision even in ACPI-4.0a.  Since length is checked for these tables,
this commit should be safe.

4 years agolibc: Raise WARNS to 1 and fix warnings.
Sascha Wildner [Mon, 23 Sep 2013 18:33:02 +0000 (20:33 +0200)]
libc: Raise WARNS to 1 and fix warnings.

* Raise the priorities of our constructor functions from 0 to 101 because
  0-100 are reserved priorities. This results in no change in object code
  (as per comparison using hexdump(1)).

* Fix a bug in the stack protector code.

* Provide a prototype for _pthread_init_early().

* Be less strict in the exclusion of gdtoa's files to also match the files
  outside contrib/ (in lib/libc/gdtoa/). Do the same for libc_rtld.

* Also fix an ignored attribute warning due to __thread being defined
  empty in libc_rtld.

Note that the most important aspect of this commit is that it causes libc
to no longer be built with -w (suppress all warnings). This was the result
of a hack we have to ignore warnings for gdtoa (which resides in contrib/).
But in conjunction with WARNS being 0 it led to -w being set for _all_
files of libc.

Removing -w causes all the warnings which are enabled by default (even
without any -W options) to trigger again, in addition the few -W options
that WARNS=1 actually sets.

Thanks to aggelos for useful clues.

4 years agombuf: Fix jcluster support
Sepherosa Ziehau [Fri, 13 Sep 2013 09:14:39 +0000 (17:14 +0800)]
mbuf: Fix jcluster support

- Free the jcluster to the correct objcache, which solves "jcluster mbuf"
  objcache exhaustion.
- By default, set the amount of the jclusters to half the amount of the
  normal clusters.  jcluster will be used on TCP sending path in the later
  commit to improve TSO performance for 10Ge.
- Add mbuf stat for jcluster; adjust netstat(1) to show it.
- Add m_getlj(), which will be used on TCP sending path in the later
  commit to improve TSO performnace for 10Ge.


4 years agoifnet - Compute iface statistics for NET_RT_IFLIST
Antonio Huete Jimenez [Tue, 10 Sep 2013 11:11:32 +0000 (04:11 -0700)]
ifnet - Compute iface statistics for NET_RT_IFLIST

  Before the ifnet statistics went per-cpu, they were being stored in
  ifnet->if_data. Some functions, like getifaddrs(3), expect them to
  be there so make sure they are available.

Reported by: Tim Bishop, Jens Rehsack

4 years agolibhammer_get_volinfo.3 - Use commas to separate functions names.
Antonio Huete Jimenez [Mon, 9 Sep 2013 11:44:08 +0000 (13:44 +0200)]
libhammer_get_volinfo.3 - Use commas to separate functions names.

4 years agolibhammer - Fix another memory leak.
Antonio Huete Jimenez [Sat, 7 Sep 2013 19:41:26 +0000 (21:41 +0200)]
libhammer - Fix another memory leak.

* Free a pointer when allocated by asprintf()

Spotted-by: swildner via cppcheck
4 years agolibhammer - Few fixes to libhammer_get_volinfo()
Antonio Huete Jimenez [Sat, 7 Sep 2013 17:49:47 +0000 (19:49 +0200)]
libhammer - Few fixes to libhammer_get_volinfo()

* Fix a couple memory leaks.
* Reword some comments.
* While here fix info.c file width to 80 columns.

4 years agolibsmb: Allow libsmb to detect if smbfs.ko is loaded.
Sascha Wildner [Wed, 4 Sep 2013 20:13:04 +0000 (22:13 +0200)]
libsmb: Allow libsmb to detect if smbfs.ko is loaded.

4 years agokernel/drm: Fix AGP detection for Matrox cards.
Sascha Wildner [Wed, 4 Sep 2013 16:18:59 +0000 (18:18 +0200)]
kernel/drm: Fix AGP detection for Matrox cards.

Since DRM drivers attach to vgapci, we need to look at the grandparent.

4 years agokernel/ed: Fix typo in a variable name.
Sascha Wildner [Fri, 30 Aug 2013 02:48:45 +0000 (04:48 +0200)]
kernel/ed: Fix typo in a variable name.

4 years agokernel: Add three missing ')', two of them in (yet) unused code. v3.4.3
Sascha Wildner [Mon, 26 Aug 2013 18:51:02 +0000 (20:51 +0200)]
kernel: Add three missing ')', two of them in (yet) unused code.

4 years agokernel - Do not try to apply certain hw errata fixes if in a VM guest
Matthew Dillon [Thu, 11 Jul 2013 22:44:41 +0000 (15:44 -0700)]
kernel - Do not try to apply certain hw errata fixes if in a VM guest

* Do not try to apply certain hw errata fixes (721) if in a VM guest.

Submitted-by: vsrinivas
4 years agokernel/cam: Fix I/O performance regression seen at least in VMware ESXi.
Sascha Wildner [Sun, 25 Aug 2013 18:15:37 +0000 (20:15 +0200)]
kernel/cam: Fix I/O performance regression seen at least in VMware ESXi.

This brings in FreeBSD's revisions 188570, 188670, 188671 and 188688.
188670 (most changed lines in the patch) is for debugging purposes only,
while 188570 and 188671 fix the actual issue and 188688 fixes gcc whining.

Reported-and-tested-by: Dongsheng Song <dongsheng.song@gmail.com>
Extra credit to vsrinivas who had actually pointed out 188570 to us a
while ago before it hit us now but at the time I hadn't noticed.

Quoting FreeBSD's commit messages:

In the case that the probe has determined that it can't query the device
for a serial number, fall through to the next case so that initial
negotiation still happens.  Without this, devices were showing up with
only 1 available tag opening, leading to observations of very poor I/O

This should fix problems reported with VMWare Fusion and ESX.  Early
generation MPT-SAS controllers with SATA disks might also be affected.
HP CISS controllers are also likely affected, as are many other
pseudo-scsi disk subsystems.

Fix parallel SCSI negotiation in the CAM_NEW_TRAN_CODE world order.
Overzealous sanity checks were locking the sync_rate and offset values
to zero, thanks to a twisty maze of recursive code.

4 years agokernel/amr: Move amrd (disk) adding before amrp (cam passthrough).
Sascha Wildner [Fri, 2 Aug 2013 17:58:28 +0000 (19:58 +0200)]
kernel/amr: Move amrd (disk) adding before amrp (cam passthrough).

This fixes a panic seen when amr/amrp were compiled into the kernel.

Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2575>
Reported-by: justin
Actual-fix-by: sephe
4 years agokernel: Add DRIVER_MODULE_ORDERED macro
Johannes Hofmann [Sun, 21 Jul 2013 19:40:31 +0000 (21:40 +0200)]

4 years agoMakefile.usr - Move fetch locations
Matthew Dillon [Fri, 19 Jul 2013 22:05:53 +0000 (15:05 -0700)]
Makefile.usr - Move fetch locations

* Move the bootstrap fetch from leaf:~marino to mirror-master

* Move the dports git fetch from ~marino's github to mirror-master
  (which currently clones it)

4 years agouname - Add -P and -PP for dports support
Matthew Dillon [Fri, 19 Jul 2013 22:05:17 +0000 (15:05 -0700)]
uname - Add -P and -PP for dports support

* Add options to generate dports-compatible ABI strings to stdout.
  Used by Makefile.usr.

4 years ago<sys/device.h>: Fix a typo in an extern declaration.
Sascha Wildner [Tue, 16 Jul 2013 17:32:46 +0000 (19:32 +0200)]
<sys/device.h>: Fix a typo in an extern declaration.

4 years agoradix: Unshare radix mask tree resources
Sepherosa Ziehau [Tue, 9 Jul 2013 08:27:14 +0000 (16:27 +0800)]
radix: Unshare radix mask tree resources

- Make free mask list per-cpu
- Embed mask last zeroed position into mask radix tree head

4 years agoSync zoneinfo database with tzdata2013d from ftp://ftp.iana.org/tz/releases
Sascha Wildner [Mon, 8 Jul 2013 22:11:01 +0000 (00:11 +0200)]
Sync zoneinfo database with tzdata2013d from ftp://ftp.iana.org/tz/releases

* africa: Morocco's midsummer transitions this year are July 7 and
    August 10, not July 9 and August 8. (Thanks to Andrew Paprocki.)

* asia: Israel now falls back on the last Sunday of October. (Thanks
    to Ephraim Silverberg.)

* iso3166.tab: Fix typos in the entries for country codes BQ and SX.

* zone.tab: Specify Jerusalem's location more precisely; this changes
    the pre-1880 times by 2 s.

* miscellaneous files: Deemphasize the significance of national borders.
    Update several URLs. Spelling fixes (thanks to Kevin Lyda and
    Jonathan Leffler).

4 years agokernel/usb4bsd: Fix ukbd's polled mode (for ddb etc.).
Sascha Wildner [Sun, 7 Jul 2013 11:04:00 +0000 (13:04 +0200)]
kernel/usb4bsd: Fix ukbd's polled mode (for ddb etc.).

4 years agoem: 82543 and 82542 could only suport 256 TX/RX descriptors
Sepherosa Ziehau [Mon, 24 Jun 2013 08:58:48 +0000 (16:58 +0800)]
em: 82543 and 82542 could only suport 256 TX/RX descriptors

5 years agolibc/fmtmsg: Check the correct variable against MM_NULLACT.
Sascha Wildner [Sat, 15 Jun 2013 07:42:48 +0000 (09:42 +0200)]
libc/fmtmsg: Check the correct variable against MM_NULLACT.

Taken-from: FreeBSD (r199046)

5 years agosystat/ip: Unbreak UDP stats
Sepherosa Ziehau [Fri, 14 Jun 2013 01:31:13 +0000 (09:31 +0800)]
systat/ip: Unbreak UDP stats

5 years agopcb: Allow kmalloc(WAITOK) to return in in_pcballoc()
Sepherosa Ziehau [Sun, 9 Jun 2013 02:45:48 +0000 (10:45 +0800)]
pcb: Allow kmalloc(WAITOK) to return in in_pcballoc()

The PCB kmalloc limit could be exceeded on local netperf TCP_CC with the
default MSL; panic is obviously not wanted under this situation.

5 years agokernel - Fix a case in the path lookup that results in high latencies
Matthew Dillon [Fri, 7 Jun 2013 22:13:21 +0000 (15:13 -0700)]
kernel - Fix a case in the path lookup that results in high latencies

* When many cpu cores are looking up paths with matching components,
  so as when doing a parallel buildworld or a parallel build of
  /usr/src/lib/libc, the namecache's shared/exclusive lock mechanic
  can break-down and create a chain-reaction of exclusive locks which
  destroys performance.

* When attempting to get a shared lock we were previously backing-down to
  an exclusive lock if the shared lock could not be obtained non-blocking.
  The original code could cause a chain-reaction of unnecessary exclusive

  Instead, we now only back-down to an exclusive lock only if the current
  thread already holds an exclusive lock on the same namecache entry
  or if we detect that another thread is trying to get an exclusive lock.
  Otherwise we fall-through and obtain the shared lock in a blocking manner.

Reported-by: ftigeot
5 years agocarp: Fix routes reset issue
Sepherosa Ziehau [Wed, 29 May 2013 12:41:40 +0000 (20:41 +0800)]
carp: Fix routes reset issue

Before this commit, routes related to carp or carp backing device were
reset, i.e. only prefix route was left, when carp state changed, e.g.
carp is down.

This commit fixes this routes reset issue by replacing the carp or carp
device routes' rt_ifa and rt_ifp with proper ifaddr and ifnet, instead
of discarding the old routes and installing the new prefix route.

Reported-by: robgar
5 years agocarp: Take netmask into consideration when picking up backing address
Sepherosa Ziehau [Wed, 29 May 2013 09:36:08 +0000 (17:36 +0800)]
carp: Take netmask into consideration when picking up backing address

5 years agocarp: Perfer addresses with prefix route installed.
Sepherosa Ziehau [Mon, 27 May 2013 14:24:50 +0000 (22:24 +0800)]
carp: Perfer addresses with prefix route installed.

5 years agokernel - Fix several bugs in FAIRQ
Matthew Dillon [Thu, 6 Jun 2013 06:52:02 +0000 (23:52 -0700)]
kernel - Fix several bugs in FAIRQ

* Fix several possible overflows due to high-valued machclk_freq constants
  and uint's that should have been uint64's.  Among other things this fixes
  bandwidth calculations that could previously get into weird states.

* Refactor the fairq_selectq() routine to fix numerous cases where the
  head of the queue could get advanced multiple times without pulling a
  packet off the queue, causing packets in queues to be excessively

Both of these were rather serious issues.  Operation is far smoother with
the bugs fixed.

5 years agokernel - Increase IFQ_MAXLEN from 50 to 250
Matthew Dillon [Thu, 6 Jun 2013 04:02:18 +0000 (21:02 -0700)]
kernel - Increase IFQ_MAXLEN from 50 to 250

* IFQ_MAXLEN is used as the default for numerous pseudo-network drivers.
  The value 50 is just too low.  Increase to 250.

5 years agocam(3): Fix a wrong check and bump WARNS to 2.
Sascha Wildner [Sat, 1 Jun 2013 10:36:34 +0000 (12:36 +0200)]
cam(3): Fix a wrong check and bump WARNS to 2.

5 years agofetch(1): Fix a wrong check that was always false.
Sascha Wildner [Sun, 26 May 2013 09:29:02 +0000 (11:29 +0200)]
fetch(1): Fix a wrong check that was always false.

5 years agokernel/mpt: Fix two operator precedence mistakes.
Sascha Wildner [Sun, 26 May 2013 19:59:06 +0000 (21:59 +0200)]
kernel/mpt: Fix two operator precedence mistakes.

5 years agokernel - Fix TDF_NOFAULT issue related to vm.read_shortcut_enable.
Matthew Dillon [Fri, 31 May 2013 06:16:29 +0000 (23:16 -0700)]
kernel - Fix TDF_NOFAULT issue related to vm.read_shortcut_enable.

* TDF_NOFAULT was not preventing vm_fault() from calling vm_wait_pfault(),
  which could result in a deadlock in the read_shortcut path.  A combination
  of a low-memory situation plus the read_shortcut hitting the vm_fault
  sequence from uiomove_nofault().

5 years agoem/emx: Unbreak vlan settings
Sepherosa Ziehau [Thu, 30 May 2013 12:33:21 +0000 (20:33 +0800)]
em/emx: Unbreak vlan settings

Obtained-from: FreeBSD

5 years agofix MXCSR default value v3.4.2
Markus Pfeiffer [Sat, 18 May 2013 14:56:47 +0000 (14:56 +0000)]
fix MXCSR default value

XEN fails to initialise its vcpus to behave like actual cpus. One
instance of this is that the MXCSR is not setup to the default
value documented in as documented in AMD64 Architecture
Programmer's Manual Volume 1: Application Programming, Section
Section 4.3.2

5 years agokernel -- x86_64: Do not set reserved bits in CR3.
Aggelos Economopoulos [Mon, 20 May 2013 18:56:07 +0000 (20:56 +0200)]
kernel -- x86_64: Do not set reserved bits in CR3.

The x86-64 platform code was setting PG_V, PG_U, and PG_RW bits in the
CR3 register. While the bits were supposed to cleared, Intel and AMD
hardware were ignoring them. Other x86-64 implementations, in
particular the software emulator in Linux's KVM, do check that these
reserved bits are zero.

Fixes issue running DragonFly x86_64 on KVM hosts without
two-dimensional (nested) paging.

Tested on a variety of real hardware (AMD FX(tm)-8150, c2q 6600, others)
and VM configurations (KVM on Intel/AMD hosts, Xen).

Committing-on-behalf-of: Venkatesh Srinivas <vsrinivas@ops101.org>
Reported-by: aggelos@, c.turner1, others.
Testing-by: aggelos@, swildner@, mneumann@, ftigeot@, profmakx@, Enjolras
Bug: 2561

5 years agolibc/citrus: Fix an assertion (& becomes &&).
Sascha Wildner [Sun, 26 May 2013 20:36:13 +0000 (22:36 +0200)]
libc/citrus: Fix an assertion (& becomes &&).

5 years agophantasia(6): Fix two operator precedence mistakes.
Sascha Wildner [Sun, 26 May 2013 19:59:37 +0000 (21:59 +0200)]
phantasia(6): Fix two operator precedence mistakes.

5 years agomrouted(8): Fix a wrong check that was always false.
Sascha Wildner [Sun, 26 May 2013 09:29:41 +0000 (11:29 +0200)]
mrouted(8): Fix a wrong check that was always false.

5 years agoip/udp: Make input source address and source port saving MPSAFE
Sepherosa Ziehau [Thu, 23 May 2013 07:29:24 +0000 (15:29 +0800)]
ip/udp: Make input source address and source port saving MPSAFE

Change the global variable udp_in, udp_in6 and udp_ip6 into stack variable
and passing them around.  This should unbreak applications which depend
on received datagrams' source address or source port.

5 years agoudp: Fix IP source address setting for multicast address bound socket (2)
Sepherosa Ziehau [Thu, 23 May 2013 05:35:07 +0000 (13:35 +0800)]
udp: Fix IP source address setting for multicast address bound socket (2)

Source address should _not_ be set to INADDR_ANY in udp_output(), which
will make udp_output() calculate wrong pseudo header checksum.  Instead
of letting IP to select the source address, we extend in_pcbladdr() to
always locate the laddr, and use this function to find the source address
in udp_output().

5 years agopf: Ask caller to recalculate packet hash, if nat/binat/rdr happens
Sepherosa Ziehau [Wed, 22 May 2013 13:27:41 +0000 (21:27 +0800)]
pf: Ask caller to recalculate packet hash, if nat/binat/rdr happens

This unbreaks redirect (rdr) to local address.

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

5 years agoixgbe: On transmit path, prepend the unconsumed mbuf to the if_snd
Sepherosa Ziehau [Tue, 21 May 2013 08:53:29 +0000 (16:53 +0800)]
ixgbe: On transmit path, prepend the unconsumed mbuf to the if_snd

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

5 years agosyncache: Avoid NULL accessing to tcpcb of the to-be-dropped syncache
Sepherosa Ziehau [Mon, 20 May 2013 13:44:32 +0000 (21:44 +0800)]
syncache: Avoid NULL accessing to tcpcb of the to-be-dropped syncache

It is possible that the syncache tcpcb is NULL when overflow happens,
e.g. the corresponding listen socket was closed but the timeout has
not recollected the staled syncache yet.

5 years agomsk: Disable MSI by default.
Sepherosa Ziehau [Mon, 20 May 2013 08:43:39 +0000 (16:43 +0800)]
msk: Disable MSI by default.

For certain chips, enabling it will cause watchdog timeout and the chip
may not be able to work again w/o rebooting.

Reported-by: ferz
5 years agobmake: Fix wildcard srcs for phony targets
John Marino [Sat, 18 May 2013 20:48:24 +0000 (22:48 +0200)]
bmake: Fix wildcard srcs for phony targets

Bug fix created by Simon G. at BSDcan 2013 when Baptiste mentioned the
incompatiblity with legacy make seen during adding support to ports for
bmake.  There is no impaet for world/kernel builds.

Taken-from: FreeBSD SVN 250773 (18 May 2013)

5 years agokernel - Fix devfs deadlock
Matthew Dillon [Tue, 14 May 2013 17:44:36 +0000 (10:44 -0700)]
kernel - Fix devfs deadlock

* Fix a devfs deadlock against getnewvnode() due to the devfs master
  lock being held.

* Most evident on 32-bit builds because 64-bit builds don't recycle vnodes
  as quickly.

Reported-by: marino
Analysis-by: vsrinivas
5 years agotop(1): Support wider terminals (Bug 2448)
John Marino [Tue, 14 May 2013 10:21:30 +0000 (12:21 +0200)]
top(1): Support wider terminals (Bug 2448)

Bump MAX_COLS from value of 255 to 512 to support wider terminals.
A similar change was also done on FreeBSD 5 months ago (r244180)

Reported-by: Charles Rapenne

5 years agokernel - Wakeup p->p_step on procfs close.
Matthew Dillon [Wed, 8 May 2013 23:11:55 +0000 (16:11 -0700)]
kernel - Wakeup p->p_step on procfs close.

* Wakeup p->p_step in addition to p->p_stype on procfs close.

Reported-by: vsrinivas
5 years agokernel/ng_iface: Add missing braces.
Sascha Wildner [Sat, 27 Apr 2013 01:03:29 +0000 (03:03 +0200)]
kernel/ng_iface: Add missing braces.

5 years agokernel/hptiop: Add missing braces.
Sascha Wildner [Sat, 27 Apr 2013 00:57:05 +0000 (02:57 +0200)]
kernel/hptiop: Add missing braces.

5 years agogpio/dsched/devfs: Fix wrong lock checks. v3.4.0 v3.4.1
Sascha Wildner [Tue, 23 Apr 2013 22:15:05 +0000 (00:15 +0200)]
gpio/dsched/devfs: Fix wrong lock checks.

5 years agoSync zoneinfo database with tzdata2013c from ftp://ftp.iana.org/tz/releases
Sascha Wildner [Mon, 22 Apr 2013 18:08:50 +0000 (20:08 +0200)]
Sync zoneinfo database with tzdata2013c from ftp://ftp.iana.org/tz/releases

* antarctica/australasia/zone.tab: Fix times of habitation for Macquarie
    to agree with the Tasmania Parks & Wildlife Service history, which
    indicates that permanent habitation was 1899-1919 and 1948 on. It is
    politically part of Australia, not Antarctica. (Thanks to Tobias
    Conradi.) Also, sort Macquarie more consistently with other parts of
    Australia. (Thanks to Tim Parenti.)

* asia: Palestine observed DST starting March 29, 2013. (Thanks to
    Steffen Thorsen.)  From 2013 on, Gaza and Hebron both observe DST,
    with the predicted rules being the last Thursday in March at 24:00
    to the first Friday on or after September 21 at 01:00. Also, fix
    some historical data for Palestine to agree with that of

* southamerica: Assume that the recent change to Paraguay's DST rules is
    permanent, by moving the end of DST to the 4th Sunday in March every
    year. (Thanks to Carlos Raul Perasso.)

5 years ago/usr/Makefile: Fix wrong indentation.
Sascha Wildner [Mon, 22 Apr 2013 08:30:38 +0000 (10:30 +0200)]
/usr/Makefile: Fix wrong indentation.

5 years agonrelease: Handle dports' /usr/distfiles better and remove /usr/dports.
Sascha Wildner [Sun, 21 Apr 2013 11:27:29 +0000 (13:27 +0200)]
nrelease: Handle dports' /usr/distfiles better and remove /usr/dports.

5 years agonrelease: Add pkg(8) to our images and ISOs.
Sascha Wildner [Sun, 21 Apr 2013 09:15:06 +0000 (11:15 +0200)]
nrelease: Add pkg(8) to our images and ISOs.

'make release' now requires an additional directory with the dports tree.

This commit adds some more steps (such as running 'pkg autoremove').

In-discussion-with: marino

5 years agonrelease: Remove an unused variable.
Sascha Wildner [Sat, 20 Apr 2013 11:33:16 +0000 (13:33 +0200)]
nrelease: Remove an unused variable.

5 years agonrelease: Don't install the git meta-pkg (it will pull in gitk).
Sascha Wildner [Fri, 19 Apr 2013 15:53:25 +0000 (17:53 +0200)]
nrelease: Don't install the git meta-pkg (it will pull in gitk).

5 years agopowerd - Fix load factor calculation bug for niced processes
Matthew Dillon [Thu, 18 Apr 2013 17:17:49 +0000 (10:17 -0700)]
powerd - Fix load factor calculation bug for niced processes

* A type-o in the load calculation code was not counting niced
  processes at all, so if you have a lot of niced processes
  (like ffmpeg's which nice themselves down), powerd can wind
  up restricting them all to a single cpu.  Doh!

5 years agoAdded master branch linking as part of the 'make src-create*' commands.
Justin C. Sherrill [Thu, 18 Apr 2013 02:59:40 +0000 (22:59 -0400)]
Added master branch linking as part of the 'make src-create*' commands.

Suggested-by: John Marino <dragonflybsd@marino.st>
5 years agoMakefile.inc: Rework automatic backup (bug 2527)
John Marino [Tue, 16 Apr 2013 00:42:13 +0000 (02:42 +0200)]
Makefile.inc: Rework automatic backup (bug 2527)

There were three main problems with the recently added backup feature:
1. It didn't work over NFS
2. It didn't work when a non-root built world the second time
3. It didn't use DESTDIR which had potential to conflict backups

It also previously featured "NO_BACKUP" which turned off the automatic
backup feature.  To fix the #2 problem, the install timestamp has been
removed, so to avoid unwanted backups for multiple installworlds after
one buildworld, the user needs to pass NO_BACKUP in the command line.

This patch was contributed by Thomas Nikolajsen with minor modifications
added by John Marino.


5 years agokernel/checkpoint: Fix wrong sizeof (p_sigacts is a pointer).
Sascha Wildner [Tue, 16 Apr 2013 17:13:19 +0000 (19:13 +0200)]
kernel/checkpoint: Fix wrong sizeof (p_sigacts is a pointer).

5 years agokernel/ndis: Fix typo in DRIVER_MODULE().
Sascha Wildner [Tue, 16 Apr 2013 16:37:19 +0000 (18:37 +0200)]
kernel/ndis: Fix typo in DRIVER_MODULE().

5 years agomined(1): Fix alignment issue on strict alignment architectures.
Sascha Wildner [Sun, 7 Apr 2013 21:59:44 +0000 (23:59 +0200)]
mined(1): Fix alignment issue on strict alignment architectures.

Reported-by: Eitan Adler <eadler@freebsd.org>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2541>

5 years agomined.1: Move some info from CAVEATS to DESCRIPTION.
Sascha Wildner [Sun, 7 Apr 2013 21:04:53 +0000 (23:04 +0200)]
mined.1: Move some info from CAVEATS to DESCRIPTION.

mandoc(1) warns about CAVEATS not being in conventional order and
silencing it by moving the section would have caused it to be behind

However, the info is more important than the editor's history, so
instead add it to the DESCRIPTION, which is short in this case, anyway.

Reported-by: Eitan Adler <eadler@freebsd.org>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2540>

5 years agodevelopment.7: Mention dragonfly.vim.
Sascha Wildner [Tue, 2 Apr 2013 19:23:19 +0000 (21:23 +0200)]
development.7: Mention dragonfly.vim.

5 years agokernel - Disable the read_shortcut feature by default in -release
Matthew Dillon [Thu, 11 Apr 2013 03:50:19 +0000 (20:50 -0700)]
kernel - Disable the read_shortcut feature by default in -release

* Disable the read_shortcut feature by default in -release.  It is fairly
  stable but there are currently two reports of deadlocks under heavy loads
  that have not been resolved.

  So for now the feature is disabled by default.  It can be enabled anytime
  via its sysctl on 64-bit machines for people who want to run with it

Reported-by: Peter Avalos <pavalos@dragonflybsd.org>, Francois Tigeot <ftigeot@wolfpond.org>
5 years agoAdd EXIT STATUS sections in some manual pages.
Sascha Wildner [Wed, 10 Apr 2013 17:10:53 +0000 (19:10 +0200)]
Add EXIT STATUS sections in some manual pages.

5 years agormdir.1: Add EXIT STATUS section and fix a typo.
Sascha Wildner [Wed, 10 Apr 2013 16:57:21 +0000 (18:57 +0200)]
rmdir.1: Add EXIT STATUS section and fix a typo.

5 years agoMakefile_upgrade.inc: Fix typo.
Sascha Wildner [Wed, 10 Apr 2013 16:12:08 +0000 (18:12 +0200)]
Makefile_upgrade.inc: Fix typo.

5 years agoioapic: Relocate IRQ if it hits SYSCALL entry
Sepherosa Ziehau [Wed, 10 Apr 2013 03:10:33 +0000 (11:10 +0800)]
ioapic: Relocate IRQ if it hits SYSCALL entry

The system hitting the "unused IRQ assertion" has 5x24 pin IOAPICs

Reported-by: ruse39
5 years agobce: BCM5716's MSI does not have bug either
Sepherosa Ziehau [Tue, 9 Apr 2013 09:18:31 +0000 (17:18 +0800)]
bce: BCM5716's MSI does not have bug either

5 years agoip/udp: Fix IP source address setting for multicast address bound socket
Sepherosa Ziehau [Tue, 9 Apr 2013 03:06:39 +0000 (11:06 +0800)]
ip/udp: Fix IP source address setting for multicast address bound socket

It is a common practice to bind UDP socket to multicast address to enjoy
kernel level destination multicast address and port filtering.  However,
if data are sent on this kind of socket, source address of the IP packet
will be the bound multicast address?!

Two fixes are added to address this bug:

1) Don't set IP source address in udp_output(), if the inpcb's laddr is
   multicast address.  Instead the IP source address is set to INADDR_ANY,
   so ip_output() could pick up a proper IP source address.

2) With 1) in place, it is possible that IP source address is INADDR_ANY
   before the ifnet.if_output() using following steps:
   - If the IP_MULTICAST_IF socket option is set to iface0
   - The iface0's last IP address is unset, before the ip_output()

   This condition could easily be reproduced by using test/mcast:
   mcast -m -p 3000 -i iface0_ip -D 10
   During the 10sec delay, wipe out all IP addresses from iface0

   Well, even without 1), raw IP still could generate IP packet using
   INADDR_ANY as source address.

   Two checks on the source IP address are added to ip_output() before
   - IP source address should not be INADDR_ANY
   - IP source address should not be multicast address

   And for multicast IP packets, if the IP source address could be
   determined, they will not be looped back and forwarded.

Reported-by: zeroxia
5 years agoip_output: Record the "src was INADDR_ANY" for multicast packets
Sepherosa Ziehau [Tue, 9 Apr 2013 02:32:22 +0000 (10:32 +0800)]
ip_output: Record the "src was INADDR_ANY" for multicast packets

While I'm here, fix the comment on the unicast packet output path.

5 years agoftp: Update files for tnftp-20121224 import.
Peter Avalos [Sun, 7 Apr 2013 04:55:23 +0000 (21:55 -0700)]
ftp: Update files for tnftp-20121224 import.

5 years agoMerge branch 'vendor/TNFTP' into DragonFly_RELEASE_3_4
Peter Avalos [Sun, 7 Apr 2013 05:01:35 +0000 (22:01 -0700)]
Merge branch 'vendor/TNFTP' into DragonFly_RELEASE_3_4

5 years agode: Reset chip after calling ether_ifattach()
Sepherosa Ziehau [Sun, 7 Apr 2013 04:57:49 +0000 (12:57 +0800)]
de: Reset chip after calling ether_ifattach()

Else the ifnet is not completely initialized

Reported-by: swildner@
5 years agoImport tnftp-20121224.
Peter Avalos [Sun, 7 Apr 2013 04:34:01 +0000 (21:34 -0700)]
Import tnftp-20121224.

* Add https support.
* When using the response to SYST to decide whether to default to
  'binary' be a lot less specific.

Obtained-from:   NetBSD

5 years agokernel/if_ndis: Grab the serializer around if_devstart().
Sascha Wildner [Fri, 5 Apr 2013 03:50:55 +0000 (05:50 +0200)]
kernel/if_ndis: Grab the serializer around if_devstart().

Submitted-by: sephe
5 years agoMerge branch 'DragonFly_RELEASE_3_4' of ssh://crater.dragonflybsd.org/repository...
Justin C. Sherrill [Wed, 3 Apr 2013 01:38:42 +0000 (21:38 -0400)]
Merge branch 'DragonFly_RELEASE_3_4' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into DragonFly_RELEASE_3_4


5 years agoAdjust branch in newvers.sh.
Sascha Wildner [Tue, 2 Apr 2013 20:12:26 +0000 (22:12 +0200)]
Adjust branch in newvers.sh.

5 years agokernel: Fix build without DDB.
Sascha Wildner [Tue, 2 Apr 2013 18:04:08 +0000 (20:04 +0200)]
kernel: Fix build without DDB.

5 years agoBump __DragonFly_version and the manpage version for 3.4.
Sascha Wildner [Tue, 2 Apr 2013 17:34:03 +0000 (19:34 +0200)]
Bump __DragonFly_version and the manpage version for 3.4.

5 years agore: Don't enable MSI by default even for PCI-e chips
Sepherosa Ziehau [Tue, 2 Apr 2013 03:14:02 +0000 (11:14 +0800)]
re: Don't enable MSI by default even for PCI-e chips

It causes more troubles than the benefits it brings for us; it causes
watchdog, due to loosing interrupt, on certain PCI-e chips.

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

5 years agoUpdating for DragonFly 3.4 branch. v3.4.0rc
Justin C. Sherrill [Tue, 2 Apr 2013 02:12:38 +0000 (22:12 -0400)]
Updating for DragonFly 3.4 branch.

5 years agokernel: Fix buildkernel without INVARIANTS.
Sascha Wildner [Mon, 1 Apr 2013 21:43:09 +0000 (23:43 +0200)]
kernel: Fix buildkernel without INVARIANTS.

Reported-by: Filippo Moretti <filippomore@yahoo.com>
5 years agomfi(4)/mfiutil(8): Add support for foreign configurations and drives.
Sascha Wildner [Mon, 1 Apr 2013 21:26:47 +0000 (23:26 +0200)]
mfi(4)/mfiutil(8): Add support for foreign configurations and drives.

For this, the following commands are added to mfiutil(8):

foreign scan - lists the number of foreign configs
foreign drives - lists the drives which are flagged as foreign
foreign display - displays the specified foreign configuration
foreign preview - previews the specified foreign configuration after import
foreign clear - clears the foreign configuration
foreign import - imports the foreign configuration

Foreign drive support has been added to 'show drives' too.

Tested-by: ftigeot
Taken-from: http://www.freebsd.org/cgi/query-pr.cgi?pr=172091

5 years agokernel/mfi: Add a tunable/sysctl to modify the command timeout.
Sascha Wildner [Mon, 1 Apr 2013 15:41:51 +0000 (17:41 +0200)]
kernel/mfi: Add a tunable/sysctl to modify the command timeout.

5 years agokernel: Make tty_compat.c optional in 'files' instead of in the source.
Sascha Wildner [Mon, 1 Apr 2013 20:14:06 +0000 (22:14 +0200)]
kernel: Make tty_compat.c optional in 'files' instead of in the source.

5 years agobsd.sys.mk: Add -Wmissing-include-dirs to WARNS >= 1.
Sascha Wildner [Mon, 1 Apr 2013 13:47:21 +0000 (15:47 +0200)]
bsd.sys.mk: Add -Wmissing-include-dirs to WARNS >= 1.

It ensures that all directories passed with -I<dir> actually exist.

5 years agolibc: Fix -Wmissing-include-dirs.
Sascha Wildner [Mon, 1 Apr 2013 13:45:00 +0000 (15:45 +0200)]
libc: Fix -Wmissing-include-dirs.