dragonfly.git
11 years agoaltq/hfsc: Fix wrong malloc size
Sepherosa Ziehau [Fri, 22 Feb 2013 07:16:36 +0000 (15:16 +0800)]
altq/hfsc: Fix wrong malloc size

Reported-by: pavalos@
11 years agomake upgrade: Remove another manpage (an MLINK) which has changed name.
Sascha Wildner [Mon, 11 Feb 2013 11:19:49 +0000 (12:19 +0100)]
make upgrade: Remove another manpage (an MLINK) which has changed name.

11 years agocsu: Fix .eh_frame_hdr errors seen on i386
John Marino [Mon, 18 Feb 2013 00:15:59 +0000 (01:15 +0100)]
csu: Fix .eh_frame_hdr errors seen on i386

The libcsu object files should have been generated with
-fno-asynchronous-unwind-tables.  The crtbegin*, crtend* objects,
specific to a compiler, were generated with this flag on both platforms
as seen in the vendor build.  This commit builds libcsu with the same
cflags on both platforms, and it allows the error frame header to get
built successfully.

This has been seen on i386 for a while, and later bug #2511 hit upon
it outside of the world build.

11 years agobsd.cpu.gcc47.mk: Add default cpu extensions
John Marino [Sat, 16 Feb 2013 12:48:47 +0000 (13:48 +0100)]
bsd.cpu.gcc47.mk: Add default cpu extensions

For the normal case, a standard MACHINE_CPU is supposed to be defined, but
that wasn't happening.  Copy code from bsd.cpu.gcc44.mk to fix dports
looking at MACHINE_CPU variable value.

11 years agobridge: Disable TSO on member interface
Sepherosa Ziehau [Wed, 13 Feb 2013 05:44:54 +0000 (13:44 +0800)]
bridge: Disable TSO on member interface

Report-by: dillon@
11 years agoUpdate files for OpenSSL-1.0.1e import.
Peter Avalos [Wed, 13 Feb 2013 17:25:31 +0000 (09:25 -0800)]
Update files for OpenSSL-1.0.1e import.

11 years agoMerge branch 'vendor/OPENSSL' into DragonFly_RELEASE_3_2
Peter Avalos [Wed, 13 Feb 2013 17:27:11 +0000 (09:27 -0800)]
Merge branch 'vendor/OPENSSL' into DragonFly_RELEASE_3_2

11 years agoImport OpenSSL-1.0.1e.
Peter Avalos [Wed, 13 Feb 2013 17:15:43 +0000 (09:15 -0800)]
Import OpenSSL-1.0.1e.

o Corrected fix for CVE-2013-0169.

11 years agoUpdate files for OpenSSL-1.0.1d import.
Peter Avalos [Sun, 10 Feb 2013 10:04:14 +0000 (02:04 -0800)]
Update files for OpenSSL-1.0.1d import.

11 years agoMerge branch 'vendor/OPENSSL' into DragonFly_RELEASE_3_2
Peter Avalos [Sun, 10 Feb 2013 11:10:16 +0000 (03:10 -0800)]
Merge branch 'vendor/OPENSSL' into DragonFly_RELEASE_3_2

11 years agoImport OpenSSL-1.0.1d.
Peter Avalos [Sun, 10 Feb 2013 09:23:52 +0000 (01:23 -0800)]
Import OpenSSL-1.0.1d.

      o Fix renegotiation in TLS 1.1, 1.2 by using the correct TLS version.
      o Fix OCSP bad key DoS attack CVE-2013-0166
      o Fix for SSL/TLS/DTLS CBC plaintext recovery attack CVE-2013-0169
      o Fix for TLS AESNI record handling flaw CVE-2012-2686

11 years agogames/atc: Fix a logic bug.
Sascha Wildner [Thu, 7 Feb 2013 19:05:52 +0000 (20:05 +0100)]
games/atc: Fix a logic bug.

The original logic should have really been:

if ((l < 'a' && l > 'z') || (l < 'A' && l > 'Z'))

But using islower()/isupper() is simpler and more readable.

Taken-from: NetBSD

11 years agokernel -- ffs: Softdep lock fix (lk unheld in process_worklist_item)
Venkatesh Srinivas [Wed, 30 Jan 2013 18:21:10 +0000 (10:21 -0800)]
kernel -- ffs: Softdep lock fix (lk unheld in process_worklist_item)

In process_worklist_item, from newdirrem/request_cleanup, the softdep
lock was not held before removing workitems. Make newdirrem take the
softdep lock around request_cleanup.

Reported-by: swildner@
Bug: 2501

11 years agoUnbreak world (gcc47 plugin)
John Marino [Sat, 2 Feb 2013 22:35:27 +0000 (23:35 +0100)]
Unbreak world (gcc47 plugin)

The installincludes target is run before "depend" target, so gtype.state
hasn't been created by the time "installincludes" is executed in stage 4.
Luckily there is a similar functionality for FILES that is executed at
the install phase, which will unbreak world (broken on previous commit).

Other headers are generated as well, so swap INCSGROUPS with FILESGROUPS
for everything to avoid having to figure which ones.  The headers are
needed at runtime, not buildtime, so this is okay.

11 years agogcc47: Fix plugin mechanism
John Marino [Sat, 2 Feb 2013 15:29:40 +0000 (16:29 +0100)]
gcc47: Fix plugin mechanism

There were two problems with gcc 4.7 LTO plugin:
1) It needed a number of object files from libiberty.
   Unfortunately the previous object files couldn't be used as they need
   to be built with -fPIC and libiberty is only an internal (non-pic) lib.
2) The plugin header directory was missing completely, as seen with
   gcc -print-file-name=plugin only returning "plugin".

11 years agolibstdc++47: Fix iostream bug 2478
John Marino [Thu, 31 Jan 2013 15:58:59 +0000 (16:58 +0100)]
libstdc++47: Fix iostream bug 2478

c++ iostreams were segfaulting -- apparently _M_table isn't defined in all
cases.  Fix inspired from FreeBSD configuration files.

https://bugs.dragonflybsd.org/issues/2478

11 years agokernel - Fix improper tmpfs resource limit check
Matthew Dillon [Wed, 23 Jan 2013 00:51:52 +0000 (16:51 -0800)]
kernel - Fix improper tmpfs resource limit check

* Fix an improper check that was causing tmpfs to blow up when used as
  backing store for a VN device.

Reported-by: tuxillo
11 years agoudp6: Remove pcb from wildcard table before calling in_pcbconnect
Sepherosa Ziehau [Wed, 23 Jan 2013 09:21:03 +0000 (17:21 +0800)]
udp6: Remove pcb from wildcard table before calling in_pcbconnect

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

11 years agokernel/amr: Extend the visibility of AMR_DEBUG.
Sascha Wildner [Tue, 22 Jan 2013 19:19:38 +0000 (20:19 +0100)]
kernel/amr: Extend the visibility of AMR_DEBUG.

Half the code was missing the setting of AMR_DEBUG in the config file
because its visibility was reduced to amr.c only.

Reported-by: tuxillo
11 years agom4: Sync with FreeBSD.
Peter Avalos [Tue, 15 Jan 2013 05:59:24 +0000 (21:59 -0800)]
m4: Sync with FreeBSD.

This improves compat with GNU m4 and brings the code closer to NetBSD
and OpenBSD.

Obtained-from:  FreeBSD

11 years agokernel/netgraph7: Remove <sys/ktr.h>. There's no DragonFly KTR here.
Sascha Wildner [Wed, 16 Jan 2013 20:14:31 +0000 (21:14 +0100)]
kernel/netgraph7: Remove <sys/ktr.h>. There's no DragonFly KTR here.

11 years agokernel/netgraph7: Add a missing header to the Makefile.
Sascha Wildner [Wed, 16 Jan 2013 20:19:44 +0000 (21:19 +0100)]
kernel/netgraph7: Add a missing header to the Makefile.

11 years agokernel/usb4bsd: Fix sizeof().
Sascha Wildner [Mon, 14 Jan 2013 18:22:58 +0000 (19:22 +0100)]
kernel/usb4bsd: Fix sizeof().

11 years agoVFS quota: hpfs is now read-only, remove support
François Tigeot [Fri, 23 Nov 2012 06:57:26 +0000 (07:57 +0100)]
VFS quota: hpfs is now read-only, remove support

11 years agohpfs - Fix a couple panics and a little cleanup.
Antonio Huete Jimenez [Thu, 22 Nov 2012 10:47:58 +0000 (11:47 +0100)]
hpfs - Fix a couple panics and a little cleanup.

* Fix compilation with HPFS_DEBUG.

* Fix a panic due CNP_PDIRUNLOCK flag not being cleared.

* Fix a panic where returned vnode after a lookup is not
  NULL in the ENOENT case.

* Disable write support completely. It was pretty minimal
  and operations like create or rename were not supported.

It has been tested with a filesystem created by OS/2 Warp 2.1.
Copying data out of it worked fine, but there is still an
outstanding issue with overlapping buffers.

11 years agokprintf(9): Implement optional 'precision' for numbers.
Sascha Wildner [Thu, 3 Jan 2013 18:14:38 +0000 (19:14 +0100)]
kprintf(9): Implement optional 'precision' for numbers.

Previously, it was parsed but ignored. Some third-party modules
(e.g., APCICA) prefer this format over zero padding flag '0'.

Before this commit:

ACPI Warning: 32/64X FACS address mismatch in FADT - 0x3F611E40/0x       03F611D40, using 32 (20110527/tbfadt-589)

After this commit:

ACPI Warning: 32/64X FACS address mismatch in FADT - 0x3F611E40/0x000000003F611D40, using 32 (20110527/tbfadt-589)

Taken-from: FreeBSD (r209836 and r209949)

11 years agoFix INVARIANT build issue
Adam Sakareassen [Thu, 8 Nov 2012 15:46:00 +0000 (02:46 +1100)]
Fix INVARIANT build issue

11 years agokernel/atm: Fix wrong rt_tables[] access.
Sascha Wildner [Mon, 17 Dec 2012 08:25:33 +0000 (09:25 +0100)]
kernel/atm: Fix wrong rt_tables[] access.

11 years agoif_start: Fix a race that could delay the packets transmission
Sepherosa Ziehau [Mon, 17 Dec 2012 04:18:08 +0000 (12:18 +0800)]
if_start: Fix a race that could delay the packets transmission

Since if_start_need_schedule is called w/ the cached IFF_OACTIVE out
side of ifnet's TX serializer, there could be a race that IFF_OACTIVE
could be cleared before if_start_need_schedule but after releasing
ifnet's TX serializer.  This could delay already queued packets
transmission until the new packet is coming.  Fix this race by calling
if_start_need_schedule inside ifnet's TX serializer.

11 years agokernel - ufs softdep fix under heavy load v3.2.2
Matthew Dillon [Fri, 14 Dec 2012 21:05:00 +0000 (13:05 -0800)]
kernel - ufs softdep fix under heavy load

Fix is from OpenBSD ffs_softdep.c v1.79, originally from FreeBSD
ffs_softdep.c 1.196. Commit message from OpenBSD:

"due to ffs_sync not be able to sync some buffers here is another
instance of softdep code that must ensure proper syncing.
try harder to flush MKDIR_BODY dependancy if such still exists
during pagedep flush (that is by syncing first block of the dir)."

11 years agokernel - Fix sync() system call
Matthew Dillon [Thu, 13 Dec 2012 07:19:43 +0000 (23:19 -0800)]
kernel - Fix sync() system call

* The sync() system call was syncing the filesystems MNT_NOWAIT | MNT_LAZY.
  We need the MNT_NOWAIT to avoid an endless sync on a busy filesystem, but
  MNT_LAZY is another issue entirely.

* Remove the MNT_LAZY from the sync() system call, it can cause whole
  files to not be synced.  It is meant only to be used by the automatic
  kernel 30-second sync (which eventually gets everything flushed out).

11 years agokernel - Fix missing B_ORDERED inheritance
Matthew Dillon [Thu, 13 Dec 2012 04:09:45 +0000 (20:09 -0800)]
kernel - Fix missing B_ORDERED inheritance

* The cluster code was not inheriting B_ORDERED on buffers when constructing
  the rollup buffer due to a coding error.

* I don't think anything uses B_ORDERED so this shouldn't matter, but fix
  it anyway.

Reported-by: vsrinivas
11 years agokernel - Reduce the size of the callout wheel
Matthew Dillon [Mon, 10 Dec 2012 23:11:46 +0000 (15:11 -0800)]
kernel - Reduce the size of the callout wheel

* The callout wheel is per-cpu but ncallout is calculated based on memory.
  A system with many cpus tended to allocate an excessive amount of memory
  in aggregate for the callout wheels.

* Reduce the size of the per-cpu callout wheel by approximately a factor
  of (ncpus).  On a 16G machine with 8 cores, aggregate callout wheel
  allocations is reduced from 128MB to 16MB.

11 years agokernel - Fix softupdates panic with UFS
Matthew Dillon [Mon, 10 Dec 2012 23:02:01 +0000 (15:02 -0800)]
kernel - Fix softupdates panic with UFS

* If getdirtybuf() was unable to lookup a dirty buffer from the
  flush_pagedep_deps path, we need to retry the lookup, rather than
  proceeding through processing the diradd.

Reported-by: marino@
Submitted-by: vsrinivas
11 years agokernel - Fix bug (not reached in normal operation) in vm_map_set_wired_quick()
Matthew Dillon [Mon, 10 Dec 2012 22:37:28 +0000 (14:37 -0800)]
kernel - Fix bug (not reached in normal operation) in vm_map_set_wired_quick()

* Fix a bug where vm_map_set_wired_quick() only operated on the first
  vm_map_entry of a slab, and would panic if there were more.

* Slab allocations are only going to have one vm_map_entry anyway so the
  bug was never hit.  But we fix it anyway.

11 years agokernel - Fix debug output label
Matthew Dillon [Mon, 10 Dec 2012 22:35:39 +0000 (14:35 -0800)]
kernel - Fix debug output label

* Fix "rflags" to "eflags" in i386 kprintf() for smp_invltlb() debugging.

Reported-by: swildner
11 years agokernel - Fix improper assertion panic in vinvalbuf()
Matthew Dillon [Sat, 8 Dec 2012 22:22:15 +0000 (14:22 -0800)]
kernel - Fix improper assertion panic in vinvalbuf()

* Related to the removal of vhold/vdrop from buffer cache buffers, the
  state of a vnode being cleaned can now contain more active buffers and
  I/O's at the time of the vinvalbuf() call.

* Remove the 'vinvalbuf: dirty bufs' assertion and panic.  It is no longer
  a correct assertion.  Note that we've also had sporatic reports of this
  panic even prior to the work so it might not have been a completely
  correct assertion before either.

* Rework the vinvalbuf buffer-flushing and I/O-waiting code a bit.  We
  have to wait for I/O at least once and it is probably a good idea to
  wait for I/O after each buffer flush pass too, to avoid live-locks.

Reported-by: vsrinivas
11 years agokernel - Adjust NFS server for new allocvnode() code
Matthew Dillon [Sat, 8 Dec 2012 05:21:55 +0000 (21:21 -0800)]
kernel - Adjust NFS server for new allocvnode() code

* Adjust the NFS server to check for LWP_MP_VNLRU garbage collection
  requests and act on them.

  This prevents excessive allocation of vnodes by the nfsd's.

11 years agokernel - Change allocvnode() to not recursively block freeing vnodes
Matthew Dillon [Sat, 8 Dec 2012 02:52:30 +0000 (18:52 -0800)]
kernel - Change allocvnode() to not recursively block freeing vnodes

allocvnode() has caused many deadlock issues over the years, including
recent issues with softupdates, because it is often called from deep
within VFS modules and attempts to clean and free unrelated vnodes when
the vnode limit is reached to make room for the new one.

* numvnodes is not protected by any locks and needs atomic ops.

* Change allocvnode() to always allocate and not attempt to free
  other vnodes.

* allocvnode() now flags the LWP to handle reducing the number of vnodes
  in the system as of when it returns to userland instead.  Consolidate
  several flags into a single conditional function call, lwpuserret().

  When triggered, this code will do a limited scan of the free list to
  try to find vnodes to free.

* The vnlru_proc_wait() code existed to handle a separate algorithm
  related to vnodes with cached buffers and VM pages but represented
  a major bottleneck in the system.

  Remove vnlru_proc_wait() and allow vnodes with buffers and/or non-empty
  VM objects to be placed on the free list.

  This also requires not vhold()ing the vnode for related buffer cache
  buffer since the vnode will not go away until related buffers have been
  cleaned out.  We shouldn't need those holds.

Testing-by: vsrinivas
11 years agokernel - Fix filesystem lookup error due to parent directory recyclement race
Matthew Dillon [Fri, 7 Dec 2012 22:44:26 +0000 (14:44 -0800)]
kernel - Fix filesystem lookup error due to parent directory recyclement race

* When looking up a path the parent ncp's vnode is needed to pass into
  the VFS code as the directory vnode (dvp) for the element being looked up.

* Fix a timing race whereby a system under extreme vnode pressure (such as
  when kern.maxvnodes is set to a very low value) can squeek in recyclement
  of this directory vnode when there are no children under it in the
  namecache.

  We fix the problem by holding the directory vnode during the nlookup() and
  cache_resolve().

11 years agokernel - Fix issues where tmpfs loses file data
Matthew Dillon [Fri, 7 Dec 2012 22:20:31 +0000 (14:20 -0800)]
kernel - Fix issues where tmpfs loses file data

* For TMPFS, UIO_NOCOPY writes must use bawrite() or bwrite() and must NEVER
  used buwrite() because these operations are being called via the VM page
  cleaning code via the pageout daemon or the vnode termination code
  (when maxvnodes is reached), and the underlying pages are about to be
  destroyed.

* vm_object_terminate() must call vinvalbuf() both before (for normal
  filesystems) and also after (for tmpfs style filesystems).  Otherwise
  buffers potentially not disposed of during the page cleaning might
  get left hanging.  This is a safety feature.

* Remove post-flush test code from vm_object_page_collect_flush() entirely.
  The IO's are in progress at this point so it makes no sense to set
  PG_CLEANCHK here.

* vm_page_need_commit() must make the object writeable and dirty, I think.

* Fix multiple places where m->dirty is tested and PG_NEED_COMMIT is not.

Reported-by: vsrinivas, others
11 years agokernel - Fix memory starvation issue w/tmpfs
Matthew Dillon [Wed, 5 Dec 2012 19:40:01 +0000 (11:40 -0800)]
kernel - Fix memory starvation issue w/tmpfs

* TMPFS relies on the pagedaemon to retire dirty pages to swap.  The normal
  buffer cache flushing won't do the job (nor do we want it to).  To avoid
  starving the system we change bio_page_alloc() to not dig into the
  system reserve when allocating pages for TMPFS.

Reported-by: tuxillo (Antonio Huete)
11 years agoUPDATING: Note that aic(4) was deISAized (forgot to mention at the time).
Sascha Wildner [Sat, 1 Dec 2012 22:54:54 +0000 (23:54 +0100)]
UPDATING: Note that aic(4) was deISAized (forgot to mention at the time).

11 years agoint64_t is long on x86_64, and not always equivalent to long long.
Sascha Wildner [Thu, 29 Nov 2012 20:57:05 +0000 (21:57 +0100)]
int64_t is long on x86_64, and not always equivalent to long long.

Similarly, uint64_t is unsigned long.

For their min/max value definitions, change LL/ULL suffixes to L/UL.

The bug report has some C++ sample code that show issues resulting
from treating them as long long.

Reported-by: David Shao <davshao@gmail.com>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2461>

11 years ago<sys/errno.h>: Try to fix errno's declaration a bit better for C++.
Sascha Wildner [Wed, 28 Nov 2012 23:26:41 +0000 (00:26 +0100)]
<sys/errno.h>: Try to fix errno's declaration a bit better for C++.

The test code from the bug ticket seems to work with it at least.

Reported-by: David Shao <davshao@gmail.com>
Dragonfly-bug:      <http://bugs.dragonflybsd.org/issues/2463>
In-discussion-with: vsrinivas

11 years agokernel - Fix proc_reparent() race/assertion panic
Matthew Dillon [Wed, 28 Nov 2012 18:21:38 +0000 (10:21 -0800)]
kernel - Fix proc_reparent() race/assertion panic

* Fix proc_reparent() race/assertion panic.  p_pptr changes can race,
  and the procedure had an assertion for the case.  Recode the procedure
  to retry on a mismatch instead of assert.

* Also move the old-parent-wakeup code into the procedure so it is
  properly executed in all cases.

Reported-by: Peter Avalos
11 years agoinstaller: Clarity language when asking the user for time-date info.
Matthew Dillon [Tue, 27 Nov 2012 21:50:54 +0000 (13:50 -0800)]
installer: Clarity language when asking the user for time-date info.

* Clarity language when asking the user for time-date info so the
  user is not confused between UTC vs his or her selected timezone.
  The program wants the user to enter the time and date in his or her
  selected timezone.

11 years agoinstaller: Fix handling of CMOS set to UTC vs. CMOS set to wall time.
Sascha Wildner [Mon, 26 Nov 2012 18:39:57 +0000 (19:39 +0100)]
installer: Fix handling of CMOS set to UTC vs. CMOS set to wall time.

It was reversed in the installer (compared to tzsetup(8)).

/etc/wall_cmos_clock needs to be created when the CMOS is set to the
time of the clock on the wall. While here, also add removing the file
in case the user selects 'CMOS set to UTC'. This is if he chose the
other setting previously and then tried again.

Reported-by: many
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/39>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2060>

11 years agovkernel: Make "options IPX" compilable into the vkernel.
Sascha Wildner [Thu, 22 Nov 2012 19:44:23 +0000 (20:44 +0100)]
vkernel: Make "options IPX" compilable into the vkernel.

Usage of "errno" in userspace as a variable name results in sad code.
Rename them to "error" instead.

Reported-by: tuxillo
11 years agoaac(4): Add a missing unlock.
Sascha Wildner [Tue, 20 Nov 2012 05:23:49 +0000 (06:23 +0100)]
aac(4): Add a missing unlock.

11 years agoext2fs - Clear CNP_PDIRUNLOCK flag after a lookup.
Antonio Huete Jimenez [Mon, 19 Nov 2012 22:32:16 +0000 (23:32 +0100)]
ext2fs - Clear CNP_PDIRUNLOCK flag after a lookup.

vop_compat_nresolve() unlocks the vnode when flag CNP_PDIRUNLOCK
is set, so either we clear the flag or avoid unlocking the vnode
after an ext2_lookup().

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

Reported by: Skylar Hawk

11 years ago/usr/Makefile: Add pkgsrc-create-shallow option
John Marino [Mon, 19 Nov 2012 17:43:52 +0000 (18:43 +0100)]
/usr/Makefile: Add pkgsrc-create-shallow option

11 years agomake distribution: Remove some symlinks before (re-)creating them.
Sascha Wildner [Mon, 19 Nov 2012 16:59:05 +0000 (17:59 +0100)]
make distribution: Remove some symlinks before (re-)creating them.

Reported-by: marino
11 years agompt(4): Fix a panic in RAID operation.
Sascha Wildner [Sun, 18 Nov 2012 19:46:15 +0000 (20:46 +0100)]
mpt(4): Fix a panic in RAID operation.

I ported it wrongly. FreeBSD uses callout_init_mtx() here.

11 years agokernel - Fix off-by-1 error in semexit
Matthew Dillon [Thu, 15 Nov 2012 20:30:51 +0000 (12:30 -0800)]
kernel - Fix off-by-1 error in semexit

* Fix an off-by-1 error that was preventing semexit from properly undoing
  all the semaphores controlled by the exiting process.

Reported-by: lentferj, vsrinivas, others
11 years agobug 2450: Allow build of RELEASE 3.2 from master's bmake
John Marino [Thu, 15 Nov 2012 12:49:05 +0000 (13:49 +0100)]
bug 2450: Allow build of RELEASE 3.2 from master's bmake

It was not possible to build RELEASE 3.2 once the world was updated to
the 3.3 development branch.  The makefiles were incompatible with bmake.
It was possible to build RELEASE 3.2 with only a change to bsd.cpu.mk,
but parallel builds still failed.  The remaining changes and the previous
cherry-pick were all done to support parallel builds when building this
release branch from a system equipped with bmake as the system make.

<https://bugs.dragonflybsd.org/issues/2450>

11 years agoTweak some makefiles to prepare for bmake
John Marino [Sat, 27 Oct 2012 09:13:14 +0000 (11:13 +0200)]
Tweak some makefiles to prepare for bmake

These makefiles build fine with legacy make but contain (or lack)
information that causes the build to fail when used with bmake.  Make
small tweaks to makefiles to ensure they are compatible with both make
programs.

11 years agomount{,_ufs}: Fix wrong mountctl(2) error check.
Sascha Wildner [Wed, 14 Nov 2012 10:06:26 +0000 (11:06 +0100)]
mount{,_ufs}: Fix wrong mountctl(2) error check.

mountctl(2) returns the number of copied bytes when successful, and -1
if there was an error. This prevented ", local" from being printed in
mount output.

Reported-by: YONETANI Tomokazu
11 years agoSync zoneinfo database with tzdata2012j from ftp://ftp.iana.org/tz/releases
Sascha Wildner [Tue, 13 Nov 2012 18:41:51 +0000 (19:41 +0100)]
Sync zoneinfo database with tzdata2012j from ftp://ftp.iana.org/tz/releases

* africa: Lybia set their time one hour back at 02:00 on November 10
    (last Saturday).

* Additional miscellaneous fixes in various comments.

11 years agoipcs(1): Fix the "ipcs: kvm_nlist: No such file or directory" error.
Sascha Wildner [Tue, 13 Nov 2012 17:35:17 +0000 (18:35 +0100)]
ipcs(1): Fix the "ipcs: kvm_nlist: No such file or directory" error.

The "semu" variable was removed in 79757ed082, causing this breakage.
Strangely, even before its removal it wasn't used for anything in
ipcs(1).

Reported-by: beket
11 years agoReally fix systat(1).
Sascha Wildner [Mon, 12 Nov 2012 20:59:30 +0000 (21:59 +0100)]
Really fix systat(1).

11 years agosystat - Do not use ccpu for %cpu calculation in pigs view.
Antonio Huete Jimenez [Sun, 11 Nov 2012 23:18:01 +0000 (00:18 +0100)]
systat - Do not use ccpu for %cpu calculation in pigs view.

- ccpu went away after the new scheduler work so sync with
  the current status of the kernel.
- Also remove all the unused kvm* stuff and get fscale via sysctl.

Reported-by: tpchin <tpchin@telstra.com>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2245>

11 years agohammer.8: Add back an .El that was removed by mistake.
Sascha Wildner [Sun, 11 Nov 2012 09:26:17 +0000 (10:26 +0100)]
hammer.8: Add back an .El that was removed by mistake.

11 years agogetline(3): Fix segfault caused by NULL pointer
John Marino [Wed, 7 Nov 2012 20:15:35 +0000 (21:15 +0100)]
getline(3): Fix segfault caused by NULL pointer

This fixes a segfault seen with pkg's audit function, and effectively syncs
getdelim with FreeBSD.

Taken-from: FreeBSD SVN 197752 (04 OCT 2009)

- Tolerate applications that pass a NULL pointer for the buffer and
  claim that the capacity of the buffer is nonzero.

- If an application passes in a non-NULL buffer pointer and claims the
  buffer has zero capacity, we should free (well, realloc) it anyway.
  It could have been obtained from malloc(0), so failing to free it
  would be a small memory leak.

11 years agoboot - some VIA processors also have long mode!
Alex Hornung [Sun, 4 Nov 2012 15:53:22 +0000 (15:53 +0000)]
boot - some VIA processors also have long mode!

11 years agoigb: Configure TX head write back before turn enable bit in TXDCTL
Sepherosa Ziehau [Wed, 7 Nov 2012 13:47:59 +0000 (21:47 +0800)]
igb: Configure TX head write back before turn enable bit in TXDCTL

The original configure sequence works on 82575 and 82576.  However,
it does not work on i350 and probably will not work on 82580.  For
these two chips TX head write back _must_ be configured before
turning on enable bit in TXDCTL according to their datasheet.

Reported-by: ftigeot@
Tested-by: ftigeot@ (i350), me w/ (82575, 82576)
11 years agoSync zoneinfo database with tzdata2012i from ftp://ftp.iana.org/tz/releases
Sascha Wildner [Sun, 4 Nov 2012 13:00:36 +0000 (14:00 +0100)]
Sync zoneinfo database with tzdata2012i from ftp://ftp.iana.org/tz/releases

* asia: Comment typo fix.

* northamerica: Cuba switched back to standard time on 2012-11-04, 01:00.

11 years agobge: Fix a bug in the polling code when status tag is used
Sepherosa Ziehau [Sat, 3 Nov 2012 14:49:32 +0000 (22:49 +0800)]
bge: Fix a bug in the polling code when status tag is used

Status tag always needs to be written even if interrupt is not enabled.

11 years agoRevert "bge: Always configure MII mode register"
Sepherosa Ziehau [Sat, 3 Nov 2012 14:26:12 +0000 (22:26 +0800)]
Revert "bge: Always configure MII mode register"

This reverts commit dda43ff2bc5975a3cbd91838e7a46332039962f4.

Forcefully configure seems to break at least BCM5761 NIC auto-negotiation

11 years agokernel: Fix some wrong cam_simq_release() calls.
Sascha Wildner [Sat, 3 Nov 2012 11:08:13 +0000 (12:08 +0100)]
kernel: Fix some wrong cam_simq_release() calls.

Our (refcounted) simq can be released right after allocating the sim.
These drivers were not doing it correctly.

11 years ago/usr/Makefile: Bring back creating a master branch.
Sascha Wildner [Fri, 2 Nov 2012 02:47:18 +0000 (03:47 +0100)]
/usr/Makefile: Bring back creating a master branch.

It is useful to have it available, such as for MFC'ing changes from it
or upgrading to it, but it won't be checked out by default.

11 years agoMake sure that upgrading to master doesn't happen automatically/accidentally.
Justin C. Sherrill [Thu, 1 Nov 2012 02:39:50 +0000 (22:39 -0400)]
Make sure that upgrading to master doesn't happen automatically/accidentally.
Users will stay with a stable release unless they choose to change.
Also, nrelease builds will build the correct release.

11 years agoioapic/i386: Allow GSI > 191
Sepherosa Ziehau [Thu, 1 Nov 2012 01:29:53 +0000 (09:29 +0800)]
ioapic/i386: Allow GSI > 191

11 years agoioapic/x86_64: Allow GSI > 191
Sepherosa Ziehau [Tue, 30 Oct 2012 02:53:59 +0000 (10:53 +0800)]
ioapic/x86_64: Allow GSI > 191

Some BIOSes seem to assume that all 256 IDT vectors could be used,
while we limit the available IDT vectors percpu to 192.   Find an
unused IRQ for these GSIs, if this ever happens.

Reported-by: thowe on EFnet #dragonflybsd
11 years agoSync zoneinfo database with tzdata2012h from ftp://ftp.iana.org/tz/releases
Sascha Wildner [Sat, 27 Oct 2012 09:15:46 +0000 (11:15 +0200)]
Sync zoneinfo database with tzdata2012h from ftp://ftp.iana.org/tz/releases

* asia:
    Israel has new DST rules next year (thanks to Ephraim Silverberg).
    Jordan stays on DST this winter (thanks to Steffen Thorsen).

* southamerica:
    Bahia no longer has DST (thanks to Kelley Cook).
    Tocantins has DST (thanks to Rodrigo Severo).

11 years agomdoc: Fix .Os version.
Sascha Wildner [Fri, 26 Oct 2012 22:50:54 +0000 (00:50 +0200)]
mdoc: Fix .Os version.

11 years agolibssp47, libobjc47: install headers
John Marino [Fri, 26 Oct 2012 14:35:25 +0000 (16:35 +0200)]
libssp47, libobjc47: install headers

Headers for both libssp and libobjc were not getting installed for the
gcc47 library set.  As an aside, the gcc44 libobjc is also missing these
headers.  There installation required an mtree change, but it can be
built with quickworld.

Additionally, CFLAGS were moved to above an include for libobjc which
should ensure the local config.h is included before a different version
and this in turn likely improves libobjc functionality.

11 years agolibgomp47: Install libgomp.spec and omp.h
John Marino [Fri, 26 Oct 2012 13:52:09 +0000 (15:52 +0200)]
libgomp47: Install libgomp.spec and omp.h

It was reported these files are needed by libgomp, so generate and
install them.

11 years agovkernel64: Add a missing 'break'.
Sascha Wildner [Sun, 21 Oct 2012 20:09:15 +0000 (22:09 +0200)]
vkernel64: Add a missing 'break'.

11 years agoUPDATING: Fix a typo and mention that for usb4bsd, w&k need rebuilding.
Sascha Wildner [Sun, 21 Oct 2012 16:45:32 +0000 (18:45 +0200)]
UPDATING: Fix a typo and mention that for usb4bsd, w&k need rebuilding.

Sigh, I had written 'loader.conf' instead of 'make.conf'. It will need
a mention on the release page/errata.

11 years agoUPDATING: Add some words about usb4bsd. v3.2.1
Sascha Wildner [Sun, 21 Oct 2012 13:52:36 +0000 (15:52 +0200)]
UPDATING: Add some words about usb4bsd.

11 years agocondvar(9): adjust manpage to reflect reality
Markus Pfeiffer [Sat, 20 Oct 2012 20:50:17 +0000 (20:50 +0000)]
condvar(9): adjust manpage to reflect reality

also fix a typo while I am here

11 years agousb4bsd: Add a commented out line to our configs for enabling usb4bsd.
Sascha Wildner [Thu, 18 Oct 2012 07:14:53 +0000 (09:14 +0200)]
usb4bsd: Add a commented out line to our configs for enabling usb4bsd.

In addition to this, WANT_USB4BSD needs to be put into /etc/make.conf
for the userland part.

11 years agousb4bsd/libusb: Remove an unused variable and mark a dummy variable unused.
Sascha Wildner [Wed, 17 Oct 2012 16:25:30 +0000 (18:25 +0200)]
usb4bsd/libusb: Remove an unused variable and mark a dummy variable unused.

11 years agousb4bsd/ukbd: Adjust comment style a bit.
Sascha Wildner [Tue, 16 Oct 2012 08:28:52 +0000 (10:28 +0200)]
usb4bsd/ukbd: Adjust comment style a bit.

11 years agousb: Fix a typo in ukbd.
Markus Pfeiffer [Tue, 16 Oct 2012 09:00:03 +0000 (09:00 +0000)]
usb: Fix a typo in ukbd.

11 years agousb4bsd: Fix attach/detach for ukbd.
Markus Pfeiffer [Tue, 16 Oct 2012 08:59:23 +0000 (08:59 +0000)]
usb4bsd: Fix attach/detach for ukbd.

This still needs work to make it function with the debugger

11 years agousb4bsd: Regenerate usbdevs.h and usbdevs_data.h.
Sascha Wildner [Sun, 14 Oct 2012 21:41:33 +0000 (23:41 +0200)]
usb4bsd: Regenerate usbdevs.h and usbdevs_data.h.

11 years agousb4bsd: Sync usbdevs with FreeBSD.
Sascha Wildner [Sun, 14 Oct 2012 21:38:08 +0000 (23:38 +0200)]
usb4bsd: Sync usbdevs with FreeBSD.

11 years agousb4bsd: Add usb_quirk module.
Sascha Wildner [Sun, 14 Oct 2012 20:10:30 +0000 (22:10 +0200)]
usb4bsd: Add usb_quirk module.

11 years agousb4bsd: Makefile cleanup.
Sascha Wildner [Sun, 14 Oct 2012 19:40:29 +0000 (21:40 +0200)]
usb4bsd: Makefile cleanup.

11 years agousb4bsd: Sort files a bit better in 'files' (from FreeBSD).
Sascha Wildner [Sun, 14 Oct 2012 19:13:28 +0000 (21:13 +0200)]
usb4bsd: Sort files a bit better in 'files' (from FreeBSD).

11 years agousb4bsd/controller: Use device_delete_children().
Sascha Wildner [Sun, 14 Oct 2012 13:12:08 +0000 (15:12 +0200)]
usb4bsd/controller: Use device_delete_children().

11 years agokernel: add device_delete_children()
François Tigeot [Thu, 5 Jul 2012 07:05:18 +0000 (09:05 +0200)]
kernel: add device_delete_children()

Obtained-from: FreeBSD

11 years agomake upgrade: Remove more new USB stuff if it is not requested.
Sascha Wildner [Sun, 14 Oct 2012 12:35:43 +0000 (14:35 +0200)]
make upgrade: Remove more new USB stuff if it is not requested.

To reduce confusion when switching.

11 years agousb4bsd: Pull up libusb and usbcontrol to FreeBSD current's.
Sascha Wildner [Sun, 14 Oct 2012 12:18:21 +0000 (14:18 +0200)]
usb4bsd: Pull up libusb and usbcontrol to FreeBSD current's.

I stopped before their recent streams commit.

11 years agoBring in USB4BSD userspace libraries and utilities.
Markus Pfeiffer [Sun, 14 Oct 2012 11:00:18 +0000 (11:00 +0000)]
Bring in USB4BSD userspace libraries and utilities.

The following will now be built and installed if WANT_USB4BSD is defined.

* libusb
* usbconfig

11 years agousb4bsd/ehci: Fix EHCI resetting (and thus, intialization & attach).
Sascha Wildner [Fri, 12 Oct 2012 19:29:22 +0000 (21:29 +0200)]
usb4bsd/ehci: Fix EHCI resetting (and thus, intialization & attach).

No need for PINTERLOCKED here.

Reported-by: ftigeot, tuxillo
In-discussion-with: vsrinivas

11 years agousb4bsd/ehci: Ouch, fix a bug in the Makefile.
Sascha Wildner [Fri, 12 Oct 2012 17:56:15 +0000 (19:56 +0200)]
usb4bsd/ehci: Ouch, fix a bug in the Makefile.

It was taking a wrong file and this caused ehci to not properly initialize
when loaded as a module (like it is our default).

Note that this is my fault, not Markus Pfeiffer's. I had messed with the
Makefiles and it was a copy/paste error.

Reported-by: ftigeot, tuxillo
11 years agousb4bsd: Use NULL for pointers.
Sascha Wildner [Fri, 12 Oct 2012 16:59:04 +0000 (18:59 +0200)]
usb4bsd: Use NULL for pointers.