Permalink
Commits on Aug 21, 2012
  1. Merge remote branch 'crater/DragonFly_RELEASE_3_0' into rel3_0

    Thomas Nikolajsen committed Aug 21, 2012
  2. kernel/linprocfs: Add a missing header for spin_{,un}lock().

    Sascha Wildner committed with Thomas Nikolajsen Aug 16, 2012
  3. kernel/linprocfs: Fix accessing files in /proc (such as /proc/meminfo).

    It is the same fix that was applied to procfs with 198c0ff.
    Sascha Wildner committed Aug 21, 2012
  4. kernel/linprocfs: Fix a panic when accessing /proc/<pid>/maps.

    Analogous to procfs.
    Sascha Wildner committed Aug 21, 2012
  5. kernel - Fix condvar races

    * Interlocked sleep was not using the PINTERLOCKED flag.
    
    * Misc other adjustments.
    Matthew Dillon committed Aug 17, 2012
  6. kernel - Adjust UFS and HAMMER to use uiomovebp()

    * Add uiomovebp(), a version of uiomove() which is aware of a locked bp
      representing the to or from buffer and can work-around issues related
      to VM faults causing recursions and deadlocks on the user buffer.
    
      uiomovebp() does not yet detect or handle deadlocks.  Implementing
      deadlock handling will require a certain degree of finess related to
      the vnode and bp locks and we don't want to have to do it unless we
      actually deadlock.  TODO.
    
    * Adjust UFS, HAMMER, TMPFS, MSDOSFS, NFS, NTFS to use uiomovebp().
    Matthew Dillon committed Aug 17, 2012
  7. kernel - Change lockmgr LK_SHARED behavior to fix improper recursion …

    …return
    
    * When obtaining a LK_SHARED lock in a situation where you already own the
      lock LK_EXCLUSIVE, lockmgr would downgrade the lock to shared.
    
      This creates a very serious problem when large procedural recursions get
      a lock that is already being held exclusively but request a shared lock.
      When these recursions return the original top level will find its lock is
      no longer exclusive.
    
    * This problem occured with vnode locks when a VOP_WRITE operation on a mmap'd
      space causes a VM fault which then turns around and issues a read().
      When the fault returns the vnode wound up locked shared instead of
      exclusive.
    
    * Fix the problem by NOT downgrading an exclusive lock to shared when
      recursing on LK_SHARED.  Simply add another count to the exclusive
      lock.
    Matthew Dillon committed Aug 17, 2012
  8. kernel - Fix incorrect dirty/reprotect code in pageout

    * vm_object_page_collect_flush() was trying to re-protect VM pages that
      were still marked dirty after pageout I/O was initiated without owning
      the BUSY bit on the page.  This operation could race whatever I/O was
      going on and multiple issues.  Remove the re-protect.
    
      Just don't do it.  It's an unnecessary operation.  We still re-set
      PG_CLEANCHK on the page and that should be fine insofar as the pageout
      daemon goes.
    
    * Note that the pageout_flush code protects the VM pages properly (to
      read-only) prior to initiating I/O .
    
    * Should fix bug #2350
    
    * Might be related to the wire-count bug considering that we were messing
      with the page's pmap without owning the BUSY bit.  Small chance.
    Matthew Dillon committed Aug 16, 2012
  9. kernel - Fix long-standing vm_map token panic

    * Bug turned out to be an error path in vm_map_find().
    
    * This bug ate a lot of hours from several people, but Antonio was able
      to instrument the token path in a way that allowed us to narrow down
      and locate the problem.
    
    Submitted-by: tuxillo, vsrinivas
    Debugging-by: tuxillo
    Matthew Dillon committed Aug 16, 2012
  10. kernel - Stop KTR logging during panic

    * Stop all KTR logging when a panic occurs so the KTR buffer doesn't
      get wiped out by events during the panic & core dump.  This gives
      us a KTR buf snapshot as of the panic entry.
    Matthew Dillon committed Aug 16, 2012
  11. kernel - Fix numerous procfs/ptrace issues (3)

    * Add a safety spin-lock around adjustments to p_stops so it hopefully
      interacts better with the event processing side of things.
    Matthew Dillon committed Aug 16, 2012
  12. kernel - Fix exit races which can lead to a corrupt p_children list

    * There are a few races when getting multiple tokens where a threaded
      process is wait*()ing for exiting children from multiple threads
      at once.
    
      Fix the problem by serializing the operation on a per-child basis,
      and by using PHOLD/PRELE prior to acquiring the child's p_token.
      Then re-check the conditions before accepting the child.
    
    * There is a small chance this will also reduce or fix VM on-exit races
      in i386, as this bug could result in an already-destroyed process
      being pulled off by the racing wait*().  Maybe 25% chance.
    Matthew Dillon committed Aug 16, 2012
  13. Kernel - Fix numerous procfs/ptrace issues (2)

    * The last fix wasn't quite right.  Fix it for real.
    Matthew Dillon committed Aug 16, 2012
  14. Kernel - Fix numerous procfs/ptrace issues

    * Fix interactions during exec and exit.  This should fix truss
      (bug 2313).
    
    * Reset p_* fields related to tracing on last procfs close for the
      process.
    Matthew Dillon committed Aug 16, 2012
Commits on Aug 16, 2012
  1. kernel - Fix two UFS+softupdates bugs

    * The softdep sema_*() functions (the ones in ffs_softdep.c, not the sysv
      functions) were not MPSAFE for the case where the passed interlock is
      NULL.  Use a spinlock for that case.
    
    * getdirtybuf()'s semantics were broken and could return success even
      after having released &lk with the bp still unlocked.
    
      Fixing this should fix most of the reported softdep panics.
    Matthew Dillon committed with vsrinivas Aug 16, 2012
  2. kernel -- ffs: Softdep lock and assorted fixes

    * Remove interlocked_sleep; we can just use lksleep directly
    
    * sema_get no longer eats the interlock passed in; all of its
      callers were retaking the lock eventually or immediately.
    
    * softdep was setting up a callout to wake itself in request_cleanup.
      Switch to directly using timeout in lksleep for this purpose.
    
    * Do not access inodedep structure outside of softdep lock in
      softdep_update_inodeblock for buffer field.
    
    * Remove prio field from semaphores; they were unused and the DFly
      tsleep routines do not respect priority anyway.
    
    * Do not release softdep lock before panic()ing
    vsrinivas committed May 7, 2012
Commits on Aug 13, 2012
  1. installer: When setting the slice type for >2TB, ignore fdisk warnings.

    With disks >2TB this step will lead to some whining from fdisk(8), but
    since we'll boot anyway (with 34ea800, we resort to the media size
    when a maxed out slice size is detected), just ignore any issues which
    fdisk(8) reports in this case.
    
    After this commit, installing and booting from that installation on a
    disk which is >2TB will work (tested with a 3TB ahci attached drive as
    well as with a 4.5TB hptrr(4) RAID).
    
    Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/2264>
    Reported-by:   ftigeot
    Sascha Wildner committed Aug 13, 2012
  2. ahci(4)/sili(4): Fix for drives >2TB.

    CAM will issue the 16 byte version of the READ CAPACITY command when
    maxsector is 0xffffffff:
    
    ----- scsi_da.c -----
    if (maxsector == 0xffffffff) {
    	softc->state = DA_STATE_PROBE2;
    	kfree(rdcap, M_SCSIDA);
    	xpt_release_ccb(done_ccb);
    	xpt_schedule(periph, /*priority*/5);
    	return;
    }
    ---------------------
    
    However, we are subtracting 1 from it (presumably because it's a "last
    sector on the device" value starting at 0) so in CAM, it ended up being
    0xfffffffe, resulting in disks attached via ahci(4) and sili(4) to be
    limited to 2TB.
    
    To fix, set the local var to 0 in this case, so that after subtracting 1
    from the value (cast to 32 bit) CAM gets 0xffffffff.
    
    Fix-by: dillon
    Sascha Wildner committed Aug 13, 2012
Commits on Aug 12, 2012
  1. boot - Fix boot probe ordering

    * When boot loader support is compiled w/ UFS and HAMMER together, which
      is the default (note: HAMMER booting's never worked well)... the probe
      order was to check for the hammer volume header first and UFS second.
    
    * Change the probe order to check for UFS first and HAMMER second.  The
      reason is that a 'newfs' (for UFS) doesn't wipe the hammer volume header
      because the ufs's newfs tries to 'skip' the partition reserved area of
      the disk.
    
      This is a huge throwback to the original BSD fdisk/disklabel which put
      the boot code INSIDE the 'a' partition.
    
    * The DragonFly disklabel64 (which is now the default) does not have this
      problem so we could probably at some point adjust the UFS 'newfs' code to
      wipe the old 'reserve' area to really put a cap on the problem.
    
    Reported-by: tuxillo
    Matthew Dillon committed Aug 12, 2012
Commits on Aug 7, 2012
  1. mpt(4): Fix a porting mistake I did in 6d259fc.

    I left in both the code of the "#if __FreeBSD_version" as well as that of
    its "#else". This caused the geometry to be calculated twice.
    Sascha Wildner committed Aug 7, 2012
Commits on Aug 3, 2012
  1. Sync zoneinfo database with tzdata2012e from ftp://ftp.iana.org/tz/re…

    …leases
    
    * australasia (Pacific/Fakaofo): Tokelau is UTC+13, not UTC+14.
        (Thanks to Steffen Thorsen.)
    Sascha Wildner committed Aug 3, 2012
  2. hptmv(4): Reduce si_iosize_max to 64KB.

    This fixes busdma panics we were getting with it.
    
    busdma-clue-by: sephe
    Sascha Wildner committed Aug 2, 2012
  3. kernel/cam: Make si_iosize_max overridable by drivers.

    Sascha Wildner committed Aug 2, 2012
Commits on Jul 28, 2012
  1. gcore(1): Make it work again.

    Two commits broke things:
    
    64fce75 which changed us to no longer
    claiming that we're FreeBSD in core files.
    
    0b684e3 which added another field to
    /proc/<pid>/map (the vnode path for vn-backed vm objects).
    
    Both changes need adjustments in gcore(1).
    Sascha Wildner committed Jul 28, 2012
Commits on Jul 26, 2012
  1. rc.d/netif: Require cleanvar.

    Before the ipfilter removal, netif required ipfilter, which required
    ipmon, which required cleanvar. In other words, cleanvar was run before
    netif.
    
    With the ipfilter requirement removed from netif, cleanvar was now
    ordered at some place after netif, which caused the PID file and
    control socket of wpa_supplicant(8) (which is started by netif if an
    ifconfig_xxx="WPA" line is found in /etc/rc.conf) to be removed from
    /var/run by cleanvar after they were created.
    
    This caused trouble for wpa_cli(8), which needs the socket.
    
    Found-by: Johannes Hofmann <Johannes.Hofmann@gmx.de>
    Sascha Wildner committed Jul 24, 2012
Commits on Jul 25, 2012
  1. lapic: Allow lapic enumeration to fail

    It is mainly used to workaround for some old brain dead BIOS, which
    will set BSP's LAPIC apic id to 255, but all MADT LAPIC entries are
    valid
    
    Reported-by: klanger on #dragonflybsd
    Sepherosa Ziehau committed with Sascha Wildner Jul 20, 2012
  2. apic: APIC ID should not be 255, which is used for broadcast

    Sepherosa Ziehau committed with Sascha Wildner Jul 20, 2012
Commits on Jul 23, 2012
  1. aic7xxx: fix a pointer sign warning

    François Tigeot committed Jul 23, 2012
Commits on Jul 20, 2012
  1. Sync zoneinfo database with tzdata2012d from ftp://ftp.iana.org/tz/re…

    …leases
    
    * Removes the SCCS IDs
    
    * africa: Morocco does not observe DST from Jul 20 03:00 to Aug 20 02:00.
    Sascha Wildner committed Jul 20, 2012
Commits on Jul 14, 2012
  1. kernel - Fix MP race in sysv semaphore code (2)

    * Add missing changes to proc.h
    
    Reported-by: sephe
    Matthew Dillon committed with Thomas Nikolajsen Jul 12, 2012
  2. x86_64 FPU: Set 64-bit precision for fadd/fsub/fsqrt etc.

    On AMD64, GCC and the ABI expects the x87 unit to be running in 80/64
    mode rather than 64/53 mode seen on i386.  This corrects errors seen
    in long double tests involving runtime calculations.  Previously, the
    results of these runtime calculations would get rounded due to use
    of 53-bit mantissas.
    John Marino committed with jrmarino Jul 12, 2012
  3. kernel - Fix MP race in sysv semaphore code

    * Fix a serious MP race in the sysv semaphore code due to a lack of
      protection of the semu* global structures.
    
    * The race occurs during semaphore allocation and deallocation vs ANY
      exiting process (even if it does not use semaphores), potentially
      leading to a live-lock in the semu_list scan code.
    
      The live-lock will prevent the cpu it occurs on from being able to
      switch to another kernel or user thread.  In the sample case it
      stopped pagedaemon from running, creating a backlog in the I/O
      subsystem which locked the computer up.
    
    Reported-by: Peter Avalos
    Matthew Dillon committed with Sascha Wildner Jul 11, 2012
Commits on Jul 12, 2012
  1. sysctl(8): Fix handling of uquad type sysctls (wrong variable was tak…

    …en).
    Sascha Wildner committed Jul 12, 2012