dragonfly.git
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.

13 years agolibstand: add fgets()
Thomas Nikolajsen [Tue, 5 Oct 2010 22:44:45 +0000 (00:44 +0200)]
libstand: add fgets()

This fgets() operates on int fd, not FILE * stream,
as libstand doesn't supply FILE type.

fgetstr() is already in libstand, but it can't determine
if line did fit in supplied buffer.

13 years agolibstand.3: remove .Xo/.Xc
Thomas Nikolajsen [Wed, 6 Oct 2010 00:32:03 +0000 (02:32 +0200)]
libstand.3: remove .Xo/.Xc

13 years agokernel - Fix vmtotal sysctl
Matthew Dillon [Tue, 5 Oct 2010 23:07:32 +0000 (16:07 -0700)]
kernel - Fix vmtotal sysctl

* Recognize unbounded VM objects and do not try to include their sizes
  in the vmtotal structure.

* Should fix systat -vm output for the All/Tot entry.

* Redo the vmstat structure.  Use long's and int64_t's as
  appropriate.

* Adjust systat and vmstat to deal with the new field widths
  in struct vmstat.

Reported-by: Antonio Huete Jimenez <ahuete.devel@gmail.com>
13 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Tue, 5 Oct 2010 21:03:24 +0000 (14:03 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

13 years agoHAMMER VFS - Fix deadlock during read-only HAMMER mount (2)
Matthew Dillon [Tue, 5 Oct 2010 21:02:14 +0000 (14:02 -0700)]
HAMMER VFS - Fix deadlock during read-only HAMMER mount (2)

* Slightly more correct fix.  Only translate zone offsets which can be
  translated.

Tested-by: Matthias Schmidt <matthias@dragonflybsd.org>
13 years agoinstaller: Raise the recommended size for / in the UFS install.
Sascha Wildner [Tue, 5 Oct 2010 19:33:29 +0000 (21:33 +0200)]
installer: Raise the recommended size for / in the UFS install.

It turned out that the x86_64 install's contents of / didn't fit into
256M. So increase to 320M for the smallest supported disks (2-4G) and
raise it gradually to 640M (4-10G) and 768 (anything above 10G). The
latter is also the HAMMER install's default recommendation.

The best solution here would probably be to base the recommendations
on the actual contents of the medium (to be tackled after the release).

Reported-by: Przemyslaw Pawelczyk <pp_o2@o2.pl>
13 years agokernel - Fix panic when unblanking screen saver
Matthew Dillon [Tue, 5 Oct 2010 18:49:51 +0000 (11:49 -0700)]
kernel - Fix panic when unblanking screen saver

* When console output occurs while the screen is blanked, e.g. when
  using something like blank_saver.ko, we hit a hard path lock assertion.

* Queue the unblank request instead of trying to unblank the screen
  directly in this path.

Reported-by: Sascha Wildner <swildner@crater.dragonflybsd.org>
13 years agoHAMMER VFS - Fix deadlock during read-only HAMMER mount
Matthew Dillon [Tue, 5 Oct 2010 16:36:42 +0000 (09:36 -0700)]
HAMMER VFS - Fix deadlock during read-only HAMMER mount

* HAMMER UNDOs are addressed using zone-1 (HAMMER_ZONE_RAW_VOLUME) and
  zone-2 (HAMMER_ZONE_RAW_BUFFER) data offsets.  Normal filesystem
  operations may use zone references which are incompatible with the UNDO
  data references.  That is, they may use a different zone accessing
  the same physical disk offset.

  Normally when the UNDO is run the modified buffers are flushed to disk
  and the buffers are destroyed before normal filesystem operations begin.
  Thus it isn't a problem for normal R+W mounts.

* Read-only mounts are a different story.  The modified buffers from the
  undo are left in core memory (they cannot be flushed yet because the
  mount is read-only).  The incompatible zones cause the HAMMER buffer
  system to lose track of related locked buffer cache buffers and can lead
  to a deadlock.

* Fix this by explicitly checking for a read-only mount and doing a
  secondary lookup using the RAW zone for certain selected zones.

Reported-by: Matthias Schmidt <matthias@dragonflybsd.org>
13 years agoprocfs: Add vnode path to /proc/<pid>/map for vn-backed vm objects.
Venkatesh Srinivas [Tue, 5 Oct 2010 13:18:02 +0000 (06:18 -0700)]
procfs: Add vnode path to /proc/<pid>/map for vn-backed vm objects.

13 years agoliblvm: Raise WARNS to 1.
Sascha Wildner [Tue, 5 Oct 2010 07:50:19 +0000 (09:50 +0200)]
liblvm: Raise WARNS to 1.

Since __BSD_VISIBLE is unset for liblvm compilation, we need to add the
standard define for alloca() (taken from <stdlib.h>) to lib.h to prevent
warnings.

While here, clean up the Makefile a bit, too.

13 years agolibcryptsetup & libluks: Raise WARNS to 1.
Sascha Wildner [Tue, 5 Oct 2010 07:43:12 +0000 (09:43 +0200)]
libcryptsetup & libluks: Raise WARNS to 1.

13 years agogcc44: Teach gcc44 about our special conversions, such as %b and %D.
Sascha Wildner [Tue, 5 Oct 2010 07:26:41 +0000 (09:26 +0200)]
gcc44: Teach gcc44 about our special conversions, such as %b and %D.

Some special code is necessary to have %D take precedence over the DD
length specifier (which is not present in gcc41). Eventually, we will
probably have to get rid of all these local conversions entirely.

This commit gets rid of a large bunch of warnings when compiling the
kernel with gcc44.

13 years agotop - Adjust docs
Matthew Dillon [Tue, 5 Oct 2010 02:34:54 +0000 (19:34 -0700)]
top - Adjust docs

* Adjust manual page for PRES addition.

13 years agotop - Adjust top display
Matthew Dillon [Tue, 5 Oct 2010 02:30:07 +0000 (19:30 -0700)]
top - Adjust top display

* Replace RES with PRES, remove PRI.  This opens up more space for the
  command which had gotten too squeezed.

* Realign columns for smp and non-smp displays.

* Remove annoying "This terminal can only display..." message from the
  original contrib code.

13 years agokernel - Add Proportional RSS (PRES)
Matthew Dillon [Tue, 5 Oct 2010 02:16:57 +0000 (19:16 -0700)]
kernel - Add Proportional RSS (PRES)

* Track vm_object sharing and calculate proportional RSS in kinfo_proc

* Add PRES to the top(1) output

Submitted-by: Pratyush Kshirsagar <pratyush.kshirsagar@gmail.com>
13 years agonetwork - Fix altq_red
Matthew Dillon [Tue, 5 Oct 2010 00:44:24 +0000 (17:44 -0700)]
network - Fix altq_red

* altq_red was asserting that it could only be called from PF when in fact
  it can also be called via ifq_enqueue().

* Add code to handle the ifq_enqueue path.

Reported-by: Francois Tigeot <ftigeot@wolfpond.org>
13 years agopkgsrc - Hack for dynamic loading of certain libgcc.a symbols (2)
Matthew Dillon [Mon, 4 Oct 2010 20:15:15 +0000 (13:15 -0700)]
pkgsrc - Hack for dynamic loading of certain libgcc.a symbols (2)

* Make the hack i386-specific.

13 years agopkgsrc - Hack for dynamic loading of certain libgcc.a symbols
Matthew Dillon [Mon, 4 Oct 2010 18:48:35 +0000 (11:48 -0700)]
pkgsrc - Hack for dynamic loading of certain libgcc.a symbols

* For some reason firefox cannot find __popcountsi2 in a late reference
  from libcairo.so.2, which occurs when certain page content is accessed.
  This reference does not occur immediately.

* Add a weak reference from libc to force the symbol to be available,
  which appears to fix the problem.

* This is a horrible hack and currently we do not know why the dynamic
  link code cannot find the symbol.

13 years agolibc - Fix some recursion issues during thread teardown
Matthew Dillon [Mon, 4 Oct 2010 18:35:48 +0000 (11:35 -0700)]
libc - Fix some recursion issues during thread teardown

* thread destructors called by sophisticated pthreaded programs such
  as firefox can wind up allocating/freeing space multiple times
  AFTER nmalloc's destructor is run.

  This can leave the mtmagazine in a weird state because it's destructor
  fails to NULL-out tp->mags[i].loaded and tp->mags[i].prev.

* Properly NULL out tp->mags[i].{loaded,prev} in the destructor.

* Lockout mtmagazine use while the mtmagazine is being initialized or
  destroyed.

* Permanently lockout mtmagazine use after its destructor has been run.

* Instead of trying to initialize the mtmagazine on the first free, which
  might not occur until the destrutor is run (causing pthreads to complain
  about destructors being left hanging), have libthread_xu call a new
  function _nmalloc_thr_init() during thread creation and do all the slab
  initialization there.

13 years agonetwork - Fix udp multicast assertion & mplock for ip_output
Matthew Dillon [Mon, 4 Oct 2010 15:34:03 +0000 (08:34 -0700)]
network - Fix udp multicast assertion & mplock for ip_output

* Fix an assertion which is no longer valid, the MP lock is no longer
  held by the caller when passing a multicast packet into ip_output.

* Move the mp lock for udp multicast packets inward.  The underlying code
  still isn't mpsafe.

Reported-by: "Edward O'Callaghan" <eocallaghan@auroraux.org>
13 years agoFix VKERNEL64 build.
Sascha Wildner [Mon, 4 Oct 2010 11:03:00 +0000 (13:03 +0200)]
Fix VKERNEL64 build.

13 years agokernel: Fix numerous errors in printf() like formats and arguments.
Sascha Wildner [Mon, 4 Oct 2010 10:58:06 +0000 (12:58 +0200)]
kernel: Fix numerous errors in printf() like formats and arguments.

13 years agokernel: Add some __printflike()'s to protect against format issues.
Sascha Wildner [Mon, 4 Oct 2010 06:03:43 +0000 (08:03 +0200)]
kernel: Add some __printflike()'s to protect against format issues.

13 years agoTeach gcc41 about %b and %D taking two parameters in a better way.
Sascha Wildner [Mon, 4 Oct 2010 06:33:54 +0000 (08:33 +0200)]
Teach gcc41 about %b and %D taking two parameters in a better way.

Previously, we had special code to handle the properties of %b and %D
(which are for printing bit masks and hexdumps, respectively). Remove
this code and instead use chained format_char_info's to pass the
information that both of these formats consume two arguments.

13 years agohammer(8): Fix wrong message.
Sascha Wildner [Sun, 3 Oct 2010 17:54:39 +0000 (19:54 +0200)]
hammer(8): Fix wrong message.

Noticed-by: beket
13 years agopflogd(8): Use TAB for indentation.
Sascha Wildner [Sat, 2 Oct 2010 21:09:22 +0000 (23:09 +0200)]
pflogd(8): Use TAB for indentation.

13 years agopflogd(8): Raise WARNS to 6.
Sascha Wildner [Sat, 2 Oct 2010 11:03:43 +0000 (13:03 +0200)]
pflogd(8): Raise WARNS to 6.

13 years agorc.resume - Reassociate with WPA client on resume
Matthias Schmidt [Sat, 2 Oct 2010 12:55:01 +0000 (14:55 +0200)]
rc.resume - Reassociate with WPA client on resume

change a comment while here and accept ACPI state 5.

Obtained-From: FreeBSD

13 years agogzip - Do not return from write after each inflate
Matthias Schmidt [Fri, 1 Oct 2010 19:20:23 +0000 (21:20 +0200)]
gzip - Do not return from write after each inflate

From FreeBSDs commit message:

In the past gunzip(1) write()'s after each inflate return.  This is
not optimal from a performance standpoint since the write buffer is
not necessarily be filled up when the inflate rountine reached the
end of input buffer and it's not the end of file.

Submitted-By: Xin LI <delphij@FreeBSD.org>
Obatined-From: FreeBSD

13 years agoRegenerate the pciconf(8) database
Sascha Wildner [Fri, 1 Oct 2010 15:04:39 +0000 (17:04 +0200)]
Regenerate the pciconf(8) database

...from the following files:

Hart:    Jan 22, 2008 (version 671)
Boemler: Oct  1, 2010
Mares:   Aug 27, 2010

13 years agofdisk(8): Fix a bug when reading >1TB slice sizes from a config file.
Sascha Wildner [Fri, 1 Oct 2010 05:24:20 +0000 (07:24 +0200)]
fdisk(8): Fix a bug when reading >1TB slice sizes from a config file.

The numerical parameters in configuration file lines were previously
read into signed integers. This would cause a problem with a config
file line like this (for a ~1.2TB slice):

p 1 165 63 2491404993

The length parameter (2491404993) for the slice would have exceeded
INT_MAX (2147483647) and the slice would have been truncated to 1TB.

Since the installer is using fdisk with a configuration file, it
was previously not possible to use a whole >1TB disk from it (one
had to work around it from the command line).

To fix all this, read the numerical parameters in configuration file
lines into a long long.

Note that this change only affects the variable type into which the
parameters read from the file are stored and not any on-disk structures.
Also, checks at different places in fdisk(8) will of course still ensure
that we don't ever go above 2TB.

13 years agosshd - Remove libmd from link to fix SHA*() function conflicts
Matthew Dillon [Fri, 1 Oct 2010 02:01:51 +0000 (19:01 -0700)]
sshd - Remove libmd from link to fix SHA*() function conflicts

* libmd conflicts with libcrypto, remove libmd from the link to fix
  conflicts which were breaking putty connections to sshd.

Reported-by: Peter Avalos <peter@theshell.com>
13 years agoSYSINIT.9: More mdoc fixes.
Sascha Wildner [Fri, 1 Oct 2010 00:04:22 +0000 (02:04 +0200)]
SYSINIT.9: More mdoc fixes.

13 years agoSYSINIT.9: Some cleanup (mostly whitespace).
Sascha Wildner [Thu, 30 Sep 2010 22:41:38 +0000 (00:41 +0200)]
SYSINIT.9: Some cleanup (mostly whitespace).

13 years agodsched.9: Fix a typo.
Sascha Wildner [Thu, 30 Sep 2010 22:41:20 +0000 (00:41 +0200)]
dsched.9: Fix a typo.

13 years agoFix warnings when compiled with ACPI_IO
Michael Neumann [Sun, 10 Oct 2010 21:33:31 +0000 (23:33 +0200)]
Fix warnings when compiled with ACPI_IO

13 years agoMerge branch 'master' of git://git.dragonflybsd.org/dragonfly
Michael Neumann [Sun, 10 Oct 2010 21:00:06 +0000 (23:00 +0200)]
Merge branch 'master' of git://git.dragonflybsd.org/dragonfly

13 years agoMP table: Do preliminary checks before claiming that the MP table is valid
Michael Neumann [Mon, 4 Oct 2010 09:18:43 +0000 (11:18 +0200)]
MP table: Do preliminary checks before claiming that the MP table is valid

Apply commit fa0583846340dfc45e2c45fe65868c95f295d8df for x86_64.

13 years agoPut mp_nbusses and bus_data under APIC_IO
Michael Neumann [Mon, 4 Oct 2010 09:12:25 +0000 (11:12 +0200)]
Put mp_nbusses and bus_data under APIC_IO

Apply commit 4f6a8b30c9ca96ca4df6ed16232bbc9eeba05a5e for x86_64.

13 years agoStaticize mp_nbusses
Michael Neumann [Mon, 4 Oct 2010 08:58:12 +0000 (10:58 +0200)]
Staticize mp_nbusses

Apply commit abe45f39559867d84370bf61f05b7649cd17a7b9 for x86_64.

13 years agoRemove bsp_apic_ready
Michael Neumann [Mon, 4 Oct 2010 08:56:06 +0000 (10:56 +0200)]
Remove bsp_apic_ready

Apply commit ae996d5a08c195e14ffc9374645447d29611dd15 for x86_64.

13 years agoCorrect the logical_cpus calculation in mptable_hyperthread_fixup()
Michael Neumann [Mon, 4 Oct 2010 08:53:52 +0000 (10:53 +0200)]
Correct the logical_cpus calculation in mptable_hyperthread_fixup()

Apply commit 7ea07fd226314dc116e1089cb39196610300b406 for x86_x64.

13 years agobuild - Correct compile errors on 64-bit buildworld
Matthew Dillon [Thu, 30 Sep 2010 18:10:38 +0000 (11:10 -0700)]
build - Correct compile errors on 64-bit buildworld

* printf formatting stuff in ssh-keygen

13 years agoinstaller: Fix the HAMMER install.
Sascha Wildner [Thu, 30 Sep 2010 17:14:26 +0000 (19:14 +0200)]
installer: Fix the HAMMER install.

Due to the recent change of some variables from unsigned to signed some
issues had crept in.

While here, clean up the function a bit and make the error message more
useful.

13 years agobuild - Adjust Makefile.usr to point at new pkgsrcv2.git repo
Matthew Dillon [Thu, 30 Sep 2010 16:47:03 +0000 (09:47 -0700)]
build - Adjust Makefile.usr to point at new pkgsrcv2.git repo

* Change 'pkgsrc.git' to 'pkgsrcv2.git'.

13 years agonrelease: Fold the mklocatedb target into customizeiso.
Sascha Wildner [Thu, 30 Sep 2010 00:54:30 +0000 (02:54 +0200)]
nrelease: Fold the mklocatedb target into customizeiso.

Also make it simpler by just using the periodic(8) script in the chroot.

13 years agokernel - Fix MP race in kmalloc/kfree
Matthew Dillon [Thu, 30 Sep 2010 00:01:53 +0000 (17:01 -0700)]
kernel - Fix MP race in kmalloc/kfree

* Fix two cases where a zone is mis-handled by the new kfree().  Note,
  however, that the race being fixed is nearly impossible (might even
  BE impossible) to produce because it requires a slab to go from
  completely empty to completely full through hysteresis and then destroyed
  all in a few microseconds.

  Essentially when a kfree() occurs on a cpu which is not the owner of
  the zone the chunk is linked into a side-list on the zone using atomic
  ops.  Under certain (very rare) circumstances the cpu doing the kfree()
  must IPI the cpu that owns the zone.

  The moment the chunk is linked in the cpu owning the zone can race the
  incoming IPI and destroy the zone (if it is now completely unused).
  The old kmemusage code handled the race just fine but the new vm_page_t
  based big-block handler could not.

  The solution is to have an atomic-ops counter for inflight IPIs which
  prevents the owning cpu from destroying the zone prematurely.

13 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Wed, 29 Sep 2010 21:48:17 +0000 (14:48 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

13 years agokernel - More work on x86_64 low-memory configurations
Matthew Dillon [Wed, 29 Sep 2010 21:47:11 +0000 (14:47 -0700)]
kernel - More work on x86_64 low-memory configurations

* The nkpt calculation was wrong and could lead to too few kernel
  page-tables during low level boot.

  Try to calculate the correct value and then add 128 page tables just
  to be safe.

Reported-by: John Marino
13 years agoMerge branch 'master' of /home/www-data/gitweb/dragonfly
Peter Avalos [Wed, 29 Sep 2010 20:08:37 +0000 (10:08 -1000)]
Merge branch 'master' of /home/www-data/gitweb/dragonfly

13 years agokernel - Adjust KVA use on i386 and x86_64
Matthew Dillon [Wed, 29 Sep 2010 18:38:30 +0000 (11:38 -0700)]
kernel - Adjust KVA use on i386 and x86_64

The i386 changes recover another ~60MB of KVM for kernel use.  This is an
attempt to further reduce KVM use based on bug reports from people running
production systems.

The x86_64 changes recognize the now much-larger KVM space (128G+) and
remove some i386-era limitations.

* i386 - Reduce the nominal maximum swbufs on i386 from 256 to 128,
  saving 16MB of KVM (and also 16MB of real memory).

  Now that we have swbufs both with and without kva we don't really
  need so many with kva.

* i386 - Reduce pv_entry reservation on machines with maximal memory
  configurations from 2.5-3M entries down to 1.4M entries.

  In addition to fixing a bug which counted vm_page_array_size twice
  (which is also fixed on x86_64 in this commit), also put a soft cap
  of 1.4M pv entries.  Most production machines never even get close
  to the old cap and this saves us at least 45MB of KVM on machines
  with 3G+ of ram.

  The cap can be raised with a kenv boot variable (vm.pmap.pv_entries).

* x86_64 - Increase the maximum buffer cache size from 400MB to 1GB.
  This will effect machines with >4G of ram.  A machine with 8G of
  ram will wind up with ~800MB worth of buffer cache.

  In particular this should improve HAMMER's cache performance since
  the presence of a cache bp is needed to circumvent the per-mount
  lock.  This may also improve flushes but it is hard to say.

Reported-by: Peter Avalos <peter@theshell.com>
13 years agonetstat - Fix netstat -m on core dumps
Matthew Dillon [Wed, 29 Sep 2010 17:15:34 +0000 (10:15 -0700)]
netstat - Fix netstat -m on core dumps

* Aggregate all ncpus worth of stats when operating on a core dump instead
  of just using cpu0.  Otherwise the numbers will be wildly incorrect.

Reported-by: Peter Avalos <peter@theshell.com>
13 years agodsched.9: Fix typo
Sascha Wildner [Wed, 29 Sep 2010 14:42:26 +0000 (16:42 +0200)]
dsched.9: Fix typo

13 years agoAdd a dsched(9) manual page.
Sascha Wildner [Wed, 29 Sep 2010 14:41:23 +0000 (16:41 +0200)]
Add a dsched(9) manual page.

Submitted-by: alexh
13 years agomutex.9: Adjust .Nm a bit and fix FILES section.
Sascha Wildner [Wed, 29 Sep 2010 14:23:02 +0000 (16:23 +0200)]
mutex.9: Adjust .Nm a bit and fix FILES section.

13 years agoUpdate build for OpenSSH-5.6.
Peter Avalos [Wed, 29 Sep 2010 10:14:54 +0000 (00:14 -1000)]
Update build for OpenSSH-5.6.

13 years agoAdd a SYSINIT(9) manpage describing the SYSINIT macro.
Venkatesh Srinivas [Wed, 29 Sep 2010 04:59:53 +0000 (21:59 -0700)]
Add a SYSINIT(9) manpage describing the SYSINIT macro.

13 years agoMerge branch 'vendor/OPENSSH'
Peter Avalos [Wed, 29 Sep 2010 02:05:08 +0000 (16:05 -1000)]
Merge branch 'vendor/OPENSSH'

13 years agokernel - Report actual real memory during kernel boot
Matthew Dillon [Wed, 29 Sep 2010 01:20:01 +0000 (18:20 -0700)]
kernel - Report actual real memory during kernel boot

* Calculate and report the actual real memory reported by the BIOS,
  only counting memory types and ignoring other mapping types and holes.

* Report this value instead of the highest mapped address, reducing
  user confusion.  e.g. on a machine with 8G of ram:

  real memory  = 8858370048 (8448 MB) (before change)
  avail memory = 7597334528 (7245 MB)

  real memory  = 8049428480 (7676 MB) (after change)
  avail memory = 7597334528 (7245 MB)

  real memory  = 8452081664 (8060 MB) (after changing BIOS video 512M->128M)
  avail memory = 7987879936 (7617 MB)

  This all makes sense if you think about.  The MB has on-board video and
  the BIOS reserves video memory for it, so after taking that into account
  the BIOS is really only eating around 4MB of ram for itself.  The

  "real memory" now correctly reflects memory remaining after the BIOS
  took its cut whereas originally (the 8.4GB) was really more a reflection
  of the highest mapped address, memory + IO/bus-space combined, and
  did not accurately reflect how much memory the BIOS was handing to the
  kernel.

13 years agoImport OpenSSH-5.6p1.
Peter Avalos [Wed, 29 Sep 2010 01:03:24 +0000 (15:03 -1000)]
Import OpenSSH-5.6p1.

13 years agokernel - Move action_list out of vm_page, and change flags from 16->32 bits
Matthew Dillon [Tue, 28 Sep 2010 23:16:05 +0000 (16:16 -0700)]
kernel - Move action_list out of vm_page, and change flags from 16->32 bits

* vm_page->action_list removed, saving 16 bytes per vm_page on x86_64
  (8 on i386).  Instead we add a flag to vm_page->flags, PG_ACTIONLIST,
  and store the action registrations in a global hash table.

* Change vm_page->flags from a 16 to 32 bits, plus pad, adding 4 bytes
  to the vm_page structure.

* x86_64 sizeof(struct vm_page) goes from 136 to 128, keeping in mind
  that it grew from 132 to 136 with the addition of ku_pagecnt.  So,
  net-net, we have still managed to decrease the size of struct vm_page
  by a little.

13 years agokernel - Increase MSGBUF_SIZE from 64K to 128K
Matthew Dillon [Tue, 28 Sep 2010 22:46:34 +0000 (15:46 -0700)]
kernel - Increase MSGBUF_SIZE from 64K to 128K

* MSGBUF_SIZE is too small to hold a verbose boot, bump the default
  up to 128K.

13 years agokernel - Greatly reduce kernel memory use for x86_64
Matthew Dillon [Tue, 28 Sep 2010 22:42:55 +0000 (15:42 -0700)]
kernel - Greatly reduce kernel memory use for x86_64

* Remove the kmemusage array entirely and instead store ku_pagecnt
  in the vm_page structure.

  This allows x86_64 to boot with 128G of KVM without eating tons of
  real memory, in addition to another recent commit which reduced
  real memory use w/ large KVM spaces.

Reported-by: John Marino
13 years agoUPGRADING: Add a note about OpenSSL SHLIB_MAJOR bump.
Peter Avalos [Tue, 28 Sep 2010 21:48:42 +0000 (11:48 -1000)]
UPGRADING: Add a note about OpenSSL SHLIB_MAJOR bump.

13 years agoFix buildkernel when pfsync(4) is compiled into an x86_64 kernel.
Sascha Wildner [Tue, 28 Sep 2010 19:44:33 +0000 (21:44 +0200)]
Fix buildkernel when pfsync(4) is compiled into an x86_64 kernel.

Reported-by: Dheeraj Reddy <dheerajr@gmail.com>
13 years agoMake acpi(4) compilable into an x86_64 kernel.
Sascha Wildner [Tue, 28 Sep 2010 19:43:43 +0000 (21:43 +0200)]
Make acpi(4) compilable into an x86_64 kernel.

Note that this doesn't mean that we recommend building ACPI into the
kernel in any way. But it will still be needed once we get to having
some kind of LINT config for x86_64.

Tested-by: Dheeraj Reddy <dheerajr@gmail.com>
13 years agoinstaller: Raise WARNS to 6 and fix resulting warnings.
Sascha Wildner [Tue, 28 Sep 2010 01:18:50 +0000 (03:18 +0200)]
installer: Raise WARNS to 6 and fix resulting warnings.

13 years agoinstaller: Add back comment.
Sascha Wildner [Tue, 28 Sep 2010 00:44:52 +0000 (02:44 +0200)]
installer: Add back comment.

13 years agoinstaller: Adjustments to the sources.conf file.
Sascha Wildner [Tue, 28 Sep 2010 00:36:43 +0000 (02:36 +0200)]
installer: Adjustments to the sources.conf file.

/cdrom is not part of our hierarchy and /usr/src only gets created in
the running system.

While here, remove the code that handles falling back to an internal
table since we can rely on /usr/share/installer/sources.conf to exist
always.

13 years agoBump SHLIB_MAJOR for libssl and libcrypto.
Peter Avalos [Mon, 27 Sep 2010 22:15:42 +0000 (12:15 -1000)]
Bump SHLIB_MAJOR for libssl and libcrypto.

The latest OpenSSL upgrade caused some issues with existing 3rd-party
binaries.  To get those programs to use the new OpenSSL, they'll need to
be relinked against the new libraries.

13 years agokernel - Fix incorrect vfs.cache sysctls (x86_64)
Matthew Dillon [Mon, 27 Sep 2010 16:07:29 +0000 (09:07 -0700)]
kernel - Fix incorrect vfs.cache sysctls (x86_64)

* The vfs.cache.numneg and vfs.cache.numcache sysctls were being defined
  as unsigned longs when they are ints

* Remove duplicate debug. sysctls for numneg/numcache.

13 years agokernel - Fix NFS server deadlock
Matthew Dillon [Mon, 27 Sep 2010 15:15:31 +0000 (08:15 -0700)]
kernel - Fix NFS server deadlock

* _cache_cleanneg() was calling cache_zap() with the non-blocking argument
  set to FALSE, causing numerous out-of-order locking situations which
  could march up the topology and cause a deadlock.

  Fixed by calling cache_zap() with the non-blocking argument set to TRUE.

* This was particularly obvious when running a buildworld with a loopback
  NFS mount for /usr/obj, which generates lots of negative cache activity,
  but theoretically could cause deadlocks even without using NFS.

Reported-by: YONETANI Tomokazu <qhwt.dfly@les.ath.cx>
13 years agoinstaller: Slightly change the item order in the configure menu.
Sascha Wildner [Mon, 27 Sep 2010 14:11:41 +0000 (16:11 +0200)]
installer: Slightly change the item order in the configure menu.

Move the "Set keyboard map" item before the "Set root password" item
in order to prevent accidental foot-shooting.

Submitted-by: matthias
13 years agocryptsetup: Port API test to DragonFly.
Sascha Wildner [Mon, 27 Sep 2010 11:48:11 +0000 (13:48 +0200)]
cryptsetup: Port API test to DragonFly.

13 years agoAdd libcryptsetup and libluks.
Sascha Wildner [Mon, 27 Sep 2010 01:17:03 +0000 (03:17 +0200)]
Add libcryptsetup and libluks.

13 years agoliblvm: Minor cleanup in the Makefile.
Sascha Wildner [Mon, 27 Sep 2010 11:54:06 +0000 (13:54 +0200)]
liblvm: Minor cleanup in the Makefile.

13 years agoUPDATING - Remove CVS Id
Matthias Schmidt [Mon, 27 Sep 2010 07:01:54 +0000 (09:01 +0200)]
UPDATING - Remove CVS Id

This could confuse users as the date of the ID is in the past.  Adapt style
while here.

13 years agotest commit
Robert Garrett [Mon, 27 Sep 2010 03:31:24 +0000 (20:31 -0700)]
test commit

13 years agoAdded notes about BIND moving to pkgsrc version for <2.7 -> 2.8 upgrades.
Justin C. Sherrill [Mon, 27 Sep 2010 02:02:30 +0000 (19:02 -0700)]
Added notes about BIND moving to pkgsrc version for <2.7 -> 2.8 upgrades.

13 years agoUpdate build for OpenSSL-1.0.0a.
Peter Avalos [Sun, 26 Sep 2010 22:38:45 +0000 (12:38 -1000)]
Update build for OpenSSL-1.0.0a.

-Add Camellia, CMS, GOST, MDC-2, modes, SEED, ts, and Whirlpool.  mdc2
is freely available since its patent expired in 2002.

-Remove md2 for CVE-2009-2409.

-See CHANGES for the enitire changeset.

13 years agoMerge branch 'vendor/OPENSSL'
Peter Avalos [Sun, 26 Sep 2010 22:19:45 +0000 (12:19 -1000)]
Merge branch 'vendor/OPENSSL'

13 years agoImport OpenSSL-1.0.0a.
Peter Avalos [Wed, 22 Sep 2010 11:21:58 +0000 (01:21 -1000)]
Import OpenSSL-1.0.0a.

13 years agovkernel - Add support for cdevs as virtual disks (2)
Matthew Dillon [Sun, 26 Sep 2010 21:47:28 +0000 (14:47 -0700)]
vkernel - Add support for cdevs as virtual disks (2)

* I missed a spot where the lseek() hack is needed.  Fixed.

13 years agokernel - Rearrange pmap_growkernel() and fix up x86_64's pmap_growkernel()
Matthew Dillon [Sun, 26 Sep 2010 18:46:20 +0000 (11:46 -0700)]
kernel - Rearrange pmap_growkernel() and fix up x86_64's pmap_growkernel()

* Rearrange pmap_growkernel() to pass an address range instead of just an
  end address.

* vm_map() no longer retries after calling pmap_growkernel(), the function
  either succeeds or panics.

* x86_64 - kldloading modules after system boot no longer populates 128GB
  worth of page tables (which eats ~256MB of ram) in order to push
  kernel_vm_end past KERNBASE.

  Instead, any kldloads into the space beyond KERNBASE, which is required
  to be able to link them into the kernel due to 32-bit PC-relative
  addressing, will populate just the required page tables and will not
  bump up kernel_vm_end.

* Fixes a panic which can occur well after boot when kldload'ing the first
  module, if 256MB worth of free pages is not instantly available.

* Saves us 256M of ram on x86_64.

13 years agodf fortune - Bring some entries closer to reality
Matthias Schmidt [Sun, 26 Sep 2010 17:27:44 +0000 (19:27 +0200)]
df fortune - Bring some entries closer to reality

13 years agopkg_search - Replace avalon with mirror-master
Matthias Schmidt [Sun, 26 Sep 2010 14:04:30 +0000 (16:04 +0200)]
pkg_search - Replace avalon with mirror-master

and remove CVS-Id while here

13 years agoOpenSSL: Set the date for manual pages to the release date.
Peter Avalos [Sun, 26 Sep 2010 08:37:01 +0000 (22:37 -1000)]
OpenSSL: Set the date for manual pages to the release date.

13 years agovkernel - Add support for cdevs as virtual disks
Matthew Dillon [Sun, 26 Sep 2010 04:00:04 +0000 (21:00 -0700)]
vkernel - Add support for cdevs as virtual disks

* Allow a cdev to be directly specified as a virtual disk.

13 years agolibcrypto: There's no need to test for WANT_IDEA twice.
Peter Avalos [Sun, 26 Sep 2010 02:00:01 +0000 (16:00 -1000)]
libcrypto:  There's no need to test for WANT_IDEA twice.

13 years agoOpenSSL: Define little endian on x86_64.
Peter Avalos [Sun, 26 Sep 2010 01:53:50 +0000 (15:53 -1000)]
OpenSSL:  Define little endian on x86_64.

We only support little endian archs, so remove the test, and just put it
with the rest of CFLAGS.

13 years agoinstaller: Suppress . in the hostname if the user didn't specify a domain.
Sascha Wildner [Sun, 26 Sep 2010 00:40:18 +0000 (02:40 +0200)]
installer: Suppress . in the hostname if the user didn't specify a domain.

Submitted-by: matthias
13 years agoOpenSSL: Eliminate some options from CFLAGS.
Peter Avalos [Sun, 26 Sep 2010 00:08:24 +0000 (14:08 -1000)]
OpenSSL:  Eliminate some options from CFLAGS.

These are already included in opensslconf.h, so there's no need to put
them in CFLAGS too.

13 years agokernel - Fix rare token overwrite race
Matthew Dillon [Sat, 25 Sep 2010 23:10:48 +0000 (16:10 -0700)]
kernel - Fix rare token overwrite race

td_toks_stop was being decremented prior to releasing the token reference
and cleaning up the optional mp lock.  This left a very small
one-instruction opening where the following sequence of events could
occur:

  * While releasing the ref in 'if (tok->t_ref == ref) tok->t_ref = NULL;'
    a fast interrupt could come along, acquire a token reusing our ref,
    then release it.

  * A thread on another cpu then successfully acquires the now released
    token.

  * The fast interrupt returns our interrupted thread resumes with the
    execution of 'tok->t_ref = NULL;'.

  * The other thread asserts on the missing token ref or otherwise performs
    actions which assume the token is still held when it is not due to
    the first thread blowing it up.

Reported-by: Francois Tigeot <ftigeot@wolfpond.org>
13 years agodocs - Adjust swapcache.8
Matthew Dillon [Sat, 25 Sep 2010 20:17:31 +0000 (13:17 -0700)]
docs - Adjust swapcache.8

* Clarify the lack of clarity on read-disturb effects.  Expand the
  write endurance section a bit incorporating the results from long-term
  testing on pkgbox64.

13 years agoAdd prototype for devfs_assume_knotes()
Jan Lentfer [Sat, 25 Sep 2010 19:23:40 +0000 (21:23 +0200)]
Add prototype for devfs_assume_knotes()

   Fixes buildkernel problem

13 years agokernel - Bring devfs_assume_knotes() uptodate and fix panic
Matthew Dillon [Sat, 25 Sep 2010 17:43:55 +0000 (10:43 -0700)]
kernel - Bring devfs_assume_knotes() uptodate and fix panic

* devfs_assume_knotes() was blindly transfering the knotes without
  properly acquiring their soft-lock.

  The problem was easily reproducable by running 'moused -p /dev/ums0'
  and then unplugging the mouse.

* Move the core of the routine into a new procedure in kern_event.c
  called knote_assume_knotes() which properly acquires and releases
  the underlying knotes.

13 years agoHAMMER VFS - Fix two ip->vp inode/vnode races
Matthew Dillon [Sat, 25 Sep 2010 14:58:12 +0000 (07:58 -0700)]
HAMMER VFS - Fix two ip->vp inode/vnode races

* nrename and nremove attempt to dereference ip->vp.  Because ip->vp has
  no other references in these code paths the operation can race and
  either assert or panic on a null-pointer dereference.

  Fix by formally acquiring the vnode before trying to dereference it.

* All other cases are passed a referenced vnode or properly acquire it
  (e.g. nresolve), and did not have this issue.

13 years agoOpenSSL: Fix includes insanity.
Peter Avalos [Sat, 25 Sep 2010 11:21:43 +0000 (01:21 -1000)]
OpenSSL:  Fix includes insanity.

Use INCS instead of the hard-to-understand and rustic stuff that was
there.