dragonfly.git
13 years agodocs - update tuning(7)
Matthew Dillon [Mon, 25 Oct 2010 01:23:45 +0000 (18:23 -0700)]
docs - update tuning(7)

* Get rid of a ton of old cruft that no longer applies and replace with
  more applicable information.

13 years agoFix typo in argv handling.
Antonio Huete Jimenez [Sun, 24 Oct 2010 22:59:45 +0000 (00:59 +0200)]
Fix typo in argv handling.

13 years agokernel - Temporarily back-out smp_invltlb() changes
Matthew Dillon [Sun, 24 Oct 2010 22:29:00 +0000 (15:29 -0700)]
kernel - Temporarily back-out smp_invltlb() changes

* These changes are deadlocking i386 kernels, and it is too close to
  the release so back them out for the release.  The issue will be
  fixed another way post-release.

13 years agokernel - Fix bug in the emergency interrupt polling thread
Matthew Dillon [Sun, 24 Oct 2010 22:27:14 +0000 (15:27 -0700)]
kernel - Fix bug in the emergency interrupt polling thread

* This thread is only active when kern.emergency_intr_enable is non-zero

* Get the next intr handler before processing the current one, since the
  act of processing the current handler may remove it.

* In the emergency interrupt polling thread do not stall if we cannot get
  the serializer for the interrupt.  just skip the handler and we'll try
  again next time.

13 years agosysctl.conf - Enable emergency interrupt polling at a low rate by default
Matthew Dillon [Sun, 24 Oct 2010 18:29:22 +0000 (11:29 -0700)]
sysctl.conf - Enable emergency interrupt polling at a low rate by default

* Set kern.emergency_intr_enable=1 in the ISO/IMG sysctl.conf for
  newly installed kernels.  The idea is so people can get things working
  more quickly and worry about performance afterwords.

* This commit actually got into the previous commit accidently so I am
  posting a following commit so we get a proper comment associated with it.

13 years agohammer utility - Add force support to cleanup
Matthew Dillon [Sun, 24 Oct 2010 18:01:41 +0000 (11:01 -0700)]
hammer utility - Add force support to cleanup

* Allow hammer -f cleanup to override the normal timestamp checking and
  force the cleanup to run.

13 years agonrelease - Add *_GENERIC_SMP for this release
Matthew Dillon [Sun, 24 Oct 2010 16:27:35 +0000 (09:27 -0700)]
nrelease - Add *_GENERIC_SMP for this release

* We will be stuffing both UP and SMP kernels on our release img/iso
  for 2.8.

13 years agonrelease - Release build adjustments
Matthew Dillon [Sun, 24 Oct 2010 07:00:59 +0000 (00:00 -0700)]
nrelease - Release build adjustments

* Add GITHOST override to Makefile.usr

* For now checkout 2010Q3 by default in master, this will be changed
  to 'master' in a month or two but for now we want to match the release.

* Add GITHOST feature to the nrelease Makefile, defaulting to
  git.dragonflybsd.org.  This allows developers who do release builds
  to specify a more local clone/mirror/copy of the pkgsrcv2.git and
  dragonfly.git repos.

  nrelease pulls from these repos so this can save a bunch of time.

* nrelease now installs each kernel into its own kernel.XXX directory
  in /boot, with a complete set of modules for each kernel.  This is
  instead of installing all kernels into /boot/kernel/ and naming them
  differently inside /boot/kernel/.

  This is to conform to the recent dloader work and very recent new
  menu features.

* All kernels+modules are installed with INSTALLSTRIPPEDMODULES so the
  ISO comes in at a reasonable size.

* The release ISO now contains both a UP and a SMP kernel, selectable
  at boot time.

* Do not try to include pkgsrc in the release ISO/IMG (at 1G+ it is too
  big).  We continue to include system sources.  There isn't enough room
  for full sources in the ISO/IMG.  Note that GUI builds will include
  a full pkgsrc and full sources, including a .git base for them.

* nrelease now supports a IMGSIZE override on the make line (in sectors),
  for the usb image.

* nrelease now autosizes the IMG file (when not overriden by IMGSIZE) to
  the nearest base-10 gigabyte to ensure that it fits on the USB stick
  and provide a bit of extra space for messing around.

13 years agomtree - no longer create /boot/modules
Matthew Dillon [Sun, 24 Oct 2010 03:27:30 +0000 (20:27 -0700)]
mtree - no longer create /boot/modules

* /boot/modules is no longer used, do not create it in mtree.

13 years agoboot - Massage dloader.menu a bit more
Matthew Dillon [Sun, 24 Oct 2010 02:32:03 +0000 (19:32 -0700)]
boot - Massage dloader.menu a bit more

* Don't present the 64-bit / 64-bit-smp boot options if the current default
  is already 64-bit.  The generic SMP boot option will still be presented
  if the current default is the 64-bit UP kernel.

13 years agoboot - Add a ton of features to the boot loader & adjust default menu
Matthew Dillon [Sun, 24 Oct 2010 02:03:51 +0000 (19:03 -0700)]
boot - Add a ton of features to the boot loader & adjust default menu

* Add conditionals ifset ifexists else elseifexists and endif

* Conditionalize dloader.menu to only present menu options for which
  the related kernels are present in /boot.

* Set the default kernel to one of:

  kernel, kernel.GENERIC, kernel.GENERIC_SMP, kernel.X86_64_GENERIC,
  or kernel.X86_64_GENERIC_SMP.  The first one in the list found becomes
  the default.

* If ${default_kernel}_SMP is available supply a menu option to change
  the default to that kernel, aka UP->SMP

* If kernel.X86_64_GENERIC[_SMP] is available and the current default is
  not the same supply menu options to change the default to the 64-bit
  UP or SMP kernel.

  Note however that for this to work the related boot kernel directory
  had better have a loader.conf.local in it that points the root mount
  to a 64-bit root 'cause 64-bit kernels can't run 32 bit binaries yet.

* Adjust the menu item execution code to copy the items before executing
  them, allowing recursive menu execution.  The recursive menu feature
  is a bit of a hack right now however.

* NOTE: the optcd for people ESCaping into the boot prompt was moved
  to dloader.rc, when updating you may have to manually reinstall that
  file to get the functionality.

13 years agoinstaller: Move chflags to the right place.
Sascha Wildner [Mon, 18 Oct 2010 23:50:51 +0000 (01:50 +0200)]
installer: Move chflags to the right place.

13 years agonetwork - Fix issue with recent unix domain socket gc fixes
Matthew Dillon [Sat, 23 Oct 2010 17:51:06 +0000 (10:51 -0700)]
network - Fix issue with recent unix domain socket gc fixes

* The gc's tracking of the deferral count could get out of sync and wind
  up looping forever due to the (now necessary) tsleep between loops.

* Fix by recalculating the count on each loop.

13 years agokernel - Fix pmap deactivate/reactivation race.
Matthew Dillon [Sat, 23 Oct 2010 16:43:18 +0000 (09:43 -0700)]
kernel - Fix pmap deactivate/reactivation race.

* The LWKT thread switch code clears the cpu mask bit in
  proc->p_vmspace->vm_pmap.pm_active, and the switch-in code sets the
  mask bit.

  This code has a bug because the switch code ALSO optimizes the loading
  of %cr3 to avoid reloading it if it hasn't changed, for example when
  switching between two user threads associated with the process,
  because the other cpu(s) running similar threads may lose track of
  the fact that our cpu also needs an IPI for page invalidations in the
  pmap for a short period of time.

  Because we don't reload %cr3 in this case, our tlb can become invalid.
  This can also occur with vfork() sequences.

* Fix by testing that we are switching to the same vmspace and do not
  clear the pm_active bit in that case.  Retain the %cr3 optimization.

13 years agokernel - synchronize smp_invltlb()
Matthew Dillon [Sat, 23 Oct 2010 16:41:44 +0000 (09:41 -0700)]
kernel - synchronize smp_invltlb()

* With much of the kernel running MPSAFE, smp_invltlb() cannot run
  asynchronously.

13 years agokernel - x86_64 - Add additional checks to lwp_wait() & friends
Matthew Dillon [Sat, 23 Oct 2010 16:35:14 +0000 (09:35 -0700)]
kernel - x86_64 - Add additional checks to lwp_wait() & friends

* lwp_wait() must defer reaping of a lwp that is still running on another
  cpu (i.e. in the midst of exiting).

* It shouldn't be possible for this to happen but just incase the thread
  gets switched out after TDF_EXITING has been set, also make sure
  the threat is no longer on the LWKT run queue.

* Remove old debugging in the LWKT scheduler path.

* Protect gd_freetd (per-cpu td cache) with a critical section.  Again
  this case should not occur as new threads are not allocated from
  interrupts, but protect it anyway.  Also assert that the cached free
  td is in no way still scheduled.

  Note that this cache is required to ensure that the td does not
  end up in the MP-accessible objcache before it has been fully
  descheduled.

13 years agokernel - x86_64 - Remove intrframe->if_gs
Matthew Dillon [Sat, 23 Oct 2010 16:33:49 +0000 (09:33 -0700)]
kernel - x86_64 - Remove intrframe->if_gs

* The if_gs field doesn't exist in the actual trap frame.

13 years agofix typo in previous commit
Alex Hornung [Sat, 23 Oct 2010 11:16:22 +0000 (12:16 +0100)]
fix typo in previous commit

13 years agoAdd comment regarding T_DNA passthrough with db
Alex Hornung [Sat, 23 Oct 2010 10:59:18 +0000 (11:59 +0100)]
Add comment regarding T_DNA passthrough with db

Requested-by: Aggelos Economopoulos (aggelos@)
13 years agolibdevmapper, liblvm - stop inter-lib linking
Alex Hornung [Sat, 23 Oct 2010 08:18:10 +0000 (09:18 +0100)]
libdevmapper, liblvm - stop inter-lib linking

* Don't link libraries to other libraries, this only causes trouble like
  having to do: -lprop -ldevmapper -lprop.

* Remove the double-linking to prop and crypto in cryptdisks.

Suggested-by: Sascha Wildner (swildner@)
13 years agocryptdisks rc.d - remove rcvar
Alex Hornung [Sat, 23 Oct 2010 07:34:01 +0000 (08:34 +0100)]
cryptdisks rc.d - remove rcvar

* Remove the rc variable to enable cryptdisks so that it always runs.
  It'll just check for the crypttab file, and if it isn't present, it
  doesn't do anything.

13 years agocrypttab.5 - Add LUKS-only note, remote empty line
Alex Hornung [Sat, 23 Oct 2010 07:27:56 +0000 (08:27 +0100)]
crypttab.5 - Add LUKS-only note, remote empty line

13 years agoFix UP kernel build.
Sascha Wildner [Sat, 23 Oct 2010 07:16:26 +0000 (09:16 +0200)]
Fix UP kernel build.

13 years agoinstaller: The sources.conf path is relative.
Sascha Wildner [Sat, 23 Oct 2010 01:21:36 +0000 (03:21 +0200)]
installer: The sources.conf path is relative.

13 years agolibkvm - Add ability to access userspace from kgdb on cores
Matthew Dillon [Sat, 23 Oct 2010 02:32:01 +0000 (19:32 -0700)]
libkvm - Add ability to access userspace from kgdb on cores

* Use %cr3 from the dumppcb instead of KPML4phys on x86_64, and similarly
  for i386, to access the full page table as of when the panic occured
  instead of just the kernel page table.

* minidumps do not dump userspace so userspace will still not be available,
  but this gives us the option of sysctl'ing off minidumps when userspace
  access is desired, and kgdb will then be able to access the current
  userspace context as of the panic, as well.

13 years agodevice mapper - implement dumping
Alex Hornung [Thu, 21 Oct 2010 06:47:46 +0000 (07:47 +0100)]
device mapper - implement dumping

* Implement dmdump and dump routines for the three main targets (linear,
  stripe and crypt).

* The top-level dmpdump will call all the required dump() methods in the
  targets just as it does with strategy() calls. The lower level
  target-specific dump routines will then redirect (after processing,
  etc) these requests to the underlying device's dump routines.

* This should provide quite reliable dumping even through device mapper,
  although it is more error-prone than the equivalent dumping on normal
  disks as there's a lot more going on behind the scenes.

13 years agodm dumping - peripheral changes
Alex Hornung [Fri, 22 Oct 2010 20:12:07 +0000 (21:12 +0100)]
dm dumping - peripheral changes

* Add a variable to allow tsleep to work even during a panic
  (tsleep_crypto_dump). This is currently only used by the crypto dump
  code.

* Allow T_DNA faults to happen during a panic.

* In userret() check for 'dump_stop_usertds' and if it is set, force
  user process into tstop().

* Add a dump_reactivate_cpus() function that will force all user threads
  into tstop() and restarts all cpus. This is currently only used by the
  crypto dump code.

13 years agodev_ddump - fix double get_mplock
Alex Hornung [Thu, 21 Oct 2010 08:15:58 +0000 (09:15 +0100)]
dev_ddump - fix double get_mplock

13 years agodevice-mapper - fix dmsize
Alex Hornung [Wed, 20 Oct 2010 18:39:44 +0000 (19:39 +0100)]
device-mapper - fix dmsize

* dmsize was returning the size instead of setting ap->a_result and
  returning 0.

13 years agocryptdisks - A small tool to parse /etc/crypttab
Alex Hornung [Fri, 22 Oct 2010 21:03:30 +0000 (22:03 +0100)]
cryptdisks - A small tool to parse /etc/crypttab

13 years agomake upgrade: Remove orphan symbolic links as well.
Sascha Wildner [Fri, 22 Oct 2010 10:21:48 +0000 (12:21 +0200)]
make upgrade: Remove orphan symbolic links as well.

test -e will try to follow symbolic links. If the target was removed
already it will return false.

Fix this by checking for symbolic links, too.

13 years agokernel - (mainly x86_64) - Fix a number of rare races
Matthew Dillon [Thu, 21 Oct 2010 23:07:05 +0000 (16:07 -0700)]
kernel - (mainly x86_64) - Fix a number of rare races

* Move the MP lock from outside to inside exit1(), also fixing an issue
  where sigexit() was calling exit1() without it.

* Move calls to dsched_exit_thread() and biosched_done() out of the
  platform code and into the mainline code.  This also fixes an
  issue where the code was improperly blocking way too late in the
  thread termination code, after the point where it had been descheduled
  permanently and tsleep decomissioned for the thread.

* Cleanup and document related code areas.

* Fix a missing proc_token release in the SIGKILL exit path.

* Fix FAKE_MCOUNT()s in the x86-64 code.  These are NOPs anyway
  (since kernel profiling doesn't work), but fix them anyway.

* Use APIC_PUSH_FRAME() in the Xcpustop assembly code for x86-64
  in order to properly acquire a working %gs.  This may improve the
  handling of panic()s on x86_64.

* Also fix some cases if #if JG'd (ifdef'd out) code in case the
  code is ever used later on.

* Protect set_user_TLS() with a critical section to be safe.

* Add debug code to help track down further x86-64 seg-fault issues,
  and provide better kprintf()s for the debug path in question.

13 years agodhclient - Do not remove default route unless setting a default route
Matthew Dillon [Wed, 20 Oct 2010 19:09:51 +0000 (12:09 -0700)]
dhclient - Do not remove default route unless setting a default route

* Do not just unconditionally remove the default route.  The dhclient's
  interface might not have anything to do with the default route.

13 years agonetwork - Fix socket & mbuf leak
Matthew Dillon [Wed, 20 Oct 2010 17:41:38 +0000 (10:41 -0700)]
network - Fix socket & mbuf leak

* When I retooled soabort*() and removed the wrapper I accidently lost the
  sofree() mechanic in the wrapper.

* Replace the mechanic with a messaged version.

Reported-by: Peter Avalos <peter@theshell.com>
13 years agodebug - Add mbufinfo
Matthew Dillon [Wed, 20 Oct 2010 17:34:24 +0000 (10:34 -0700)]
debug - Add mbufinfo

* This is a little utility which uses libkvm to scan all referenced mbufs
  in the kernel, for kernels compiled with MBUF_DEBUG.

13 years agolibc - Fix security issue in globbing code
Matthias Schmidt [Wed, 20 Oct 2010 17:08:20 +0000 (19:08 +0200)]
libc - Fix security issue in globbing code

There is a report about memory exhaustion in CVE-2010-2632 which also
affected us.  This patch, adopted from NetBSD, fixes the issue.

Tested-by: thomas@ and me
OK: dillon@

13 years agodevfs - Fix broken assertion
Matthew Dillon [Wed, 20 Oct 2010 16:45:19 +0000 (09:45 -0700)]
devfs - Fix broken assertion

* When checking fp->f_flag against ap->a_mode both sides must be
  masked with FMASK.

* Fixes a panic which can occur when a unix domain socket is being
  garbage collected (FMARK set).

13 years agodhclient-script.8: Comment out resolv.conf.tail(5) refs (no such manpage).
Sascha Wildner [Wed, 20 Oct 2010 13:38:23 +0000 (15:38 +0200)]
dhclient-script.8: Comment out resolv.conf.tail(5) refs (no such manpage).

13 years agomkinitrd.8: Adjust the manpage to the recent changes in the image path.
Sascha Wildner [Wed, 20 Oct 2010 12:28:37 +0000 (14:28 +0200)]
mkinitrd.8: Adjust the manpage to the recent changes in the image path.

13 years agokernel - Fix another hard critical section issue with syscons, revamp locking
Matthew Dillon [Wed, 20 Oct 2010 06:25:02 +0000 (23:25 -0700)]
kernel - Fix another hard critical section issue with syscons, revamp locking

* Use the new mtx_spinlock() facility instead of spinlock().  The new
  facility supports reetrant locks.

* Call all sc_*() functions with the syscons lock held.

* Fix an issue in blink_screen() where a hard critical section panic
  could potentially occur.

* Fix an issue in sc_puts() where adjusting the keyboard LED could still
  cause a hard critical section panic.  We just let the keyboard LED state
  be wrong for now.

13 years agokernel - revamp mtx_spinlock()
Matthew Dillon [Wed, 20 Oct 2010 06:19:29 +0000 (23:19 -0700)]
kernel - revamp mtx_spinlock()

* Revamp mtx_spinlock(), add mtx_spinlock_try(), and add mtx_spinunlock().

* Enter a proper hard critical section when using mtx_spinlock*(),
  just like the normal spinlock() code does.

  The difference is that mtx spinlocks have a ref count and thus are
  reentrant.

* mtx_spinlock*() is not used in the code yet.  A followup commit will
  begin using it for the syscons lock.

13 years agocryptosoft - Zero out ctx after SHA1 or MD5 op
Alex Hornung [Tue, 19 Oct 2010 18:05:17 +0000 (19:05 +0100)]
cryptosoft - Zero out ctx after SHA1 or MD5 op

Obtained-from: OpenBSD

13 years agodloader - remove header and footer bars
Alex Hornung [Tue, 19 Oct 2010 18:01:23 +0000 (19:01 +0100)]
dloader - remove header and footer bars

13 years agokernel - Force NFSv3 for diskless nfs mount
Matthew Dillon [Tue, 19 Oct 2010 19:31:29 +0000 (12:31 -0700)]
kernel - Force NFSv3 for diskless nfs mount

* Ignore any file handles passed from bootp.  These are NFSv2 handles
  and NFSv2 just doesn't have the directory support needed if the
  server is running a filesystem with 64-bit directory cookies (as HAMMER
  does).

  This will force the kernel's diskless nfs mount to re-authorize and
  acquire a NFSv3 handle for the root mount.

* Undo a bit of a previous commit where I tried to enable readdirplus for
  NFSv2 to workaround NFSv2 directory cookie issues.  It just doesn't work.
  readdirplus is again force-disabled for NFSv2 mounts.

13 years agoboot - Bring in fix for qemu menu time bug
Matthew Dillon [Tue, 19 Oct 2010 17:42:49 +0000 (10:42 -0700)]
boot - Bring in fix for qemu menu time bug

* qemu does not debounce the RTC data.  The RTC chip uses a serial interface
  as well as a simple carry propagation incremenber which can catch
  transitions in the middle of an update, resulting in corrupted data.

* Simply requery the time until a stable value is found.

Suggested-by: Oliver Fromme <check+lajddm00rsub4p7p@fromme.com>
13 years agoFix a typo in the vkernel rc script.
Sascha Wildner [Mon, 18 Oct 2010 10:00:57 +0000 (12:00 +0200)]
Fix a typo in the vkernel rc script.

Submitted-by: Rumko
13 years agoHAMMER VFS - Minor bug (caught by assertion panic)
Matthew Dillon [Mon, 18 Oct 2010 07:49:59 +0000 (00:49 -0700)]
HAMMER VFS - Minor bug (caught by assertion panic)

* A snapshot can sometimes contain visible inodes whos nlinks count is 0,
  essentially the snapshot 'catches' the file in the middle of being deleted.

* HAMMER was attempting to truncate the data for such inodes if the file
  were opened and then closed, and failed to check whether the inode was a
  snapshot or a current inode.  This flowed through until it hit an assertion
  designed to detect precisely that case.

* Fixed by adding a check to determine if the inode is a snapshot and/or
  the filesystem is mounted read-only.

Repored-by: Max <herrgard@gmail.com>
13 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Mon, 18 Oct 2010 07:17:18 +0000 (00:17 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

13 years agokernel - Fix bug in unp_gc()
Matthew Dillon [Mon, 18 Oct 2010 07:10:35 +0000 (00:10 -0700)]
kernel - Fix bug in unp_gc()

* Fix a race against a file close where FDEFER can wind up being left
  set.

* Fix a panic during unix domain socket garbage collection where a token
  was being acquired with a spinlock held.  Use trytoken instead and if
  it fails simply defer checking of the (fp) in question.

13 years agokernel - Remove confusing warning
Matthew Dillon [Mon, 18 Oct 2010 07:02:55 +0000 (00:02 -0700)]
kernel - Remove confusing warning

* Remove the "bio_page_alloc: WARNING emergency page allocation" warning
  and replace it with a sysctl counter.

* Keep the allocation failure warning and add a sysctl counter for it too.

13 years agoRaise default .Os value for the manual pages to 2.9 on 2.9.
Sascha Wildner [Mon, 18 Oct 2010 07:01:01 +0000 (09:01 +0200)]
Raise default .Os value for the manual pages to 2.9 on 2.9.

13 years agorelease engineering - Bump master to 2.9 v2.9.0
Matthew Dillon [Mon, 18 Oct 2010 05:31:50 +0000 (22:31 -0700)]
release engineering - Bump master to 2.9

13 years agokernel - Fix race in bio_track_wait()
Matthew Dillon [Mon, 18 Oct 2010 05:23:52 +0000 (22:23 -0700)]
kernel - Fix race in bio_track_wait()

* Remove an improper optimization prior to an atomic cmpset function call.

13 years agokernel - Fix NFS client & server bugs
Matthew Dillon [Mon, 18 Oct 2010 04:48:47 +0000 (21:48 -0700)]
kernel - Fix NFS client & server bugs

* A very long standing bug in the server cache was finally whacked.  The
  write-gather code was improperly returning the wrong mbuf for the server
  to reply with, causing client stalls.  This behavior depends on the client
  doing burst asynchronous writes.  Newer releases of DragonFly do burst
  asynchronous writes but older ones tended not to.

* The server cache was not MPSAFE.  Add a MP token to fix that.

* Remove critical sectons from the server cache which are no longer needed.

* Fix a potential client-side rpc request race where a request's
  NEEDSXMIT flag is not set until after the request possibly blocks,
  which can lead to issues if another thread picks up the request
  and then believes that it has already been transmitted when it
  has not.

* Document a big problem with NFSv2 and HAMMER-served directories.  NFSv2
  only has 32-bit directory cookies.  It is possible to work around the
  problem by using rdirplus (which is the default now).  However, some
  servers may not be able to handle rdirplus with a NFSv2 mount.

  Users who need to serve out NFSv2 cannot serve HAMMER directories
  with NFSv2 unless the clients support rdirplus.

  Our defaults are NFSv3 and rdirplus and NFSv3 does NOT have this problem.

Reported-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk>
13 years agokernel - Fix padlock panic in hw crypto
Matthew Dillon [Sun, 17 Oct 2010 19:56:44 +0000 (12:56 -0700)]
kernel - Fix padlock panic in hw crypto

* padlock_freesession_one() was zeroing out the structure which caused
  ses_freeaddr to be lost.  Restore ses_freeaddr.

Reported-by: lentferj
13 years agoBring in uguru(4) for ABIT temperature, voltage and fan sensors.
Sascha Wildner [Sun, 17 Oct 2010 13:27:18 +0000 (15:27 +0200)]
Bring in uguru(4) for ABIT temperature, voltage and fan sensors.

Ported-from: OpenBSD
Tested-by: Max Herrgard <herrgard@gmail.com>
13 years agodevfs - Fix mountpoint specific rules
Alex Hornung [Fri, 15 Oct 2010 15:03:42 +0000 (16:03 +0100)]
devfs - Fix mountpoint specific rules

* Mount-point specific rules depend upon f_mntonname to be correct, so
  populate this field of mnt_stat on mount().

Reported-by: Hugo
13 years agoundo - stat(2) may not populate struct stat upon failure.
YONETANI Tomokazu [Fri, 15 Oct 2010 01:20:48 +0000 (10:20 +0900)]
undo - stat(2) may not populate struct stat upon failure.

13 years agotest/vkernel - Include ROOTSIZE environment variable in Makefile's help
Antonio Huete Jimenez [Thu, 14 Oct 2010 19:37:55 +0000 (21:37 +0200)]
test/vkernel - Include ROOTSIZE environment variable in Makefile's help

13 years agoloader.8: Improve wording. Fix typos and an error.
Sascha Wildner [Thu, 14 Oct 2010 09:12:24 +0000 (11:12 +0200)]
loader.8: Improve wording. Fix typos and an error.

13 years agopowernow(4): Make it build on x86_64 and hook it in the x86_64 build.
Sascha Wildner [Thu, 14 Oct 2010 07:22:47 +0000 (09:22 +0200)]
powernow(4): Make it build on x86_64 and hook it in the x86_64 build.

Tested-by: Max Herrgard <herrgard@gmail.com>
13 years agoUpdate the rc.conf's man page's vkernel section.
Rumko [Tue, 12 Oct 2010 22:20:37 +0000 (00:20 +0200)]
Update the rc.conf's man page's vkernel section.

A few new vars were introduced and one was made optional.

13 years agorc.d/vkernel: pidfile related enhancements
Rumko [Sun, 10 Oct 2010 18:21:35 +0000 (20:21 +0200)]
rc.d/vkernel: pidfile related enhancements

Fix a typo when checking for the pid file when starting a vkernel.
Better checking if the vkernel being started is already running.

13 years agorc.d: completely stop the vkernels
Rumko [Sun, 10 Oct 2010 17:12:33 +0000 (19:12 +0200)]
rc.d: completely stop the vkernels

When stopping the vkernel, after a set timeout if the vkernel is still
alive, send a SIGKILL.
Also redirect STDIN when starting the vkernels.

13 years agovkernel: rc improvements
Rumko [Sun, 10 Oct 2010 15:20:40 +0000 (17:20 +0200)]
vkernel: rc improvements

Add a vkernel_bin var that contains the default path to the binary,
for all the vkernels without a vkernel specific entry.
Also the root image is no longer required (diskless vkernels have no
use for a root image).
And when stopping a vkernel a pidfile is required so we don't kill
innocent bystanders.

13 years agoucom - destroy device node on detach
YONETANI Tomokazu [Tue, 12 Oct 2010 12:32:14 +0000 (21:32 +0900)]
ucom - destroy device node on detach

Issuing `ls /dev' after unloading the driver triggered a panic because
of the stale device node.

13 years agoidentcpu.c: Fix a typo in the Features2 strings and rename AES -> AESNI.
Sascha Wildner [Tue, 12 Oct 2010 03:10:34 +0000 (05:10 +0200)]
identcpu.c: Fix a typo in the Features2 strings and rename AES -> AESNI.

13 years agoaesni(4): Move CPUID2_AESNI to specialreg.h. Also add CPUID2_PCLMULQDQ.
Sascha Wildner [Tue, 12 Oct 2010 03:10:01 +0000 (05:10 +0200)]
aesni(4): Move CPUID2_AESNI to specialreg.h. Also add CPUID2_PCLMULQDQ.

13 years agoAdd an aesni(4) manual page (taken from FreeBSD).
Sascha Wildner [Tue, 12 Oct 2010 02:44:37 +0000 (04:44 +0200)]
Add an aesni(4) manual page (taken from FreeBSD).

13 years agomdoc.local: Add FreeBSD 9.0.
Sascha Wildner [Tue, 12 Oct 2010 02:44:19 +0000 (04:44 +0200)]
mdoc.local: Add FreeBSD 9.0.

13 years agochroot.2: Add chroot_kernel() to .Nm.
Sascha Wildner [Tue, 12 Oct 2010 02:24:05 +0000 (04:24 +0200)]
chroot.2: Add chroot_kernel() to .Nm.

13 years agorename.2: Add renameat() to .Nm and .Rv.
Sascha Wildner [Tue, 12 Oct 2010 02:01:12 +0000 (04:01 +0200)]
rename.2: Add renameat() to .Nm and .Rv.

13 years agofortune -- Its time for pie.
Venkatesh Srinivas [Mon, 11 Oct 2010 22:09:00 +0000 (15:09 -0700)]
fortune -- Its time for pie.

13 years agoEnable DSO support in OpenSSL.
Peter Avalos [Sun, 10 Oct 2010 23:28:01 +0000 (13:28 -1000)]
Enable DSO support in OpenSSL.

OpenSSL can now load engines at run-time.  We install a few in
/usr/lib/engines/ by default.

13 years agonmalloc - Fix depot race - this should fix remaining issues with firefox.
Matthew Dillon [Mon, 11 Oct 2010 19:21:32 +0000 (12:21 -0700)]
nmalloc - Fix depot race - this should fix remaining issues with firefox.

* nmalloc was accidently calling the libc _pthread_spin_lock() stub
  even when threaded, causing all depot operations to race.  No actual
  lock was being acquired.

  Change it over to the internal _SPINLOCK() API.

* Expand libthread_xu's base spinlocks from 128 to 256 and use those
  for the depot lock.  Note that the depot[] array can be upwards of
  80 elements so lets not take any chances.

Reported-by: Pierre Abbat <phma@phma.optus.nu>, others
13 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Mon, 11 Oct 2010 17:00:23 +0000 (10:00 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

13 years agoTest commit.
Sascha Wildner [Mon, 11 Oct 2010 10:26:18 +0000 (12:26 +0200)]
Test commit.

13 years agoTest commit.
Sascha Wildner [Mon, 11 Oct 2010 08:04:31 +0000 (10:04 +0200)]
Test commit.

13 years agoTest commit.
Sascha Wildner [Mon, 11 Oct 2010 07:04:33 +0000 (09:04 +0200)]
Test commit.

13 years agoTest commit.
Sascha Wildner [Mon, 11 Oct 2010 06:50:17 +0000 (08:50 +0200)]
Test commit.

13 years agoinstaller: Fix an issue in the UFS install.
Sascha Wildner [Sun, 10 Oct 2010 16:59:06 +0000 (18:59 +0200)]
installer: Fix an issue in the UFS install.

I had broken using '*' as partition size in my previous commit.

13 years agolibcrypto: Enable cryptodev support.
Peter Avalos [Sun, 10 Oct 2010 11:49:41 +0000 (01:49 -1000)]
libcrypto:  Enable cryptodev support.

Reported-by: Jan Lentfer <Jan.Lentfer@web.de>
13 years agoumass: Add support for WD USB HDD
Alex Hornung [Sun, 10 Oct 2010 06:58:20 +0000 (07:58 +0100)]
umass: Add support for WD USB HDD

* Add Western Digital USB HDD Passport

Submitted-by: Dylan Reinhold
Dragonfly-bug: http://bugs.dragonflybsd.org/issue1768

13 years agoMerge branch 'master' of git://uther.dragonflybsd.org/dragonfly
Matthias Schmidt [Sun, 10 Oct 2010 07:59:37 +0000 (09:59 +0200)]
Merge branch 'master' of git://uther.dragonflybsd.org/dragonfly

13 years agolibc - Move the newmag prestage code
Matthew Dillon [Sat, 9 Oct 2010 22:45:06 +0000 (15:45 -0700)]
libc - Move the newmag prestage code

* Avoid any possible assumptions due to reentrnacy by moving
  the pre-stage code.

13 years agovkernel - Scrap some old install stuff that no longer applies
Matthew Dillon [Sat, 9 Oct 2010 22:23:55 +0000 (15:23 -0700)]
vkernel - Scrap some old install stuff that no longer applies

* Scrap some stuff that prevented vkernels from being
  installed properly.

Submitted-by: Rumko
13 years agopf.os - Add DragonFly OS fingerprints
Matthias Schmidt [Sat, 9 Oct 2010 22:06:11 +0000 (00:06 +0200)]
pf.os - Add DragonFly OS fingerprints

13 years agolibc - Do some reorganization of nmalloc() and add asserts.
Matthew Dillon [Sat, 9 Oct 2010 21:47:47 +0000 (14:47 -0700)]
libc - Do some reorganization of nmalloc() and add asserts.

* Reorganize mtmagazine_alloc() and mtmagazine_free() to make the code
  more clear.  Add assertions on 'continue' loops so we abort on
  magazine memory corruption instead of looping forever.

* Pre-stage the new magazine that mtmagazine_free() might need to avoid
  having to relock the depot.  This also allows us to stage the new
  magazine directory into the per-thread loaded field instead of running
  it through the depot.

* Fix a deep or infinite recursion which can occur when mtmagazine_free()
  calls _slaballoc(), which it does sometimes when it needs a new
  magazine.  Avoid reentrancy by temporarily disabling the per-thread
  cache around the call.

13 years agoPF: Fix Operating System Fingerprinting
Jan Lentfer [Sat, 9 Oct 2010 17:40:30 +0000 (19:40 +0200)]
PF: Fix Operating System Fingerprinting

   Due to some wrongly imported byte-order conversions osfp was
   broken.

   Reported and tested by: Matthias Schmidt (matthias@dragonflybsd.org)

13 years agolibc - Fix livelock in nmalloc
Matthew Dillon [Sat, 9 Oct 2010 16:26:46 +0000 (09:26 -0700)]
libc - Fix livelock in nmalloc

* free() -> _slabfree() was turning around and calling _slaballoc()
  with the depot lock held, which could lead to a livelock.  Fix by
  unlocking the depot lock around the call.

* Clean up and document other unrelated bits of nmalloc(). In particular,
  clean up magazine_alloc().

Reported-by: Siju George <sgeorge.ml@gmail.com>, and others
13 years agolibthread_xu: Add references for pthread_mutexattr_{get,set}pshared().
Sascha Wildner [Sat, 9 Oct 2010 14:41:13 +0000 (16:41 +0200)]
libthread_xu: Add references for pthread_mutexattr_{get,set}pshared().

13 years agopthread_condattr_getpshared(3): Correctly store the attribute.
Sascha Wildner [Sat, 9 Oct 2010 03:53:30 +0000 (05:53 +0200)]
pthread_condattr_getpshared(3): Correctly store the attribute.

13 years agolibprop: Clean up the Makefile a bit (and raise WARNS to 3).
Sascha Wildner [Fri, 8 Oct 2010 01:37:38 +0000 (03:37 +0200)]
libprop: Clean up the Makefile a bit (and raise WARNS to 3).

13 years agosend(2) - Add MSG_NOSIGNAL flag.
Antonio Huete Jimenez [Wed, 6 Oct 2010 20:16:03 +0000 (22:16 +0200)]
send(2) - Add MSG_NOSIGNAL flag.

POSIX:2008 introduces the MSG_NOSIGNAL flag that requests
not to send the SIGPIPE signal if an attempt to send
is made on a stream-oriented socket that is no longer
connected. The EPIPE error shall still be returned.

This fixes the build of multimedia/gst-plugins-bad in
current pkgsrc.

13 years agokernel: Remove unneeded inclusions of <sys/cdefs.h>.
Sascha Wildner [Wed, 6 Oct 2010 19:11:52 +0000 (21:11 +0200)]
kernel: Remove unneeded inclusions of <sys/cdefs.h>.

13 years agoMerge branch 'master' of git://uther.dragonflybsd.org/dragonfly
Matthias Schmidt [Wed, 6 Oct 2010 18:43:32 +0000 (20:43 +0200)]
Merge branch 'master' of git://uther.dragonflybsd.org/dragonfly

13 years agovkernel - Fix installkernel target
Matthias Schmidt [Wed, 6 Oct 2010 18:35:50 +0000 (20:35 +0200)]
vkernel - Fix installkernel target

The recommended command to install a vkernel is ATM:

make -DNO_MODULES installkernel KERNCONF=VKERNEL DESTDIR=/var/vkernel

This installed the plain kernel into /var/vkernel.  Due to the
introduction of the new loader (dloader), the installkernel target
refused to work, because it could not find a boot/ directory.

Skip the error message about missing boot/ and skip the creation of the
kernel.old/ backup directory when installing a vkernel kernel.

13 years agoinstaller: Clean up check_capacity() (UFS) a bit and improve the message.
Sascha Wildner [Fri, 1 Oct 2010 01:12:15 +0000 (03:12 +0200)]
installer: Clean up check_capacity() (UFS) a bit and improve the message.

13 years agopf.os - Sync with OpenBSD
Matthias Schmidt [Wed, 6 Oct 2010 09:21:19 +0000 (11:21 +0200)]
pf.os - Sync with OpenBSD

13 years agoloader(8): adjustment & man update
Thomas Nikolajsen [Wed, 6 Oct 2010 00:43:14 +0000 (02:43 +0200)]
loader(8): adjustment & man update

 * fix `help' command by using $base/loader.help,
otherwise `help' didn't work when pwd outside $base.
 * allow `cd' and `optcd' without arguments,
using $base as default.
 * use pager for `?' and `local' commands.
 * make `more' work with relative file names
 * truncate very long lines (more than 256 chars),
and give warning; before they stopped include processing;
these are typically just comments.
 * add `optcd kernel' when using ESC in `menu',
like the menu item (`9') that exits via dloader.menu.
 * remove extra line in Fred menu (on right)
(it was scrolling warning about truncated line off screen).
 * remove obsolete variables in loader.conf.
 * update `help' output.
 * update man pages.