Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on May 7, 2009
  1. @corecode

    Roll DragonFly 2.3.1

    corecode authored
  2. Replace Debugger() entry with a kprintf().

    Matthew Dillon authored
    Reported-by: trevorjk
  3. Merge branch 'master' of ssh://…

    Matthew Dillon authored
  4. Fix O_NOFOLLOW and do not follow softlinks if O_EXCL.

    Matthew Dillon authored
    A bug in sys_open() set NLC_FOLLOW bit for the nlookup() call unconditionally.
    Removing the setting allows vn_open() to properly set NLC_FOLLOW conditionally
    when both O_EXCL and O_NOFOLLOW are not set.
  5. HAMMER VFS - Limit recursion for long directory chains, update mtime/…

    Matthew Dillon authored
    A long chain of directory dependencies can blow out the kernel stack.  Limit
    the recursion to 20 levels.  If the depth is exceeded the flushing of the
    deep inodes is delayed until the higher dependencies are taken care of.
    Update mtime/ctime accordingly based on the fstest stress test from FreeBSD.
    Note however that we cannot update the ctime on directories for file creates,
    renames, and deletes within the directory without rolling a new inode,
    which is too expensive to do for that situation.  We can, and do, update the
Commits on May 6, 2009
  1. fstest regression fixes - POSIX error codes.

    Matthew Dillon authored
    Deal with most of the issues found by FreeBSD's fstest regression test:
        * Limit path components to 255 characters.  Return ENAMETOOLONG if
          the limit is exceeded.
        * Return EEXIST, EINVAL, and ENOTEMPTY as appropriate when the user
          attempts to create, delete, or rename "." or "..", instead of EINVAL.
        * Return EISDIR if an attempt is made to open a directory for writing,
          instead of EINVAL.
        * Return EACCES if an attempt is made to open a file O_TRUNC without
          O_RDWR or O_WRONLY, instead of silently dropping the O_TRUNC.
        * Implement O_NOFOLLOW semantics generally instead of just with O_EXCL.
    Not dealt with:
        * DragonFly clears SGID AND SUID on uid or gid change, if not root.
          If root is doing the operation SGID/SUID is not cleared.
        * HAMMER cannot modify the ctime without rolling a new inode, which
          is very expensive, and does not do so when entries are added or
          removed from a directory.  mtime is modified.
  2. @corecode

    ncal: specify month with -m month argument

    corecode authored
    Ncal only supports specification of a month together with a year, which is
    silly.  Using the -m argument, you can now specify a month in the current
    Obtained-from:  FreeBSD
  3. @corecode

    ncal: interpret a `.' as current year

    corecode authored
    There doesn't seem to be an easy way to refer to the current year, for
    instance if I wanted to show the calendar of this year's June.  Now
    there is:  ncal 6 .
  4. @corecode

    ncal: always generate full lines to enable today hilight in year view

    corecode authored
    Ncal would only fill lines up to the last day in a month and use a printf
    padding later to align all output nicely (when using year view).  This
    breaks when using a hilight, because the ANSI sequences consume additional
    characters which are of zero print width.  Instead of letting printf do
    the padding, generate padded lines ourselves.
    Also avoid code duplication in the hilight code and switch on hilighting
    for the year view.
  5. @corecode

    ncal: hilight current day

    corecode authored
    This lets ncal and cal hilight the current day in the month view, if its
    output is connected to a terminal.  The year view can not yet use
    Obtained-from: FreeBSD
  6. Allow USCHED_DEL_CPU for non-superuser processes

    Aggelos Economopoulos authored
  7. HAMMER VFS - Refactor merged search function to try to avoid missed e…

    Matthew Dillon authored
    Refactor the merged B-Tree + In-Memory search function to try to avoid races
    where an in-memory record is flushed to the media during a search, causing
    the search to miss the record.
    Add another flag to hammer_record_t to indicate that the record was deleted
    because it was committed to the media (verses simply being deleted).
    flags indicate whether the frontend or backend deleted an in-memory record.
    The backend ignores frontend deletions that occur after the record has been
    associated with a flush group.
    Remove some console Warnings that are no longer applicable.
  8. Merge branch 'master' of ssh://…

    Matthew Dillon authored
  9. Add kernel-layer support for chflags checks, remove (most) from the V…

    Matthew Dillon authored
    …FS layer.
    Give nlookup() and nlookup_va() the tools to do nearly all chflags related
    activities.  Here are the rules:
    Immutable (uchg, schg)
        If set on a directory no files associated with the directory may
        be created, deleted, linked, or renamed.  In addition, any files open()ed
        via the directory will be immutable whether they are flagged that
        way or not.
        If set on a file or directory the file or directory may not be
        written to, chmodded, chowned, chgrped, or renamed.  The file can
        still be hardlinked and the file/directory can still be chflagged.
        If you do not wish the file to be linkable then set the immutable bit
        on all directories containing a link of the file.  Once you form
        this closure no further links will be possible.
        NOTE ON REASONING:  Security scripts should check link counts anyway,
        depending on a file flag which can be changed as a replacement for
        checking the link count is stupid.  If you are secure then your closures
        will hold.  If you aren't then nothing will save you.
        This feature is not recursive.  If the directory contains
        subdirectories they must be flagged immutable as well.
    Undeletable (uunlnk, sunlnk)
        If set on a file or directory that file or directory cannot be removed
        or renamed.  The file can still otherwise be manipulated, linked, and
        so forth.  However, it should be noted that any hardlinks you create
        will also not be deletable :-)
        If set on a directory this flag has no effect on the contents
        of the directory (yet).  See APPEND-ONLY on directories for what
        you want.
    Append-only (uappnd/sappnd)
        If set on a directory no file within the directory may be deleted or
        renamed.  However, new files may be created in the directory and
        the files in the directory can be modified or hardlinked without
        If set on a file the file cannot be truncated, random-written, or
        deleted.  It CAN be chmoded, chowned, renamed, and appended to
        with O_APPEND etc.
        If you do not wish the file to be renameable then you must also
        set the Undeletable flag.  Setting the append-only flag will ensure
        that the file doesn't disappear from the filesystem, but does not
        prevent it from being moved about the filesystem.
    Security fix - futimes()
        futimes() could be called on any open descriptor.  Restrict
        it to just those files you own or have write permission on.
    Security fix - Hardlinks
        Users can no longer hardlink foreign-owned files which they do not
        have write access to.  The user must now have write permission on
        the file being hardlinked or the user must own the file, or be root.
    Security fix - fcntl()
        fcntl() can no longer be used to turn of O_APPEND mode if the file
        was flagged append-only.
        * Append-only on directories
        * Immutable on directories to control set-in-stone & hardlinking
        * Immutable files can be hardlinked on DragonFly, not on FreeBSD.
        * User must be the owner of the file or have write access to the
          file being hardlinked.
Commits on May 5, 2009
  1. document kvm_open*() support for live vkernels

    Aggelos Economopoulos authored
Commits on May 4, 2009
  1. teach libkvm about vkernels

    Aggelos Economopoulos authored
    Add support for accessing a running vkernel's memory by
    reading its /proc/$pid/mem file.
  2. Rework a CPU C-state selection logic a bit.

    Hasso Tepper authored
    Avoid comparing negative signed to positive unsignad values. It was
    leading to a bug, when C-state does not decrease on sleep shorter then
    declared transition latency. Fixing this deprecates workaround for broken
    C-states on some hardware.
    By the way, change state selecting logic a bit. Instead of last sleep
    time use short-time average of it. Global interrupts rate in system is a
    quite random value, to corellate subsequent sleeps so directly.
    Obtained-from: FreeBSD
  3. Move the code to update cpu_cx_count out of acpi_cpu_generic_cx_probe().

    Hasso Tepper authored
    Put it into acpi_cpu_startup() which is where all the other code to update
    this global variable lives.  This fixes a bug where cpu_cx_count was not
    updated correctly if acpi_cpu_generic_cx_probe() returned early.
    Obtained-from: FreeBSD
  4. acpi_cpu: fixup for PIIX4E PCI config related to C2.

    Hasso Tepper authored
    If you have seen
    cpu0: too many short sleeps, backing off to C1
    with this chipset before you may want to try cx_lowest of C2 again.
    Obtained-from: FreeBSD
  5. Merge branch 'master' of ssh://…

    Matthew Dillon authored
  6. The kernel permissions check code was not checking deletability for

    Matthew Dillon authored
    the rename source or the directory sticky bit for rename targets which
    This only effected HAMMER which assumes the kernel is responsible for
    permissions checks.
    Reported-by: YONETANI Tomokazu <>
Commits on May 3, 2009
  1. @corecode

    nanosleep: don't overwrite error with copyout success status

    corecode authored
    When nanosleep gets interrupted, it returns EINTR.  In the case of a
    non-zero error status, sys_nanosleep will copyout() the remaining sleep
    time.  However it would overwrite the nanosleep error status with the
    error status of copyout() -- which is 0 (success) most of the time.  This
    means the important error status of nanosleep (EINTR) would be overwritten
    by 0.  Follow FreeBSD and NetBSD and only return the copyout status if it
    Reported-by: walt
  2. installer: Sync ASCII Fred with loader menu pic.

    Sascha Wildner authored
  3. installer: Move the installer from contrib/ to usr.sbin/.

    Sascha Wildner authored
    Fix trailing whitespace while I'm doing it.
  4. acpi: Select proper one shot timer based on CPUs' C3 state.

    Sepherosa Ziehau authored
  5. Allow one shot timer to be switched on a running system between i8254…

    Sepherosa Ziehau authored
    … and
    lapic timer:
    - Always register "clk" interrupt.
    - Add cputimer_intr_switch(), which could switch one shot timer between
      i8254 and lapic timer on a running system.  It could be used to select
      a proper one shot timer duing ACPI C3 transition:
      e.g. ->C3 use i8254, C3-> use lapic timer
    - Add sysctl node hw.cputimer_intr_type to test cputimer_intr_switch().
  6. hpet: Veto Sx state transition, if hpet is the sys_cputimer, since

    Sepherosa Ziehau authored
    hpet is not required to function under S1-S5.  Add comment about
    the reference to the related hpet standard items.
  7. lapic timer: Improve lapic timer vector code

    Sepherosa Ziehau authored
    - Check for a non-zero td->td_nest_count before allowing the processing
      to occur.  Mainly to allow interrupt thread preemption to work for
      slow interrupts
    - Increment V_INTR statistic, so vm.stats.sys.v_intr shows correct value,
      i.e. 'Int' field in systat -vm
    Submitted-by: dillon@
  8. installer: Deactivate "Install extra software packages" option.

    Sascha Wildner authored
    Our installation unconditionally cpdups the CD/DVD's /usr/pkg to the
    disk so this option doesn't make sense and only confused people in the
    Leave "Remove software packages" in, though, since it actually seems to
  9. installer: Fix various issues related to MFS backed partitions.

    Sascha Wildner authored
    * The size of the MFS should be what the user specified, and not be
      based on slice size.
    * On the fstab line, specify block and fragment size too. Softupdates
      is ignored as it doesn't seem to play nice with MFS.
    * MFS backed partitions don't need to be mounted at installation time
      but the mount points have to be created anyway.
    * While here, perform some minor cleanup.
  10. installer: Fix typo that prevented the creation of MFS backed partiti…

    Sascha Wildner authored
    A bit late, but it was hard to spot. :)
    Reported-by:   Alec Berryman <>
    Dragonfly-bug: <>
  11. installer: Remove some OpenBSD specific code.

    Sascha Wildner authored
Something went wrong with that request. Please try again.