7 years agoopenssl: Fix CVE-2011-0014.
Peter Avalos [Wed, 9 Feb 2011 05:20:04 +0000 (19:20 -1000)]
openssl:  Fix CVE-2011-0014.

7 years agoMFC some /usr/Makefile changes (Q2->Q3, GITHOST).
Sascha Wildner [Wed, 1 Dec 2010 20:06:09 +0000 (21:06 +0100)]
MFC some /usr/Makefile changes (Q2->Q3, GITHOST).

7 years agoSync zoneinfo database with tzdata2010o from elsie.nci.nih.gov
Sascha Wildner [Mon, 1 Nov 2010 16:32:13 +0000 (17:32 +0100)]
Sync zoneinfo database with tzdata2010o from elsie.nci.nih.gov

australasia:    8.19 -> 8.20

* Fiji ends DST in 2011 on March 6 and not on March 27.

7 years agozic(8): Sync with tzcode2010n from elsie.nci.nih.gov
Sascha Wildner [Tue, 26 Oct 2010 13:24:31 +0000 (15:24 +0200)]
zic(8): Sync with tzcode2010n from elsie.nci.nih.gov

* Conditionally output extra types with most-recently-used offsets last
  (for use by systems with pre-2011 versions of localtime.c, helping to
  ensure that globals "altzone" and "timezone" get set correctly).

* Fix generation of POSIX strings for zones with rules using
  "weekday<=n" forms of dates (thanks to Lei Liu for finding the
  problem). Also, limit output for non-POSIX-specificable zones defined
  to follow the same rules every year. (Note that no zones of either of
  the above types appear in the distribution; these changes cater to
  add-on zones).

7 years agolibc/stdtime: Sync localtime.c with tzcode2010n from elsie.nci.nih.gov
Sascha Wildner [Tue, 26 Oct 2010 13:20:01 +0000 (15:20 +0200)]
libc/stdtime: Sync localtime.c with tzcode2010n from elsie.nci.nih.gov

* Change to set timezone and altzone based on time types with greatest
  transition times (for the benefit of Asia/Seoul).

* Initialize ttinfo structures filled by tzparse (thanks to Ravindra
  for reporting a valgrind warning).

7 years agoSync zoneinfo database with tzdata2010n from elsie.nci.nih.gov
Sascha Wildner [Tue, 26 Oct 2010 13:14:11 +0000 (15:14 +0200)]
Sync zoneinfo database with tzdata2010n from elsie.nci.nih.gov

Theory:         8.4  -> 8.5
asia:           8.61 -> 8.62
australasia:    8.18 -> 8.19
factory:        8.2  -> n/a
zone.tab:       8.37 -> 8.38

* Remove the 'factory' file and references to it. It is no longer needed.

* asia: No DST in Hong Kong in 1977 (thanks to Jesper Norgaard for
    finding the problem).

* australasia: Change end of DST in Samoa in 2011 from 2011-04-03 0:00 to
    2011-04-03 1:00 (thanks to Raymond Hughes for a reference).

* zone.tab: Remove obsolete association of Vostok Station with South
    Magnetic Pole; add association with Lake Vostok (thanks to
    Petr Machata for finding the problem).

7 years agokernel - MFC NFS server cache bug fix
Matthew Dillon [Mon, 18 Oct 2010 05:20:03 +0000 (22:20 -0700)]
kernel - MFC NFS server cache bug fix

* MFS just the NFS server cache bug fix from current into 2.6.x.

Reported-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk>
7 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.

7 years agobuild - (MFC) Adjust Makefile.usr to point at new pkgsrcv2.git repo
Matthew Dillon [Thu, 30 Sep 2010 17:01:24 +0000 (10:01 -0700)]
build - (MFC) Adjust Makefile.usr to point at new pkgsrcv2.git repo

* Adjust Makefile.usr to point at new pkgsrcv2.git repo

* Change the default branch for 2.6 users from 'master' to pkgsrc-2010Q2.
  Users on release branches can always checkout master if they want master.

7 years agoImport bzip2-1.0.6 which fixes CVE-2010-0405.
Peter Avalos [Mon, 20 Sep 2010 21:34:25 +0000 (11:34 -1000)]
Import bzip2-1.0.6 which fixes CVE-2010-0405.

7 years agoiscsi_initiator(4): Fix another potential NULL pointer dereference.
Sascha Wildner [Sun, 29 Aug 2010 19:24:09 +0000 (21:24 +0200)]
iscsi_initiator(4): Fix another potential NULL pointer dereference.

so (which is sp->soc) can be NULL here, so add a check before dereferencing

7 years agoiscsi_initiator(4): Fix a potential NULL pointer dereference.
Sascha Wildner [Sun, 29 Aug 2010 19:13:27 +0000 (21:13 +0200)]
iscsi_initiator(4): Fix a potential NULL pointer dereference.

If sp can be NULL (as the rest of the code suggests), we can't use sdebug()
since that prints the string with sp->sid prepended (thereby dereferencing

Instead, use debug() and add sp->sid to its string (with a check for NULL).

While here, fix some indentation issues.

7 years agoSync zoneinfo database with tzdata2010l from elsie.nci.nih.gov
Sascha Wildner [Tue, 17 Aug 2010 02:36:59 +0000 (04:36 +0200)]
Sync zoneinfo database with tzdata2010l from elsie.nci.nih.gov

africa:         8.27 -> 8.28
asia:           8.60 -> 8.61

* africa: Change Cairo's 2010 reversion to DST from the midnight between
    September 8 and 9 to the midnight between September 9 and 10.

* asia: Change Gaza's 2010 return to standard time to the midnight
    between August 10 and 11.

7 years agoHAMMER VFS - Fix over-enthusiastic cluster read
Matthew Dillon [Sun, 15 Aug 2010 15:14:53 +0000 (08:14 -0700)]
HAMMER VFS - Fix over-enthusiastic cluster read

* The block device I/O was over-enthusiastic in calling cluster_read()
  and could wind up creating the buffers of the wrong size which
  would then overlap the address space later buffer requests for the
  right size.

  This could result in the corruption of large-data (64K) blocks,
  usually causing a hammer reblock to fail with a CRC error but
  not corrupting the actual filesystem on-media.

  Meta data could not usually get corrupted by this unless the
  cluster-read happened to cross a large-block (8MB) boundary.

* Particularly easy to reproduce with the dm_crypt module due to
  crypt overheads.

* Fixed by disallowing read-aheads in the large-data zone (the only
  zone which can contain a mix of 16K and 64K blocks), and ensuring
  that any other cluster_read does not cross a large-block boundary.

7 years agoaicasm: Correct logic bug in the undefined register bit access detection code.
Sascha Wildner [Tue, 10 Aug 2010 01:45:18 +0000 (03:45 +0200)]
aicasm: Correct logic bug in the undefined register bit access detection code.

Quoting FreeBSD's commit msg:

The code in question verifies that all register write operations only change
bits that are defined (in the register definition file) for that effected
register.  The bug effectively disabled this checking.

o Fix the check by testing the opcode against all supported read ("and" based)

o Add missing bit definitions to the aic7xxx and aic79xx register definition
  files so that the warning (treated as a fatal error) does not spuriously

Taken-from: FreeBSD

[While I'm here, also add a missing free() and raise WARNS to 6.]

7 years agoFix some mis-usage of && and || in the kernel.
Sascha Wildner [Tue, 10 Aug 2010 01:49:43 +0000 (03:49 +0200)]
Fix some mis-usage of && and || in the kernel.

7 years agore(4): fix re_setmulti(): PCIe mcast hash registers were swapped
Thomas Nikolajsen [Sun, 8 Aug 2010 07:41:05 +0000 (09:41 +0200)]
re(4): fix re_setmulti(): PCIe mcast hash registers were swapped

Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1799>
Submitted-by: "Mitja Horvat <pinkfluid@>"
Obtained-from: FreeBSD

7 years agodaemon(8): add missing break
Thomas Nikolajsen [Sun, 8 Aug 2010 06:45:56 +0000 (08:45 +0200)]
daemon(8): add missing break

DragonFly-bug: <http://bugs.dragonflybsd.org/issue1800>
Submitted-by: "Mitja Horvat <pinkfluid@>"
7 years agoFix a panic in the varsym_get(2) syscall.
Sascha Wildner [Sun, 8 Aug 2010 18:13:07 +0000 (20:13 +0200)]
Fix a panic in the varsym_get(2) syscall.

In varsymfind(), release the lock only if vss != NULL. This could be
the case if garbage was passed in the mask.

7 years agoFix a panic in the __getcwd(2) syscall.
Sascha Wildner [Sun, 8 Aug 2010 09:19:09 +0000 (11:19 +0200)]
Fix a panic in the __getcwd(2) syscall.

buflen has to be unsigned so that large values do not become negative
and sneak past the MAXPATHLEN check.

7 years agoFix panics in two syscalls, caps_sys_get(2) and caps_sys_wait(2).
Sascha Wildner [Sun, 8 Aug 2010 08:43:08 +0000 (10:43 +0200)]
Fix panics in two syscalls, caps_sys_get(2) and caps_sys_wait(2).

Only call caps_drop() if caps != NULL.

7 years agoFix the VKERNEL build with KLD_DEBUG set.
Sascha Wildner [Mon, 2 Aug 2010 13:00:58 +0000 (15:00 +0200)]
Fix the VKERNEL build with KLD_DEBUG set.

Reported-by: lentferj
7 years agoFix typo in <sys/elf_common.h>: ET_LIPROC -> ET_LOPROC
Sascha Wildner [Wed, 28 Jul 2010 15:22:54 +0000 (17:22 +0200)]
Fix typo in <sys/elf_common.h>: ET_LIPROC -> ET_LOPROC

7 years agolibc - Return ENOSYS in both mlockall() / munlockall()
Antonio Huete Jimenez [Tue, 13 Apr 2010 09:57:51 +0000 (11:57 +0200)]
libc - Return ENOSYS in both mlockall() / munlockall()

Submitted-by: Venkatesh Srinivas <me@endeavour.zapto.org>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1712>

7 years agoSync zoneinfo database with tzdata2010k from elsie.nci.nih.gov
Sascha Wildner [Mon, 26 Jul 2010 16:17:50 +0000 (18:17 +0200)]
Sync zoneinfo database with tzdata2010k from elsie.nci.nih.gov

africa:         8.26 -> 8.27
australasia:    8.17 -> 8.18
backward:       8.8  -> 8.9
europe:         8.26 -> 8.27
leapseconds:    8.9  -> 8.10
northamerica:   8.31 -> 8.34
zone.tab:       8.36 -> 8.37

* africa: DST will not be used in Egypt during Ramadan.

* australasia: Change Pacific/Truk to Pacific/Chuuk (with corresponding
    time zone abbreviation change) and change Pacific/Ponape to
    Pacific/Pohnpei (with thanks to Clint Adams).

* backward: Add Pacific/Truk and Pacific/Ponape links and adjust
    Pacific/Yap link.

* europe: Change Finland transition times in 1981 and 1982 (with thanks
    to Janne Snabb).

* leapseconds: Update comments with latest IERS leap second bulletin.

* northamerica: Correct instant of 2010 move between time zones in
    Bahia de Banderas. Add comments from Mark Brader on DST in Windsor.
    Add comments on Canadian DST in 1930 from the Journal of the Royal
    Astronomical Society of Canada.

* zone.tab: Change Pacific/Truk to Pacific/Chuuk and change Pacific/Ponape
    to Pacific/Pohnpei.

7 years ago/usr/Makefile: Adjust to our new handling of the pkgsrc GIT repository.
Sascha Wildner [Mon, 5 Jul 2010 12:42:03 +0000 (14:42 +0200)]
/usr/Makefile: Adjust to our new handling of the pkgsrc GIT repository.

7 years agoFix ACPI global lock acquisition in x86_64.
Sascha Wildner [Sat, 17 Apr 2010 10:43:24 +0000 (13:43 +0300)]
Fix ACPI global lock acquisition in x86_64.

This fixes a number of grave issues on my Sony VAIO VGN-Z51XG, such as
messages about not being able to acquire the global lock, freezes when
ACPI was fully enabled and a panic at shutdown.

BTW, gcc had been warning us about it for a long time. :)

In-collaboration-with: aggelos

8 years agohangman(6): Ignore case in the word list.
Sascha Wildner [Thu, 24 Jun 2010 08:53:10 +0000 (10:53 +0200)]
hangman(6): Ignore case in the word list.

Reported-by: Tim Darby <t+dfbsd@timdarby.net>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1787>

8 years agovesa(4): Fix check for DPMS support.
Sascha Wildner [Mon, 21 Jun 2010 05:10:50 +0000 (07:10 +0200)]
vesa(4): Fix check for DPMS support.

Return 0 (no states) in case function 0x4f10 returns an error.

8 years agoaltq(4): Fix typo in a #define.
Sascha Wildner [Wed, 16 Jun 2010 15:30:12 +0000 (17:30 +0200)]
altq(4): Fix typo in a #define.

8 years agokern_shutdown.c: Add missing #include (for NGPIO).
Sascha Wildner [Wed, 16 Jun 2010 15:27:02 +0000 (17:27 +0200)]
kern_shutdown.c: Add missing #include (for NGPIO).

8 years agoiscsi - Fix bug in iscsi initiator driver
Matthew Dillon [Sat, 12 Jun 2010 16:29:17 +0000 (09:29 -0700)]
iscsi - Fix bug in iscsi initiator driver

* The iscsi initiator was trying to record the thread pointer for the
  original caller attaching the connection, but that caller is strictly

  Record the kernel thread created by the attachment instead of the
  caller's thread.

Reported-by: Antonio Huete Jimenez <tuxillo@quantumachine.net>:
8 years agotop - Fix seg-fault when window made very wide
Matthew Dillon [Sat, 12 Jun 2010 04:31:08 +0000 (21:31 -0700)]
top - Fix seg-fault when window made very wide

* Fix a static buffer overflow when the window is made very wide.

Taken-from: NetBSD
Submitted-by: Trevor Kendall
8 years agoRun makewhatis(8) after 'make upgrade' instead of after 'make installworld'.
Sascha Wildner [Sat, 12 Jun 2010 03:07:57 +0000 (05:07 +0200)]
Run makewhatis(8) after 'make upgrade' instead of after 'make installworld'.

'make upgrade' does (among other things) remove obsolete manual pages. If
makewhatis(8) is run after 'make installworld' (i.e. before upgrade), the
whatis database will still contain them. Therefore, run makewhatis(8)
after 'make upgrade' when the removals are done.

Pointed-out-by: tuxillo
While here, clean up the upgrade target in /usr/src/Makefile a little bit.

8 years agoFix -pg compiled programs on i386
Aggelos Economopoulos [Tue, 1 Jun 2010 20:07:52 +0000 (23:07 +0300)]
Fix -pg compiled programs on i386

mcount() is supposed to preserve all registers. Since it
clobbered ecx, this resulted in argc/argv always being 0.
It probably only ever worked because of some artifact of
code generation by older GCCs.

Reported-by: Venkatesh Srinivas <me@endeavour.zapto.org>
Testing-by: swildner@
8 years agoacpica - Use tsleep() instead of DELAY() to avoid long delays at boot time.
Antonio Huete Jimenez [Thu, 27 May 2010 00:13:34 +0000 (02:13 +0200)]
acpica - Use tsleep() instead of DELAY() to avoid long delays at boot time.

Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1755>
Obtained-from: FreeBSD

8 years agolib/csu: Fix 'make clean'.
Sascha Wildner [Sat, 29 May 2010 00:01:53 +0000 (02:01 +0200)]
lib/csu: Fix 'make clean'.

8 years agoAdjust some comments/manpages regarding where profiling libs are.
Sascha Wildner [Fri, 28 May 2010 23:25:59 +0000 (01:25 +0200)]
Adjust some comments/manpages regarding where profiling libs are.

8 years agogcc(1): Fix compilation with "c++ -pg" (for CCVER=gcc41).
Sascha Wildner [Fri, 28 May 2010 22:38:34 +0000 (00:38 +0200)]
gcc(1): Fix compilation with "c++ -pg" (for CCVER=gcc41).

We don't install profiling libraries as /usr/lib/lib${LIB}_p.a anymore
since it was switched to /usr/lib/profile/lib${LIB}.a almost 5 years
ago (in c4c23d9061b6eb2a3456620a48b84583b00fe0ce).

Reported-by: Damian Weber <dweber@htw-saarland.de>
8 years agogcc(1): Fix typos in gcc41's spec so that profiling libraries are found.
Sascha Wildner [Fri, 28 May 2010 22:32:59 +0000 (00:32 +0200)]
gcc(1): Fix typos in gcc41's spec so that profiling libraries are found.

8 years agosound: implement OSS_GETVERSION.
Alexander Polakov [Fri, 2 Apr 2010 20:23:00 +0000 (00:23 +0400)]
sound: implement OSS_GETVERSION.

 It's required by some software, emulators/qemu to mention.

 Obtained-from: FreeBSD

8 years agouuid_{name,addr}_lookup(3): Fix free() order.
Sascha Wildner [Wed, 19 May 2010 18:45:01 +0000 (20:45 +0200)]
uuid_{name,addr}_lookup(3): Fix free() order.

8 years agoscsi(4): Add a missing 'break'.
Sascha Wildner [Tue, 18 May 2010 19:56:31 +0000 (21:56 +0200)]
scsi(4): Add a missing 'break'.

8 years agosys/netinet/in_pcb.c: Fix a broken range check.
Sascha Wildner [Tue, 18 May 2010 10:15:40 +0000 (12:15 +0200)]
sys/netinet/in_pcb.c: Fix a broken range check.

Back in 2004, in commit 80dff869, RANGECHK() was changed from a macro
to an inline function. This broke the test since the passed 'var' could
not be changed by the inline unless a pointer was used.

Instead of changing to using pointers now (or adding a return value to
RANGECHK()), revert to using a macro again.

8 years agoAdd a missing break in the 64 bit vkernel, too.
Sascha Wildner [Sun, 16 May 2010 18:03:10 +0000 (20:03 +0200)]
Add a missing break in the 64 bit vkernel, too.

8 years agovkernel: To restart the scan, npv needs to be reset, not pv.
Sascha Wildner [Sun, 16 May 2010 17:41:01 +0000 (19:41 +0200)]
vkernel: To restart the scan, npv needs to be reset, not pv.

8 years agovkernel: Fix a wrong check of netif_set_tapflags()'s return value.
Sascha Wildner [Sun, 16 May 2010 17:26:16 +0000 (19:26 +0200)]
vkernel: Fix a wrong check of netif_set_tapflags()'s return value.

8 years agokx86_64_set_watch(): Add a missing 'break'.
Sascha Wildner [Sun, 16 May 2010 15:39:12 +0000 (17:39 +0200)]
kx86_64_set_watch(): Add a missing 'break'.

8 years agocxm(4) doesn't depend on smbus(4).
Sascha Wildner [Sun, 16 May 2010 01:46:31 +0000 (03:46 +0200)]
cxm(4) doesn't depend on smbus(4).

Reported-by: Thomas Klausner <wiz@netbsd.org>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1766>

8 years agoFix compiling iic(4) on x86_64 by adding <machine/iic.h>.
Sascha Wildner [Sun, 16 May 2010 01:45:42 +0000 (03:45 +0200)]
Fix compiling iic(4) on x86_64 by adding <machine/iic.h>.

Reported-by: Thomas Klausner <wiz@netbsd.org>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1766>

8 years agoFix the x86_64 kernel build with 'options BUS_DEBUG'.
Sascha Wildner [Fri, 14 May 2010 23:07:03 +0000 (01:07 +0200)]
Fix the x86_64 kernel build with 'options BUS_DEBUG'.

Reported-by: Thomas Klausner <wiz@netbsd.org>
8 years agoSync zoneinfo database with tzdata2010j from elsie.nci.nih.gov
Sascha Wildner [Tue, 11 May 2010 03:57:00 +0000 (05:57 +0200)]
Sync zoneinfo database with tzdata2010j from elsie.nci.nih.gov

northamerica:   8.30 -> 8.31
zone.tab:       8.35 -> 8.36

Bahia de Banderas (municipality in the Mexican state of Nayarit) changed
time zone from UTC-7 to UTC-6. This requires introducing a new zone

8 years agoACPI: Don't unlock in lock's error path
Stathis Kamperis [Sat, 10 Apr 2010 15:56:28 +0000 (18:56 +0300)]
ACPI: Don't unlock in lock's error path

Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1647>

Submitted-by: Edward O'Callaghan
8 years agonrelease - MFC try to workaround a problem with ./bootstrap v2.6.3
Matthew Dillon [Fri, 30 Apr 2010 18:11:06 +0000 (11:11 -0700)]
nrelease - MFC try to workaround a problem with ./bootstrap

* setenv share_dir during the bootstrap build to try to work around a
  problem where recent changes in the build cause bmake to try to access
  the system mk files in /usr/share/mk.

8 years agokernel - Try to fix NULL pointer issue in syncache_timer_handler()
Matthew Dillon [Fri, 30 Apr 2010 18:08:14 +0000 (11:08 -0700)]
kernel - Try to fix NULL pointer issue in syncache_timer_handler()

* There seems to be a case where a tcpcb's inp can be NULL when accessed
  from syncache_timer_handler().  Try to handle it.

8 years agokernel - Disallow dsioctl when no media is present
Matthew Dillon [Fri, 30 Apr 2010 18:06:56 +0000 (11:06 -0700)]
kernel - Disallow dsioctl when no media is present

* Attempt to fix a panic which can occur when attempts are made to
  call ioctl() via a slice/partition on removable drives with no media.

8 years agokernel - Fix resident_count problems with kernel_pmap & related crashes
Matthew Dillon [Fri, 30 Apr 2010 02:48:58 +0000 (19:48 -0700)]
kernel - Fix resident_count problems with kernel_pmap & related crashes

* kernel_pmap.pm_stats.resident_count could get out of sync due to the
  lwbuf code calling kmem_free() on KVM with pages that were entered
  via pmap_kenter().  Delete the pages before calling kmem_free().

  This in turn caused various failures and kernel panics due to conditionals
  based on resident_count == 0.  Heavy sendfile() activity could trigger
  the bug but it was taking a few days for the resident_count to decrement
  to zero.

* Fix a similar issue in zdestroy() on ZONE_INTERRUPT zones.  Nothing calls
  this routine so it was not a vector for crashes.

* Document the case.

8 years agokernel - mmap offset is invalid for MAP_ANON
Samuel J. Greear [Fri, 30 Apr 2010 04:30:05 +0000 (22:30 -0600)]
kernel - mmap offset is invalid for MAP_ANON

Submitted-by: Venkatesh Srinivas
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1723>

8 years agobpf(4): Fix the division by zero check in bpf_validate().
Sascha Wildner [Fri, 30 Apr 2010 10:03:52 +0000 (12:03 +0200)]
bpf(4): Fix the division by zero check in bpf_validate().

BPF_RVAL() was being used where BPF_SRC() would have been correct.

Reported-by: Guy Harris <guy@alum.mit.edu>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1748>

8 years agokernel - make sysent update
Matthew Dillon [Mon, 26 Apr 2010 16:05:52 +0000 (09:05 -0700)]
kernel - make sysent update

* Update for changes in the extattr family of system calls.

8 years agokernel - Update extattr infrastructure
Matthew Dillon [Mon, 26 Apr 2010 16:03:04 +0000 (09:03 -0700)]
kernel - Update extattr infrastructure

* Update the extattr infrastructure to match FreeBSD.  Numerous arguments
  have changed in the system calls and created an issue with libarchive.

8 years agoFix kthread_create() in kern_sensors.c.
Sascha Wildner [Thu, 22 Apr 2010 10:23:56 +0000 (12:23 +0200)]
Fix kthread_create() in kern_sensors.c.

8 years agowindow(1): Perform NULL check before strcmp() rather than after.
YONETANI Tomokazu [Sat, 10 Apr 2010 01:47:16 +0000 (10:47 +0900)]
window(1): Perform NULL check before strcmp() rather than after.

Fixes segfault upon TERM=cons25.

8 years agohammer volume-add / volume-del: Keep bigblock stats correct
Michael Neumann [Tue, 6 Apr 2010 18:18:47 +0000 (20:18 +0200)]
hammer volume-add / volume-del: Keep bigblock stats correct

8 years agoSync zoneinfo database with tzdata2010i from elsie.nci.nih.gov
Sascha Wildner [Wed, 21 Apr 2010 14:12:10 +0000 (16:12 +0200)]
Sync zoneinfo database with tzdata2010i from elsie.nci.nih.gov

africa:         8.24 -> 8.26
asia:           8.59 -> 8.60
southamerica:   8.43 -> 8.44

* Morocco will have DST in 2010 from May 2 to Aug 22.

* Taiwan had DST in 1979, not in 1980.

* San Luis, Argentina, is on "permanent" DST as of 2010.

8 years agoHAMMER VFS - Fix probable corruption case when filesystem becomes nearly full v2.6.2
Matthew Dillon [Mon, 19 Apr 2010 05:36:14 +0000 (22:36 -0700)]
HAMMER VFS - Fix probable corruption case when filesystem becomes nearly full

* The reblocking code was incorrectly assuming the cursor would be pointing
  at a valid node element after an unlock/relock sequence, when it could
  actually be pointing at the EOF of a node.  This case can occur when
  the filesystem is nearly full (possibly due to the reblocking operation
  itself), when the filesystem is also under load from unrelated

* This can result in the creation of a corrupted B-Tree leaf node or
  data record.

* Corruption can be checked with hammer checkmap and hammer show
  (as of this rev):

  hammer -f device checkmap

Should output no B-Tree node records or free space mismatches.
You will still get the initial volume summary.

  hammer -f device show | egrep '^B' | egrep -v '^BM'

Should output no records.

* Currently the only recourse if corruption is found is to copy off the
  filesystem, newfs_hammer, and copy it back.

  Full history and snapshots can be retained by using 'hammer -B mirror-read'
  to copy off the filesystem and mirror-write to copy it back.  However,
  pleaes remember you must do this for each PFS individually.  Make sure
  you have a viable backup before newfsing anything.

Reported-by: Francois Tigeot <ftigeot@wolfpond.org>, Jan Lentfer <Jan.Lentfer@web.de>
8 years agoHAMMER VFS - Fix assertion panic related to record flush state
Matthew Dillon [Sat, 17 Apr 2010 18:12:02 +0000 (11:12 -0700)]
HAMMER VFS - Fix assertion panic related to record flush state

* This assertion can occur under certain circumstances if a rename
  operation moves a file or directory to a parent directory, due to
  a circular loop in the dependency chain.

* Fix the problem by allowing the case.

Reported-by: Sascha Wildner, Alex Hornung, Venkatesh Srinivas, others
8 years agoHAMMER Util - Add 'checkmap', adjust hammer show
Matthew Dillon [Fri, 16 Apr 2010 03:41:18 +0000 (20:41 -0700)]
HAMMER Util - Add 'checkmap', adjust hammer show

* Add a checkmap function which scans the B-Tree, collects byte usage,
  and checks it against the blockmap.  This is still experimental.

* Adjust hammer show to flag zone mismatches instead of asserting.

8 years agoHAMMER VFS - Fix hammer lock assertion panic when REDO recovery fails
Matthew Dillon [Wed, 14 Apr 2010 04:27:49 +0000 (21:27 -0700)]
HAMMER VFS - Fix hammer lock assertion panic when REDO recovery fails

* REDO recovery failed to release a buffer in its error path, resulting
  in a panic later on.  This patch adds the proper release.

Reported-by: Venkatesh Srinivas <me@acm.jhu.edu>
8 years agonata - Drop pending requests on dump
Alex Hornung [Tue, 13 Apr 2010 16:32:08 +0000 (16:32 +0000)]
nata - Drop pending requests on dump

* Drop all pending requests in the ata queue when we are about to dump.

* This should solve issues that have been appearing lately causing a
  TAILQ_NEXT panic on dumps with nata under heavy I/O.

Reported-by: Jan Lentfer (lentferj@), Antonio Huete (tuxillo@)
Obtained-from: FreeBSD

8 years agoata - Fix dumping of old ata driver
Alex Hornung [Tue, 13 Apr 2010 16:29:47 +0000 (16:29 +0000)]
ata - Fix dumping of old ata driver

* While we still have ata(4) around, make addump work properly again
  with the new dumping infrastructure.

8 years agoFix LINT build.
Sascha Wildner [Sat, 10 Apr 2010 22:17:32 +0000 (00:17 +0200)]
Fix LINT build.

8 years agoACPI - disable ACPIIO_ACKSLPSTATE
YONETANI Tomokazu [Sat, 10 Apr 2010 07:24:28 +0000 (16:24 +0900)]

It's incomplete and an undocumented option in acpiconf can trigger
a kernel panic (only as root, though).

8 years agoInstall the boot(8) manual page too during 64 bit install.
Sascha Wildner [Sat, 10 Apr 2010 06:09:06 +0000 (08:09 +0200)]
Install the boot(8) manual page too during 64 bit install.

8 years agolinux emu - Refactor open code
Alex Hornung [Fri, 9 Apr 2010 07:24:53 +0000 (07:24 +0000)]
linux emu - Refactor open code

* Factor out a linux_open_common that both open() and openat() use.

* While here, also use CACHE_*MPLOCK*, as is done in vfs_syscalls.c.

8 years agolinux emu - support O_DIRECTORY for open syscall
Alex Hornung [Fri, 9 Apr 2010 06:49:06 +0000 (06:49 +0000)]
linux emu - support O_DIRECTORY for open syscall

* Linux opendir seems to rely on O_DIRECTORY to avoid certain race
  conditions, so introduce O_DIRECTORY support which just returns
  ENOTDIR even if the open is successful, if the opened path is not a

* This fixes Ant's directory scanner.

Submitted-by: Johannes Hofmann
8 years agolook(1): Fix my previous commit.
Sascha Wildner [Thu, 8 Apr 2010 14:17:05 +0000 (16:17 +0200)]
look(1): Fix my previous commit.

I broke i386 behavior. Instead, take a nicer fix from NetBSD.

8 years agoFix look(1) on x86_64.
Sascha Wildner [Thu, 8 Apr 2010 13:09:21 +0000 (15:09 +0200)]
Fix look(1) on x86_64.

SIZE_T_MAX, being ULONG_MAX, was -1 when cast to off_t (int64_t).

Reported-by: Urmas Reinsalu <urki@klaasikoda.ee>
8 years agomqueues: selwakeup() needs the MP lock to be held
Stathis Kamperis [Tue, 6 Apr 2010 19:17:35 +0000 (22:17 +0300)]
mqueues: selwakeup() needs the MP lock to be held

Briefly-discussed-with: sjg@

8 years agoSync zoneinfo database with tzdata2010h from elsie.nci.nih.gov
Sascha Wildner [Mon, 5 Apr 2010 15:29:00 +0000 (17:29 +0200)]
Sync zoneinfo database with tzdata2010h from elsie.nci.nih.gov

africa:         8.23 -> 8.24
asia:           8.58 -> 8.59

Both Tunisia and Pakistan have decided to abandon DST.

8 years agonrelease: Remove unused variable. v2.6.1
Sascha Wildner [Sun, 4 Apr 2010 17:29:04 +0000 (19:29 +0200)]
nrelease: Remove unused variable.

8 years agoHAMMER Utility - Change default split size from 100MB to 4G
Matthew Dillon [Sun, 4 Apr 2010 16:23:19 +0000 (09:23 -0700)]
HAMMER Utility - Change default split size from 100MB to 4G

* Change the default split size for mirroring from 100MB to 4G.  For very
  large filesystems a small split size can result in very high meta-data
  overheads with very little actual incremental data.

* Adjust the manual page for the split changes.

* Adjust the manual page to clarify limitations of the bandwidth option.

8 years agonrelease: Add back the creation of the /usr/local hierarchy on the LiveCD.
Sascha Wildner [Sun, 4 Apr 2010 16:06:42 +0000 (18:06 +0200)]
nrelease: Add back the creation of the /usr/local hierarchy on the LiveCD.

Even though nothing in base uses it, it's more convenient to have the
hierarchy already in place in case the user wants to install some stuff
the traditional way.

While doing this, remove the documentation of the 'fetch' target from
release.7 since this target no longer exists now that cvsup has been
removed from the LiveCD.

In-discussion-with: dillon

8 years agoinstaller: Fix the LiveCD's /etc/fstab regarding /usr/local.
Sascha Wildner [Sun, 4 Apr 2010 15:21:57 +0000 (17:21 +0200)]
installer: Fix the LiveCD's /etc/fstab regarding /usr/local.

/usr/local/etc was mounted read/write (a remnant from the FreeBSD ports
era). Instead, mount /usr/pkg/etc in order to give the user a chance to
tweak the settings of the packages which come on the LiveCD.

8 years agosystat - Fix a deja vu in a header file.
Antonio Huete Jimenez [Sun, 4 Apr 2010 00:20:12 +0000 (02:20 +0200)]
systat - Fix a deja vu in a header file.

8 years agoinclude/Makefile: Add vers.txt to CLEANFILES.
Sascha Wildner [Sat, 3 Apr 2010 13:37:20 +0000 (15:37 +0200)]
include/Makefile: Add vers.txt to CLEANFILES.

8 years agokernel - Address excessive stall in pageout during deadlock avoidance
Matthew Dillon [Thu, 1 Apr 2010 18:06:07 +0000 (11:06 -0700)]
kernel - Address excessive stall in pageout during deadlock avoidance

* The pageout daemon uses LK_TIMELOCK to avoid deadlocking on a vnode
  that might be held locked during a pfault, which waits up to 1/10 of
  a second.

  If the vnode has a large number of pageable pages each page may go
  through the timeout.  This can result in the pageout daemon stalling
  for an excessive amount of time.

  Reduce instances of the problem by remembering the last vnode which
  failed its timelock and using LK_NOWAIT for later pages.  A single
  vnode is remembered for now.

Reported-by: Francois Tigeot <ftigeot@wolfpond.org>
8 years agodevfs - Fix incorrect st_size reporting
Matthew Dillon [Thu, 1 Apr 2010 16:16:23 +0000 (09:16 -0700)]
devfs - Fix incorrect st_size reporting

* The default reported st_size should be 0 and not sizeof(devfs_node).

* Fixes incorrect reporting for /dev/null and other devices.

Reported-by: marino2, numerous others (it slipped through the cracks)
8 years agoHAMMER VFS - Fix insufficient cursor change test
Matthew Dillon [Thu, 1 Apr 2010 16:15:17 +0000 (09:15 -0700)]
HAMMER VFS - Fix insufficient cursor change test

* The reblocking code tests whether a cursor has changed after being
  unlocked.  This test was insufficient and resulted in an assertion
  panic.  Beef up the test.

Reported-by: Jan Lentfer <Jan.Lentfer@web.de>
8 years agovinum - change drive parsing
Alex Hornung [Wed, 31 Mar 2010 21:18:40 +0000 (21:18 +0000)]
vinum - change drive parsing

* When calling init_drive() from read_drive_label() change the static 0
  with the verbose var that is passed to read_drive_label().

* Changed the way the drives are parsed in vinum_scandisk() and removed
  the second iteration of detecting vinum partitions

Submitted-by: Rumko
Dragonfly-bug: http//bugs.dragonflybsd.org/issue1565

8 years agoman - Add .Dx entries for 2.6 and 2.7
Matthew Dillon [Wed, 31 Mar 2010 20:39:36 +0000 (13:39 -0700)]
man - Add .Dx entries for 2.6 and 2.7

* Add .Dx entries for 2.6 and 2.7 so nroff -mandoc doesn't complain.

8 years agoHAMMER - Adjust documentation and change default fsync_mode to 3
Matthew Dillon [Wed, 31 Mar 2010 20:36:34 +0000 (13:36 -0700)]
HAMMER - Adjust documentation and change default fsync_mode to 3

* The default fsync_mode is 3 (REDO heuristic with no disk flush).
  This mode is contemporary with what a UFS fsync() does.

8 years agodevfs - remove obsolete KKASSERT
Alex Hornung [Wed, 31 Mar 2010 19:12:08 +0000 (19:12 +0000)]
devfs - remove obsolete KKASSERT

* remove an obsolete KKASSERT checking namlen in allocp, as one was able
  to trigger it from userland by adding a sufficiently large link rule.

Reported-by: Sascha Wildner
8 years agovkernel - remove stale lwbuf fields in globaldata
Matthew Dillon [Wed, 31 Mar 2010 17:44:42 +0000 (10:44 -0700)]
vkernel - remove stale lwbuf fields in globaldata

* Remove stale lwbuf fields that are no longer used from the
  vkernel's globaldata.

* Remove a now-unnecessary #include line from globaldata.h

8 years agokernel - lwbuf - Remove dead code
Matthew Dillon [Wed, 31 Mar 2010 16:25:55 +0000 (09:25 -0700)]
kernel - lwbuf - Remove dead code

* Remove dead code.  objcache_get() can't return NULL in this case.

Submitted-by: sjg
8 years agokernel - more lwbuf followup work
Matthew Dillon [Wed, 31 Mar 2010 16:14:28 +0000 (09:14 -0700)]
kernel - more lwbuf followup work

* Make lwbuf objcache only, removing all the manual per-cpu allocation
  tracking.  Keep the cpumask stuff.  We will deal with the KVM
  fragmentation issue inside objcache later on.

* This basically takes us back to Sam's original objcache implementation.

* Remove unnecessary assembly symbols (assembly didn't use those globaldata
  fields).  Remove related globaldata fields now that we are back to the
  objcache-only implementation.

8 years agokernel - lwbuf, don't rely on gcc auto-arrays
Samuel J. Greear [Wed, 31 Mar 2010 09:28:11 +0000 (03:28 -0600)]
kernel - lwbuf, don't rely on gcc auto-arrays

8 years agokernel - make lwbuf use objcache for ephemeral mappings
Samuel J. Greear [Wed, 31 Mar 2010 08:17:39 +0000 (02:17 -0600)]
kernel - make lwbuf use objcache for ephemeral mappings

* Introduce ephemeral-tagged mappings to lwbuf, these are serviced directly
from objcache.

* Add kern.ipc.lwbuf_reserve, a boot-time tuneable that controls the number
of per-cpu lwbuf's reserved by the subsystem.

* Add kern.ipw.lwbuf_count, which prints the per-cpu number of lwbufs
available for allocation.

8 years agovkernel - Fix kernel build after recent lwbuf work.
Joe Talbott [Wed, 31 Mar 2010 14:02:40 +0000 (10:02 -0400)]
vkernel - Fix kernel build after recent lwbuf work.

Reviewed-By: sjg
8 years agoFix UP kernel build.
Sascha Wildner [Wed, 31 Mar 2010 13:22:42 +0000 (15:22 +0200)]
Fix UP kernel build.