dragonfly.git
2 years agocrt1.o: provide symbol definition of environ
John Marino [Sat, 15 Oct 2011 00:45:14 +0000 (02:45 +0200)]
crt1.o: provide symbol definition of environ

Provide duplicate definition of char **environ to prevent linker choking
on version scripts ending with "local: *".

2 years agocrt1.o: provide symbol definition of __progname
John Marino [Fri, 14 Oct 2011 23:38:11 +0000 (01:38 +0200)]
crt1.o: provide symbol definition of __progname

When the linker version script requests "local: *", the linker chokes on
it because the weak __progname crt1.o symbol comes back undefined.

This is a duplicate definition to the ones provided by csu, but harmless
since the linker resolves it.

Also cleaned up some files involving libc_private.h that should have been
updated in previous changesets.

2 years agoath(4): Remove a debug message (not in FreeBSD's either).
Sascha Wildner [Fri, 14 Oct 2011 23:21:02 +0000 (01:21 +0200)]
ath(4): Remove a debug message (not in FreeBSD's either).

Reported-by: Juan Francisco Cantero Hurtado <iam@juanfra.info>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue2149>

2 years agoAdd PCI MMC/SD drivers to our standard kernel configurations.
Sascha Wildner [Fri, 14 Oct 2011 21:25:18 +0000 (23:25 +0200)]
Add PCI MMC/SD drivers to our standard kernel configurations.

2 years agosyscons - Fix comments related to do_switch_scr()
Antonio Huete Jimenez [Fri, 14 Oct 2011 19:46:49 +0000 (21:46 +0200)]
syscons - Fix comments related to do_switch_scr()

do_switch_scr() no longer releases critical sections so all
the comments remarking this are now wrong, remove them.

Most of the code uses now tty_token for the non-critical paths
and it no longer needs a critical section.

Pointed-out-by: @dillon
2 years agosyscons - Fix comment.
Antonio Huete Jimenez [Fri, 14 Oct 2011 19:19:41 +0000 (21:19 +0200)]
syscons - Fix comment.

2 years agoipiq: Remove an extra semicolon that was messing up an if.
Sascha Wildner [Fri, 14 Oct 2011 02:46:46 +0000 (04:46 +0200)]
ipiq: Remove an extra semicolon that was messing up an if.

Submitted-by: c <c@137.org>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue2147>

2 years agokernel/tmpfs: Remove a useless (and wrong, anyway) header.
Sascha Wildner [Thu, 13 Oct 2011 19:25:00 +0000 (21:25 +0200)]
kernel/tmpfs: Remove a useless (and wrong, anyway) header.

2 years agosdiff: fix wcwidth recursion
John Marino [Wed, 12 Oct 2011 22:39:51 +0000 (00:39 +0200)]
sdiff: fix wcwidth recursion

Apparently trying to diff non-UTF8 documents caused a stack overflow.
The culprit was correctly identified by Yonetani as the redefinition
of wcwidth in the wcwidth.c file.  Within that function, it calls itself
recursively forever.  I'm not sure how this would work differently
(macro or not) on another system.

My solution was to stop redefining wcwidth and just create a separate
function, one that will call the system wcwidth function as needed.

reported by: Peter Avalos
http://bugs.dragonflybsd.org/issue2134

2 years agoSync zoneinfo database with tzdata2011l from munnari.oz.au
Sascha Wildner [Mon, 10 Oct 2011 17:58:54 +0000 (19:58 +0200)]
Sync zoneinfo database with tzdata2011l from munnari.oz.au

* asia: Changed the end date for West Bank's Summer Time for
    this year (2011) to match reality reported by Steffen Thorsen.

* australasia: Adjust the end date for Summer time in Fiji in
    2012 (Feb) as reported by Steffen Thorsen.

* northamerica: Corrected typo in (ancient) LMT zone offset as
    detected by Zefram.

* southamerica: Resume Summer Time in Bahia, Brazil (following the
    standard Brazil algorithm, which causes Summer time to start
    Oct 16 this year, which matches the report.)

2 years agoMerge branch 'devel'
Sepherosa Ziehau [Tue, 11 Oct 2011 13:38:35 +0000 (21:38 +0800)]
Merge branch 'devel'

2 years agolegacy devices: Utilize bus_alloc_legacy_irq_resource()
Sepherosa Ziehau [Tue, 11 Oct 2011 13:14:58 +0000 (21:14 +0800)]
legacy devices: Utilize bus_alloc_legacy_irq_resource()

2 years agopsm: Utilize bus_alloc_legacy_irq_resource
Sepherosa Ziehau [Tue, 11 Oct 2011 11:24:50 +0000 (19:24 +0800)]
psm: Utilize bus_alloc_legacy_irq_resource

2 years agoatkbd: Utilize bus_alloc_legacy_irq_resource()
Sepherosa Ziehau [Tue, 11 Oct 2011 11:24:29 +0000 (19:24 +0800)]
atkbd: Utilize bus_alloc_legacy_irq_resource()

2 years agobus: Add bus_alloc_legacy_irq_resource()
Sepherosa Ziehau [Tue, 11 Oct 2011 11:23:12 +0000 (19:23 +0800)]
bus: Add bus_alloc_legacy_irq_resource()

This is a convenient wrapper function for legacy (mainly ISA) drivers to
alloc IRQ resource

2 years agokernel/drm: Clean up the Makefiles a bit.
Sascha Wildner [Tue, 11 Oct 2011 03:09:45 +0000 (05:09 +0200)]
kernel/drm: Clean up the Makefiles a bit.

2 years agokernel/ufs: Fix mount_point access in ffs_blkfree() when using softdep.
Sascha Wildner [Mon, 10 Oct 2011 20:42:55 +0000 (22:42 +0200)]
kernel/ufs: Fix mount_point access in ffs_blkfree() when using softdep.

Was going through inode->vnode->v_mount, but vnode was bad so
v_mount was NULL reference.

New way to get mount point: inode->i_devvp->v_mount.

Reported-by: Thomas Nikolajsen
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue2142>
Submitted-by: Tim Bisson <bissont@mac.com>
2 years agopadlock(4): Match ENTRY()s with END()s.
Sascha Wildner [Mon, 10 Oct 2011 20:20:09 +0000 (22:20 +0200)]
padlock(4): Match ENTRY()s with END()s.

2 years agolibc_r/libstand/libthread_xu: Match ENTRY()s with END()s.
Sascha Wildner [Mon, 10 Oct 2011 20:10:00 +0000 (22:10 +0200)]
libc_r/libstand/libthread_xu: Match ENTRY()s with END()s.

2 years agoatkbd: Interrupt resource is not shareable
Sepherosa Ziehau [Mon, 10 Oct 2011 13:41:36 +0000 (21:41 +0800)]
atkbd: Interrupt resource is not shareable

2 years agonexus: Log invalid target CPUID for interrupt resource
Sepherosa Ziehau [Mon, 10 Oct 2011 11:58:21 +0000 (19:58 +0800)]
nexus: Log invalid target CPUID for interrupt resource

2 years agopsm: Set the interrupt's target CPU properly
Sepherosa Ziehau [Mon, 10 Oct 2011 11:56:39 +0000 (19:56 +0800)]
psm: Set the interrupt's target CPU properly

2 years agoatkbd: Set the interrupt's target CPU properly
Sepherosa Ziehau [Mon, 10 Oct 2011 11:56:04 +0000 (19:56 +0800)]
atkbd: Set the interrupt's target CPU properly

2 years agoDocument spin_pool_lock(9) and spin_pool_unlock(9).
Venkatesh Srinivas [Mon, 10 Oct 2011 02:29:54 +0000 (19:29 -0700)]
Document spin_pool_lock(9) and spin_pool_unlock(9).

2 years agolibm: Match ENTRY()s with END()s.
Sascha Wildner [Sun, 9 Oct 2011 22:36:08 +0000 (00:36 +0200)]
libm: Match ENTRY()s with END()s.

2 years agoresource: Per-CPU hardware resources support, step 5 of many
Sepherosa Ziehau [Sun, 9 Oct 2011 14:00:33 +0000 (22:00 +0800)]
resource: Per-CPU hardware resources support, step 5 of many

Fix up cpuid parameter passed to resource_list_add() after
bus_set_resource and bus_alloc_resource DEVMETHODs have cpuid
parameter.

2 years agoresource: Per-CPU hardware resources support, step 4 of many
Sepherosa Ziehau [Sun, 9 Oct 2011 11:06:25 +0000 (19:06 +0800)]
resource: Per-CPU hardware resources support, step 4 of many

Add cpuid parameter to bus_alloc_resource DEVMETHOD, so cpuid
could be passed all the way to the nexus

2 years agorman: Record owner CPUID during initialization
Sepherosa Ziehau [Sun, 9 Oct 2011 09:27:29 +0000 (17:27 +0800)]
rman: Record owner CPUID during initialization

2 years agolibc: Remove the CVS ID in the recently changed files, too.
Sascha Wildner [Sat, 8 Oct 2011 14:36:27 +0000 (16:36 +0200)]
libc: Remove the CVS ID in the recently changed files, too.

2 years agoAdd missing END() macros to libc i386 .S files
François Tigeot [Sat, 8 Oct 2011 13:55:34 +0000 (15:55 +0200)]
Add missing END() macros to libc i386 .S files

They were already present in the x86_64 versions of these files

2 years agoFix the i386 buildworld.
Sascha Wildner [Sat, 8 Oct 2011 11:50:11 +0000 (13:50 +0200)]
Fix the i386 buildworld.

Reported-by: Joachim de Groot <jdegroot@web.de>
2 years agoTRIM support
Tim [Fri, 7 Oct 2011 18:27:15 +0000 (11:27 -0700)]
TRIM support

Signed-off-by: Samuel J. Greear <sjg@thesjg.com>
2 years agokernel -- Resolve NULL ptr dereference in fill_kinfo_proc.
Venkatesh Srinivas [Fri, 7 Oct 2011 19:45:03 +0000 (12:45 -0700)]
kernel -- Resolve NULL ptr dereference in fill_kinfo_proc.

Reported-by: Justin Sherrill
2 years agokernel - Fix bug in lwkt_token_swap()
Matthew Dillon [Fri, 7 Oct 2011 07:22:09 +0000 (00:22 -0700)]
kernel - Fix bug in lwkt_token_swap()

* Fix a bug where lwkt_token_swap() would incorrectly assign the ref
  pointer when the top two tokens on the stack are the same token.

  When swapping the top two tokens where tok1 == tok2, the token
  can wind up being repointed to the top ref instead of the deeper
  ref.  When the top ref is released this caused the token to also
  release even though there was another deeper ref to the same
  token.

* Effected the vm_object traversal code and could cause an object token
  to be effectively lost without triggering a panic, resulting in
  corruption.

2 years agox86_64 - Remove unneeded globaldata.c file.
Antonio Huete Jimenez [Thu, 6 Oct 2011 15:46:52 +0000 (17:46 +0200)]
x86_64 - Remove unneeded globaldata.c file.

Functions globaldata_find(), cpu_gdinit() and is_globaldata_space()
are correctly defined in machdep.c.

2 years agokernel -- Add pool spinlocks interface.
Venkatesh Srinivas [Thu, 6 Oct 2011 01:40:03 +0000 (18:40 -0700)]
kernel -- Add pool spinlocks interface.

2 years agoMake pkgsrc-2011q3 default instead of 2011q1.
Justin C. Sherrill [Wed, 5 Oct 2011 14:18:04 +0000 (10:18 -0400)]
Make pkgsrc-2011q3 default instead of 2011q1.

2 years agokernel - Fix spin lock held across contigfree/kfree in bounce code
Matthew Dillon [Tue, 4 Oct 2011 14:58:38 +0000 (07:58 -0700)]
kernel - Fix spin lock held across contigfree/kfree in bounce code

* Fix an issue where a spin lock is being held across too-complex a
  procedure call.  The bounce page is isolated once removed from its
  list so we can release the lock while issuing the calls, then
  re-acquire it.

Reported-by: Antonio Huete Jimenez <tuxillo@quantumachine.net>
2 years agoresource: Per-CPU hardware resources support, step 3 of many
Sepherosa Ziehau [Tue, 4 Oct 2011 08:15:27 +0000 (16:15 +0800)]
resource: Per-CPU hardware resources support, step 3 of many

- Add cpuid parameter to bus_set_resource() and bus_set_resource
  DEVMETHOD; Pass this parameter to resource_list_add()
- Obtain interrupt resource's owner CPU, i.e. target CPU, from
  MachIntrABI and pass it to bus_set_resource(), so that the owner
  CPU of the interrupt resource could be correctly setup
- Rest of types of resources, e.g. IOPORT, MEMORY and DRQ, are
  shared across CPUs, so their cpuids are set to -1

2 years agoImport proplib from NetBSD
François Tigeot [Sat, 1 Oct 2011 11:07:35 +0000 (13:07 +0200)]
Import proplib from NetBSD

- main change: fix for an implementation inconsistency with the
prop_*_send_syscall() and prop_*_recv_syscall() functions
NetBSD commit message:
http://mail-index.netbsd.org/source-changes/2011/09/30/msg027701.html

- some unrelated minor fixes

2 years agoRaise default .Os value for the manual pages to 2.13 on master.
Sascha Wildner [Tue, 4 Oct 2011 05:33:45 +0000 (07:33 +0200)]
Raise default .Os value for the manual pages to 2.13 on 

2 years ago2.13 update. v2.13.0
Justin C. Sherrill [Tue, 4 Oct 2011 02:45:25 +0000 (19:45 -0700)]
2.13 update.

2 years agoMachIntrABI: Add method to return IRQ's target CPU
Sepherosa Ziehau [Mon, 3 Oct 2011 14:28:38 +0000 (22:28 +0800)]
MachIntrABI: Add method to return IRQ's target CPU

2 years agoresource: Per-CPU hardware resources support, step 2 of many
Sepherosa Ziehau [Mon, 3 Oct 2011 14:05:56 +0000 (22:05 +0800)]
resource: Per-CPU hardware resources support, step 2 of many

Add cpuid parameter to resource_list_alloc, so that this parameter could
be passed to bus_alloc_resource DEVMETHOD

2 years agoresource: Per-CPU hardware resources support, step 1 of many
Sepherosa Ziehau [Mon, 3 Oct 2011 12:41:03 +0000 (20:41 +0800)]
resource: Per-CPU hardware resources support, step 1 of many

- Add cpuid in the resource list entry, which points to the
  resource's owner CPU
- Add cpuid parameter to resource_list_add(), which could be used to
  set the resource's owner CPU

2 years agofsdb(8): Raise WARNS to 1.
Sascha Wildner [Sat, 1 Oct 2011 19:28:37 +0000 (21:28 +0200)]
fsdb(8): Raise WARNS to 1.

2 years agokernel - VM MPSAFE fixes
Venkatesh Srinivas [Fri, 30 Sep 2011 12:42:00 +0000 (05:42 -0700)]
kernel - VM MPSAFE fixes

* Apply amd64 PMAP fixes from a5fc46c91597d0af0cfa8fd257b4a8ed6e1cf341 to i386

* Hold vm_object in vm_swapcache_cleaning()

2 years agokernel - Numerous VM MPSAFE fixes
Matthew Dillon [Thu, 29 Sep 2011 21:46:42 +0000 (14:46 -0700)]
kernel - Numerous VM MPSAFE fixes

* Remove most critical sections from the VM subsystem, these are no longer
  applicable (vm_token covers the access).

* _pmap_allocpte() for x86-64 - Conditionalize the zeroing of the vm_page
  after the grab.  The grab can race other threads and result in a page
  which had already been zero'd AND populated with pte's, so we can't just
  zero it.

  Use m->valid to determine if the page is actually newly allocated or not.

  NOTE: The 32 bit code already properly zeros the page by detecting whether
the pte has already been entered or not.  The 64-bit code couldn't
do this neatly so we used another method.

* Hold the pmap vm_object in pmap_release() and pmap_object_init_pt() for
  the x86-64 pmap code.  This prevents related loops from blocking on the
  pmap vm_object when freeing VM pages which is not expected by the code.

* pmap_copy() for x86-64 needs the vm_token, critical sections are no longer
  sufficient.

* Assert that PG_MANAGED is set when clearing pte's out of a pmap via the
  PV entries.  The pte's must exist in this case and it's a critical panic
  if they don't.

* pmap_replacevm() for x86-64 - Adjust newvm->vm_sysref prior to assigning
  it to p->p_vmspace to handle any potential MP races with other sysrefs
  on the vmspace.

* faultin() needs p->p_token, not proc_token.

* swapout_procs_callback() needs p->p_token.

* Deallocate the VM object associated with a vm_page after freeing the
  page instead of before freeing the page.  This fixes a potential
  use-after-refs-transition-to-0 case if a MP race occurs.

2 years agoResurrect z*grep script to support gzip'ped files.
YONETANI Tomokazu [Thu, 29 Sep 2011 00:00:41 +0000 (09:00 +0900)]
Resurrect z*grep script to support gzip'ped files.

2 years agohammer(8): snaprm: fix edge case
Thomas Nikolajsen [Tue, 27 Sep 2011 05:35:01 +0000 (07:35 +0200)]
hammer(8): snaprm: fix edge case

Ensure that @@transid is at end of symlink.

2 years agohammer(8): fix snaprm argument parsing
Thomas Nikolajsen [Mon, 26 Sep 2011 19:20:27 +0000 (21:20 +0200)]
hammer(8): fix snaprm argument parsing

Parse arguments according to SYNOPSIS.
snaprm didn't parse arguments fully:
e.g. PFS symlink was deleted if given as only argument.

DragonFly-bug: <http://bugs.dragonflybsd.org/issue2111>
Submitted-by: fix based on patch from "sgaerner@gmx.net"
2 years agohammer(8): whitespace cleanup: delete blank at end of line
Thomas Nikolajsen [Mon, 26 Sep 2011 19:18:11 +0000 (21:18 +0200)]
hammer(8): whitespace cleanup: delete blank at end of line

2 years agoSync zoneinfo database with tzdata2011k from elsie.nci.nih.gov
Sascha Wildner [Mon, 26 Sep 2011 15:27:01 +0000 (17:27 +0200)]
Sync zoneinfo database with tzdata2011k from elsie.nci.nih.gov

asia:           8.65 -> 8.68
europe:         8.34 -> 8.38
northamerica:   8.48 -> 8.49
zone.tab:       8.47 -> 8.49

* asia: Palestine suspends DST during Ramadan in 2011; Gaza and Hebron
    split in 2011, leading to a new Asia/Hebron zone (thanks to
    Steffen Thorsen and Alexander Krivenshev). The different end of DST
    in Gaza and Hebron in 2008 is also reflected.

* europe: Belarus adopts permanent DST in 2011 (thanks to Yauhen Kharuzhy,
    Alexander Bokovoy, Alexander Krivenyshev, and Kirill A. Shutemov).
    Ukraine adopts permanent DST in 2011 (thanks to Alexander Krivenyshev).
    "Russia" rules changed to reflect end of use in 2010. "FET" used as
    abbreviation for Belarus, Ukraine, and western Russia (thanks to
    Paul Eggert). Also: a comment typo is fixed.

* northamerica: Updated comment on Newfoundland's 2011 change of time of
    day when DST starts and ends (thanks to Michael Pelley).

* zone.tab: New Asia/Hebron zone (thanks to Alexander Krivenshev).

2 years agokernel -- vfs_bio.c: Rework bread() in terms of breadn().
Venkatesh Srinivas [Mon, 26 Sep 2011 02:12:20 +0000 (19:12 -0700)]
kernel -- vfs_bio.c: Rework bread() in terms of breadn().

2 years agopoll(2): Set POLLERR properly
Sepherosa Ziehau [Sun, 25 Sep 2011 14:19:19 +0000 (22:19 +0800)]
poll(2): Set POLLERR properly

If the other side closed the connection and error happens (so_error != 0)
POLLERR is turned on accordingly.

2 years agotruss(1): On a second thought, keep the old entries.
Sascha Wildner [Sun, 25 Sep 2011 00:29:55 +0000 (02:29 +0200)]
truss(1): On a second thought, keep the old entries.

2 years agotruss(1): Remove an 'a' that sneaked in.
Sascha Wildner [Sun, 25 Sep 2011 00:21:58 +0000 (02:21 +0200)]
truss(1): Remove an 'a' that sneaked in.

2 years agotruss(1): Adjust for 315b8b8b77c1101b25fef36483a8d0474a1befb2.
Sascha Wildner [Sun, 25 Sep 2011 00:18:49 +0000 (02:18 +0200)]
truss(1): Adjust for 315b8b8b77c1101b25fef36483a8d0474a1befb2.

We changed to "DragonFly ELF{32,64}."

2 years agopatch(1): Don't try to mmap a zero length file.
Sascha Wildner [Sun, 25 Sep 2011 00:14:58 +0000 (02:14 +0200)]
patch(1): Don't try to mmap a zero length file.

Found-in: NetBSD

2 years agosys_socketpair: Free socketpair file descriptors if copyout() fails.
Venkatesh Srinivas [Sat, 24 Sep 2011 18:02:48 +0000 (11:02 -0700)]
sys_socketpair: Free socketpair file descriptors if copyout() fails.

2 years agofifo: Restore the old semantics of select(2)/poll(2) for reading
Sepherosa Ziehau [Sat, 24 Sep 2011 14:16:13 +0000 (22:16 +0800)]
fifo: Restore the old semantics of select(2)/poll(2) for reading

select(2)/poll(2) for reading on a fifo should not return "ready
to read" if all of the writers have closed the fifo.

DragonFly-Bug: http://bugs.dragonflybsd.org/issue2028

2 years agokernel -- vm_page_dontneed: Fix interaction with vm_page_madvise and pagedaemon
Venkatesh Srinivas [Sat, 24 Sep 2011 13:41:13 +0000 (06:41 -0700)]
kernel -- vm_page_dontneed: Fix interaction with vm_page_madvise and pagedaemon

vm_page_dontneed didn't clear the PG_REFERENCED flag on pages it is
deactivating. The pagedaemon would see references on the page (via
PG_REFERENCED) and reactivate it, undoing the effect of vm_page_dontneed.

2 years agostdio: Add __printflike for dprintf(3) and vdprintf(3)
Sepherosa Ziehau [Fri, 23 Sep 2011 08:54:59 +0000 (16:54 +0800)]
stdio: Add __printflike for dprintf(3) and vdprintf(3)

Noticed-by: "Xia Zuoling" <zeroxia@gmail.com>
2 years agokevent: Restore old EV_EOF semantics
Sepherosa Ziehau [Fri, 23 Sep 2011 06:23:53 +0000 (14:23 +0800)]
kevent: Restore old EV_EOF semantics

- EV_EOF should be set when the other side closed the connection, even
  if there are data pending in the read buffer (the old semantics).
- EV_NODATA is added to indicate there are no more data pending in the
  buffer and EOF is detected (EV_EOF is also set in this situation).

Kernel code now tests EV_NODATA instead of EV_EOF, since EV_NODATA
delivers the information which was delivered by the EV_EOF before
this commit.

DragonFly-Bug: http://bugs.dragonflybsd.org/issue1998

2 years agoselect(2)/kevent: Bail out immediately if EV_ERROR is set.
Sepherosa Ziehau [Fri, 23 Sep 2011 03:54:02 +0000 (11:54 +0800)]
select(2)/kevent: Bail out immediately if EV_ERROR is set.

By setting *res to -1, if kevent registration failed, select(2)
will return error properly.

2 years agoAdd header guard to mntopts.h
Venkatesh Srinivas [Fri, 23 Sep 2011 03:52:47 +0000 (20:52 -0700)]
Add header guard to mntopts.h

2 years agokevent(2): Set errno properly
Sepherosa Ziehau [Fri, 23 Sep 2011 01:51:05 +0000 (09:51 +0800)]
kevent(2): Set errno properly

If we can't deliver the registration failure information in the
changelist, then we should set the errno properly.

2 years ago<ucontext.h>: Conditionalize prototypes for {get,set,make,swap}context().
Sascha Wildner [Wed, 21 Sep 2011 05:48:43 +0000 (07:48 +0200)]
<ucontext.h>: Conditionalize prototypes for {get,set,make,swap}context().

They are gone per OpenGroup Specifications Issue 7.

However, keep them visible in our default environment.

2 years agoUpdate files for file-5.09 import.
Peter Avalos [Wed, 21 Sep 2011 02:34:55 +0000 (19:34 -0700)]
Update files for file-5.09 import.

2 years agoMerge branch 'vendor/FILE'
Peter Avalos [Wed, 21 Sep 2011 02:34:15 +0000 (19:34 -0700)]
Merge branch 'vendor/FILE'

2 years agoImport file-5.09.
Peter Avalos [Wed, 21 Sep 2011 02:25:31 +0000 (19:25 -0700)]
Import file-5.09.

* Don't wait for any subprocess, just the one we forked.
* If the application name is not set in a cdf file, try to see
  if it has a directory with the application name on it.
* Fix ELF lseek(2) madness. Inspired by PR/134 by Jan Kaluza
* Don't use variable string formats.
* Fix detection of Zip files (Mantis #128).
* Make some minor improvements to file(1).
* Rename MIME types for filesystem objects for consistency with
  xdg-utils. Typically this means that application/x-foo becomes
  inode/foo, but some names also change slightly, e.g.
  application/x-character-device becomes inode/chardevice.

2 years agoUpdate files for OpenSSL-1.0.0e import.
Peter Avalos [Wed, 21 Sep 2011 02:14:37 +0000 (19:14 -0700)]
Update files for OpenSSL-1.0.0e import.

2 years agoMerge branch 'vendor/OPENSSL'
Peter Avalos [Wed, 21 Sep 2011 00:38:06 +0000 (17:38 -0700)]
Merge branch 'vendor/OPENSSL'

2 years agoImport OpenSSL-1.0.0e.
Peter Avalos [Wed, 21 Sep 2011 00:22:53 +0000 (17:22 -0700)]
Import OpenSSL-1.0.0e.

      o Fix for CRL vulnerability issue CVE-2011-3207
      o Fix for ECDH crashes CVE-2011-3210
      o Protection against EC timing attacks.
      o Support ECDH ciphersuites for certificates using SHA2 algorithms.
      o Various DTLS fixes.

2 years agoUpdate files for OpenSSH-5.9p1 import.
Peter Avalos [Tue, 20 Sep 2011 23:58:41 +0000 (16:58 -0700)]
Update files for OpenSSH-5.9p1 import.

2 years agoMerge branch 'vendor/OPENSSH'
Peter Avalos [Tue, 20 Sep 2011 23:41:15 +0000 (16:41 -0700)]
Merge branch 'vendor/OPENSSH'

2 years agoBring in a compat file needed for latest OpenSSH import.
Peter Avalos [Tue, 20 Sep 2011 23:39:31 +0000 (16:39 -0700)]
Bring in a compat file needed for latest OpenSSH import.

2 years agoMerge branch 'vendor/OPENSSH'
Peter Avalos [Tue, 20 Sep 2011 22:50:56 +0000 (15:50 -0700)]
Merge branch 'vendor/OPENSSH'

2 years agoImport OpenSSH-5.9p1.
Peter Avalos [Tue, 20 Sep 2011 22:19:10 +0000 (15:19 -0700)]
Import OpenSSH-5.9p1.

 * Introduce sandboxing of the pre-auth privsep child using an optional
   sshd_config(5) "UsePrivilegeSeparation=sandbox" mode that enables
   mandatory restrictions on the syscalls the privsep child can perform.
   This intention is to prevent a compromised privsep child from being
   used to attack other hosts (by opening sockets and proxying) or
   probing local kernel attack surface.

   The rlimit sandbox is a fallback choice for platforms that don't
   support a better one; it uses setrlimit() to reset the hard-limit
   of file descriptors and processes to zero, which should prevent
   the privsep child from forking or opening new network connections.

 * Add new SHA256-based HMAC transport integrity modes from
   http://www.ietf.org/id/draft-dbider-sha2-mac-for-ssh-02.txt
   These modes are hmac-sha2-256, hmac-sha2-256-96, hmac-sha2-512,
   and hmac-sha2-512-96, and are available by default in ssh(1) and
   sshd(8)

 * The pre-authentication sshd(8) privilege separation slave process
   now logs via a socket shared with the master process, avoiding the
   need to maintain /dev/log inside the chroot.

 * ssh(1) now warns when a server refuses X11 forwarding

 * sshd_config(5)'s AuthorizedKeysFile now accepts multiple paths,
   separated by whitespace. The undocumented AuthorizedKeysFile2
   option is deprecated (though the default for AuthorizedKeysFile
   includes .ssh/authorized_keys2)

 * sshd_config(5): similarly deprecate UserKnownHostsFile2 and
   GlobalKnownHostsFile2 by making UserKnownHostsFile and
   GlobalKnownHostsFile accept multiple options and default to
   include known_hosts2

 * Retain key comments when loading v.2 keys. These will be visible
   in "ssh-add -l" and other places. bz#439

 * ssh(1) and sshd(8): set IPv6 traffic class from IPQoS (as well as
   IPv4 ToS/DSCP). bz#1855

 * ssh_config(5)'s ControlPath option now expands %L to the host
   portion of the destination host name.

 * ssh_config(5) "Host" options now support negated Host matching, e.g.

     Host *.example.org !c.example.org
        User mekmitasdigoat

   Will match "a.example.org", "b.example.org", but not "c.example.org"

 * ssh_config(5): a new RequestTTY option provides control over when a
   TTY is requested for a connection, similar to the existing -t/-tt/-T
   ssh(1) commandline options.

 * sshd(8): allow GSSAPI authentication to detect when a server-side
   failure causes authentication failure and don't count such failures
   against MaxAuthTries; bz#1244

 * ssh-keygen(1): Add -A option. For each of the key types (rsa1, rsa,
   dsa and ecdsa) for which host keys do not exist, generate the host
   keys with the default key file path, an empty passphrase, default
   bits for the key type, and default comment. This is useful for
   system initialization scripts.

 * ssh(1): Allow graceful shutdown of multiplexing: request that a mux
   server removes its listener socket and refuse future multiplexing
   requests but don't kill existing connections. This may be requested
   using "ssh -O stop ..."

 * ssh-add(1) now accepts keys piped from standard input. E.g.
   "ssh-add - < /path/to/key"

 * ssh-keysign(8) now signs hostbased authentication
   challenges correctly using ECDSA keys; bz#1858

 * sftp(1): document that sftp accepts square brackets to delimit
   addresses (useful for IPv6); bz#1847a

 * ssh(1): when using session multiplexing, the master process will
   change its process title to reflect the control path in use and
   when a ControlPersist-ed master is waiting to close; bz#1883 and
   bz#1911

 * Other minor bugs fixed: 1849 1861 1862 1869 1875 1878 1879 1892
   1900 1905 1913

2 years agolibarchive: Bump WARNS down for vendor-induced warnings.
Peter Avalos [Tue, 20 Sep 2011 21:51:40 +0000 (14:51 -0700)]
libarchive: Bump WARNS down for vendor-induced warnings.

2 years agoMerge branch 'vendor/LIBARCHIVE'
Peter Avalos [Tue, 20 Sep 2011 21:36:20 +0000 (14:36 -0700)]
Merge branch 'vendor/LIBARCHIVE'

2 years agoImport libarchive-2.8.5.
Peter Avalos [Tue, 20 Sep 2011 21:15:23 +0000 (14:15 -0700)]
Import libarchive-2.8.5.

* Now reads ISO images created by NetBSD makefs and other tools.
* Relax an lzma compression test to remove false negatives.
* Better handling of open failures and interrupted writes.
* Corrected compile warnings on various platforms.

2 years agolibc/x86_64: Remove duplicate file in a Makefile.
Sascha Wildner [Tue, 20 Sep 2011 20:20:26 +0000 (22:20 +0200)]
libc/x86_64: Remove duplicate file in a Makefile.

2 years agoubsec(4) - update man page
Alex Hornung [Tue, 20 Sep 2011 10:00:23 +0000 (11:00 +0100)]
ubsec(4) - update man page

Obtained-from: FreeBSD

2 years agoubsec - Fix & update
Alex Hornung [Tue, 20 Sep 2011 09:14:29 +0000 (10:14 +0100)]
ubsec - Fix & update

 * Fix ubsec(4) to work with our updated opencrypto. The main problem
   was that the argument to newsession, freesession, process and
   kprocess changed from an arbitrary arg (set to softc) to a device_t.

 * Update bits and pieces from FreeBSD, such as cleaning up the code a
   bit and adding support for bcm5825.

Tested with a BCM5821 PCI-x card.

2 years agomachintr/x86_64: Function renaming; no functional changes
Sepherosa Ziehau [Sun, 18 Sep 2011 13:10:32 +0000 (21:10 +0800)]
machintr/x86_64: Function renaming; no functional changes

2 years agoclock: register_int and unregister_int will enable/disable interrupt
Sepherosa Ziehau [Sun, 18 Sep 2011 13:14:42 +0000 (21:14 +0800)]
clock: register_int and unregister_int will enable/disable interrupt

2 years agomachintr/i386: Function renaming; no functional changes
Sepherosa Ziehau [Sun, 18 Sep 2011 12:05:32 +0000 (20:05 +0800)]
machintr/i386: Function renaming; no functional changes

2 years agotcp.4: Add document for TCP_KEEP{INIT,IDLE,INTVL,CNT}
Sepherosa Ziehau [Fri, 16 Sep 2011 08:44:56 +0000 (16:44 +0800)]
tcp.4: Add document for TCP_KEEP{INIT,IDLE,INTVL,CNT}

2 years agotcp.4: Document net.inet.tcp.keepcnt
Sepherosa Ziehau [Fri, 16 Sep 2011 08:27:17 +0000 (16:27 +0800)]
tcp.4: Document net.inet.tcp.keepcnt

2 years agotcp: Add comment for the keepinit and keepalive related stuffs
Sepherosa Ziehau [Fri, 16 Sep 2011 08:13:23 +0000 (16:13 +0800)]
tcp: Add comment for the keepinit and keepalive related stuffs

2 years agotcp: Remove no longer used tcp_slowtimo
Sepherosa Ziehau [Fri, 16 Sep 2011 08:06:03 +0000 (16:06 +0800)]
tcp: Remove no longer used tcp_slowtimo

2 years agotcp: Allow per-tcpcb keepintvl and keepcnt
Sepherosa Ziehau [Fri, 16 Sep 2011 07:53:37 +0000 (15:53 +0800)]
tcp: Allow per-tcpcb keepintvl and keepcnt

- Expose tcp_keepcnt
- Add t_keepintvl, t_keepcnt and t_maxidle to tcpcb.  t_keepintvl and
  t_keepcnt is initialized to tcp_keepintvl and tcp_keepcnt respectively.
  t_maxidle is initialized to t_keepcnt * t_keepintvl
- The accepted socket's t_keepintvl, t_keepcnt and t_maxidle is inherited
  from the listen socket
- Add IPPROTO_TCP/TCP_KEEPINTVL and IPPROTO_TCP.TCP_KEEPCNT socket options
  to get and set t_keepintvl and t_keepcnt.  TCP_KEEPINTVL's unit is
  milliseconds, which is as same as the unit of the sysctl node
  net.inet.tcp.keepintvl
- Remove no longer used tcp_maxidle

2 years agotcp: Allow per-tcpcb keepidle
Sepherosa Ziehau [Fri, 16 Sep 2011 07:13:22 +0000 (15:13 +0800)]
tcp: Allow per-tcpcb keepidle

- Add t_keepidle to tcpcb, it is initialized to tcp_keepidle
- The accepted socket's t_keepidle is inherited from the listen socket
- Add IPPROTO_TCP/TCP_KEEPIDLE socket option to get and set t_keepidle.
  The unit is milliseconds, which is as same as the unit of the sysctl
  node net.inet.tcp.keepidle

2 years agotcp: Allow per-tcpcb keepinit
Sepherosa Ziehau [Fri, 16 Sep 2011 06:41:13 +0000 (14:41 +0800)]
tcp: Allow per-tcpcb keepinit

- Add t_keepinit to tcpcb, it is initialized to tcp_keepinit
- The accepted socket's t_keepinit is inherited from the listen socket
- Add IPPROTO_TCP/TCP_KEEPINIT socket option to get and set t_keepinit.
  The unit is milliseconds, which is as same as the unit of the sysctl
  node net.inet.tcp.keepinit

2 years agotcp: Expose tcp_keepcnt through sysctl net.inet.tcp.keepcnt
Sepherosa Ziehau [Fri, 16 Sep 2011 06:06:46 +0000 (14:06 +0800)]
tcp: Expose tcp_keepcnt through sysctl net.inet.tcp.keepcnt

2 years agokernel - Fix various memory & swap leaks in tmpfs
Matthew Dillon [Thu, 15 Sep 2011 06:25:03 +0000 (23:25 -0700)]
kernel - Fix various memory & swap leaks in tmpfs

* tmpfs was using a vref() instead of a vget() (cache_vget() to be precise)
  which does not necessarily reactivate an inactive vnode.  This can cause
  the vnode to languish in the vnode cache even when the underlying file
  has been removed and no longer has any open() descriptors.

* tmpfs_nrmdir(), tmpfs_nremove(), and tmpfs_nrename() (for target replacement
  renames) was effected.

Reported-by: sephe and others, tested by sephe, dillon
2 years agoMachIntrABI: Field rename; no functional changes
Sepherosa Ziehau [Wed, 14 Sep 2011 13:32:37 +0000 (21:32 +0800)]
MachIntrABI: Field rename; no functional changes

2 years agoi386/files: isa/clock.c is clean enough to compile w/ -Werror
Sepherosa Ziehau [Wed, 14 Sep 2011 13:31:12 +0000 (21:31 +0800)]
i386/files: isa/clock.c is clean enough to compile w/ -Werror

2 years agoopen_memstream.3: A little bit of cleanup.
Sascha Wildner [Tue, 13 Sep 2011 02:33:35 +0000 (04:33 +0200)]
open_memstream.3: A little bit of cleanup.