Sascha Wildner [Mon, 29 Nov 2010 02:38:14 +0000 (03:38 +0100)]
kernel: Bring in hexdump() from FreeBSD.
Sascha Wildner [Tue, 30 Nov 2010 15:28:23 +0000 (16:28 +0100)]
mlockall.2: Fix month name and remove trailing whitespace.
Samuel J. Greear [Tue, 30 Nov 2010 05:01:38 +0000 (05:01 +0000)]
Merge branch 'GCI2010'
Samuel J. Greear [Tue, 30 Nov 2010 04:42:32 +0000 (04:42 +0000)]
kernel - Provide descriptions for lwkt.* and debug.* sysctl's
* Take the opportunity to chop a few dead sysctl's as well
Submitted-by: Taras Klaskovsky
Sponsored-by: Google Code-In
Joe Talbott [Tue, 30 Nov 2010 02:11:17 +0000 (21:11 -0500)]
Merge branch 'master' of git://crater.dragonflybsd.org/dragonfly
Joe Talbott [Tue, 30 Nov 2010 02:03:20 +0000 (21:03 -0500)]
unp_connect() - Use euid/egid for access checks via VOP_EACCESS().
Fixes socket access for set[ug]id applications by using the euid/egid
rather than the uid/gid.
Reported-By: Tim Darby <t+dfbsd@timdarby.net>
Matthew Dillon [Mon, 29 Nov 2010 19:38:33 +0000 (11:38 -0800)]
kernel - Run pfil hooks for bridged packets
* The pfil hooks were not being run in all cases for bridged packets.
Submitted-by: Rumko <rumcic@gmail.com>
Venkatesh Srinivas [Mon, 29 Nov 2010 19:23:38 +0000 (11:23 -0800)]
kernel - tmpfs - Remove mplock in tmpfs_read().
Venkatesh Srinivas [Mon, 29 Nov 2010 16:46:27 +0000 (08:46 -0800)]
Import mlockall(2)/munlockall(2) manpage from OpenBSD and modify for Dfly.
Alex Hornung [Mon, 29 Nov 2010 08:02:08 +0000 (08:02 +0000)]
dm - access io_cnt atomically
* Now that we are using shared locks at some points, only update the
io_cnt atomically, otherwise we can mess things up.
Alex Hornung [Fri, 26 Nov 2010 14:23:12 +0000 (15:23 +0100)]
dm - misc minor cleanup
* remove dead code, weird white spaces and fix comments.
Alex Hornung [Fri, 26 Nov 2010 14:08:33 +0000 (15:08 +0100)]
dm - remove convoluted string comparison methods
Alex Hornung [Fri, 26 Nov 2010 14:01:33 +0000 (15:01 +0100)]
dm - minor cleanup
* Fix a bit of indenting, add a comment.
* Remove useless and pointless (just as redundant as using both of those
words) code.
Alex Hornung [Fri, 26 Nov 2010 13:42:12 +0000 (14:42 +0100)]
dm - use shared/exclusive lockmgr for table access
* Use shared/exclusive lockmgr locks for table access instead of this
random mess of exclusive lockmgr locks, reference counts and condvars.
Alex Hornung [Fri, 26 Nov 2010 13:28:38 +0000 (14:28 +0100)]
dm - properly encapsulate disable_dev
Alex Hornung [Fri, 26 Nov 2010 13:27:48 +0000 (14:27 +0100)]
condvar - add cv_has_waiters()
Matthew Dillon [Sun, 28 Nov 2010 06:43:00 +0000 (22:43 -0800)]
kernel - Document an odd case in vm_page.c
* Document cases from the buffer cache where a vm_page's clean/dirty bits
might be modified without busying the related vm_page. vm_token is still
held through the operation.
Matthew Dillon [Sun, 28 Nov 2010 06:40:13 +0000 (22:40 -0800)]
HAMMER VFS - Fix HAMMER_INODE_XDIRTY flags / state assertion
* The HAMMER_INODE_XDIRTY flag was not being immediately synchronized
with the state of ip->rec_tree in one case and the delay could create
a window of opportunity where an assertion would get hit.
* Remove the window of opportunity, the assertion no longer gets hit.
Reported-by: YONETANI Tomokazu <qhwt.dfly@les.ath.cx>
Matthew Dillon [Sun, 28 Nov 2010 06:34:56 +0000 (22:34 -0800)]
kernel - x86-64 - normalize the location of the pcb/md_regs and remove gd_rsp0
* Normalize the location of the pcb and related user process register
frame for traps and system calls.
* The pcb is now 16-byte aligned at the top of the kernel thread's stack
and md_regs is placed just below it.
* We no longer reserve 16 bytes for a 8086 emulation frame.
* Change the md_regs assignment in the trap code to an assertion that the
value is correct.
* Remove gd_rsp0, use the value from common_tss.tss_rsp0 instead (which
is the same).
Matthew Dillon [Sun, 28 Nov 2010 06:28:52 +0000 (22:28 -0800)]
kernel - Hold vm_token() for certain buf/bio/vm_page interactions
* Hold the vm_token when messing around with page valid and dirty bits
in buffer cache operations. Such race conditions are possible but would
be very rare.
* Fix inconsistent use of bio2.bio_offset when swapcache intercepts an
I/O operation. When this case occurs the normal filesystem VOP_STRATEGY
function will not be called and any assumption that bio2.bio_offset
will represent a block device offset will be invalid.
To deal with this case swapcache will re-set bio_offset to NOOFFSET.
Filesystems use this value to determine that no block device offset
has been cached for a logical file block.
Reported-by: Jan Lentfer <Jan.Lentfer@web.de> (bio_offset issue)
Matthew Dillon [Sun, 28 Nov 2010 06:27:10 +0000 (22:27 -0800)]
kernel - Fix MP race in signotify_remote()
* In rare cases it is possible for a process to hop multiple cpus while
a signal is trying to chase the process. Adjust signotify_remote() to
deal with the case.
Matthew Dillon [Sun, 28 Nov 2010 06:20:04 +0000 (22:20 -0800)]
kernel - Fix NFS stall and likely also x86-64 seg-fault issue
* The nfs node hash code was not MPSAFE due to its use of a global
hash table. This could lead to a stall condition due to the
global hash table losing track of its manual lock. For now use a
token to interlock hash table access and replace the manual lock
with a lockmgr lock.
* This appears to have also fixed the long-standing random seg-fault
issue with x86-64, where a buildworld loop would seg-fault every once
in a while for no apparent reason. /usr/src on my test box has always
been NFS mounted but was never considered a possible contributor to
the problem.
If NFS loses track of related nfs nodes or races operations on underlying
vnodes while expecting their storage to remain stable it is possible
for a random vnode to become corrupt. How this could translate to a
completely random seg-fault is not entirely understood but I surmise
the unrelated cc1's binary mmap could become corrupt.
Reported-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk> (nfs issue)
Samuel J. Greear [Sun, 28 Nov 2010 02:17:56 +0000 (02:17 +0000)]
kernel - Provide descriptions for vm.stats.* sysctl's
Submitted-by: Taras Klaskovsky
Sponsored-by: Google Code-In
Alex Hornung [Thu, 25 Nov 2010 11:38:22 +0000 (11:38 +0000)]
dmirror - Add Matt's design notes
Alex Hornung [Fri, 23 Jul 2010 19:54:11 +0000 (20:54 +0100)]
dmirror - initial code (layout)
* Initial code laying out basic functionality and design except for
resynchronization.
* NOTE: this code is faaaaaaaaaaaar away from being usable. It really is
only a layout.
* NOTE: did I mention that this code is far away from being usable and
still needs a lot of love? The only reason I'm committing this, is so
it doesn't linger forever on my personal repo.
* If anyone feels like it, *PLEASE* work on dmirror!!!!
Alex Hornung [Thu, 25 Nov 2010 10:33:24 +0000 (10:33 +0000)]
dm - Major cleanup & module work
* Add module code to all the targets and get rid of the hackish global
target insertion.
* Clean up all sorts of dead code and crappy whitespaces. There isn't
much point in maintaining whitespaces just to have a small diff to
NetBSD since our diff is quite big now anyways.
Alex Hornung [Thu, 25 Nov 2010 08:18:15 +0000 (08:18 +0000)]
mmap - add mmap offset randomization
* mmap offset randomization, based upon OpenBSD's implementation in
sys/uvm/uvm_map.c and sys/uvm/uvm_mmap.c.
* The randomization is controllable via the sysctl vm.randomize_mmap,
which by default is 0 (off).
Obtained-from: OpenBSD
Sascha Wildner [Thu, 25 Nov 2010 05:35:23 +0000 (06:35 +0100)]
tr(1): Add the -C option.
http://www.opengroup.org/onlinepubs/
9699919799/utilities/tr.html
-C complements the set of characters specified by the first argument,
while -c complements the set of byte values specified by the first
argument.
Taken-from: FreeBSD
Venkatesh Srinivas [Thu, 25 Nov 2010 02:12:22 +0000 (18:12 -0800)]
kernel - Honor MAP_WIREFUTURE flag in stack growth, mmap, and brk.
This should complete a working version of mlockall(MCL_FUTURE).
Venkatesh Srinivas [Wed, 24 Nov 2010 21:47:13 +0000 (13:47 -0800)]
kernel - Skeleton sys_mlockall.
Currently implements MCL_FUTURE but not MCL_CURRENT.
Ilya Dryomov [Wed, 24 Nov 2010 20:54:08 +0000 (22:54 +0200)]
hammer.8 - Avoid core dumping when running dedup
Avoid dumping core when a user runs dedup or dedup-simulate on a
meta-data only PFS (PFS which does not contain bulk data, just
softlinks, directory entries, etc). Instead print out a 0.00 dedup
ratio.
Reported-by: Sascha Wildner <saw@online.de>
Alex Hornung [Wed, 24 Nov 2010 19:55:04 +0000 (19:55 +0000)]
dm_target_crypt - use mpipe, add module magic
* Switch the kmallocs in the I/O path to using mpipe with a bare minimum
of two preallocated elements, for each read and write. This finally
allows for an encrypted swap without any issues with memory pressure.
It might also improve performance, but it is not the aim of the
commit.
* Add some module magic to dm and make use of it in dm_target_crypt.
* (temporarily) remove the old module magic.
Alex Hornung [Wed, 24 Nov 2010 19:53:52 +0000 (19:53 +0000)]
sysinit - add SI_SUB_DM_TARGETS
Alex Hornung [Wed, 24 Nov 2010 19:52:52 +0000 (19:52 +0000)]
dm - Fix a reference leak
* References to the newly created target would not be released on an
error, but they should. Otherwise dm_target_rem will never succeed if
an error occured here.
Venkatesh Srinivas [Wed, 24 Nov 2010 20:41:27 +0000 (12:41 -0800)]
Merge branch 'master' of /repository/git/dragonfly
Venkatesh Srinivas [Wed, 24 Nov 2010 20:40:40 +0000 (12:40 -0800)]
kernel - Export vm_map_transition_wait and correct race between sleep/wakeup.
Venkatesh Srinivas [Wed, 24 Nov 2010 20:25:07 +0000 (12:25 -0800)]
kernel - Implement munlockall.
Ilya Dryomov [Wed, 24 Nov 2010 19:26:27 +0000 (21:26 +0200)]
Test commit
Venkatesh Srinivas [Wed, 24 Nov 2010 19:15:58 +0000 (11:15 -0800)]
kernel - Add a flags field to the vm_map and a MAP_WIREFUTURE flag.
Alex Hornung [Wed, 24 Nov 2010 17:35:44 +0000 (17:35 +0000)]
libdm - clean libdm-dragonfly-iface
* Remove bogus whitespace.
* Remove dead code.
* Clean up a few comments.
* Remove prop_dictionary_externalize_to_file that were used for debug
purposes.
Alex Hornung [Wed, 24 Nov 2010 17:20:42 +0000 (17:20 +0000)]
newfs - add volume name support
Obtained-from: FreeBSD
Alex Hornung [Wed, 24 Nov 2010 17:20:03 +0000 (17:20 +0000)]
fsid - clear buffer before reading
Sascha Wildner [Wed, 24 Nov 2010 13:22:06 +0000 (14:22 +0100)]
Fix a couple of typos in messages & manpages.
Sascha Wildner [Tue, 23 Nov 2010 13:08:49 +0000 (14:08 +0100)]
arcmsr(4): Update to vendor release 1.20.00.19.
Bug fixes:
* Fixed "inquiry data fails comparion at DV1 step"
* Fixed bad range input in bus_alloc_resource for ADAPTER_TYPE_B
* Fixed arcmsr driver prevent arcsas support for Areca SAS HBA ARC13x0
Taken-from: FreeBSD
Sascha Wildner [Tue, 23 Nov 2010 11:41:36 +0000 (12:41 +0100)]
arcmsr(4): Fix up the device description a bit.
Sascha Wildner [Tue, 23 Nov 2010 09:33:41 +0000 (10:33 +0100)]
printf(1): Fix the printing of floats which I broke back in 2007.
I forgot braces in
f386bcf2683a4edef25828e3958ba5b087d702d2
Matthew Dillon [Tue, 23 Nov 2010 07:24:25 +0000 (23:24 -0800)]
kernel - Fix namecache memory exhaustion edge case
* The namecache has traditionally relied on vnode limits to avoid
blowing up its memory pool. However, creating millions of hardlinks
to the same vnode easily circumvents this assumption.
* Enhance the negative cache hysteresis code with a section for the
positive cache that does the same thing, preventing the namecache
from growing greater than 2x maxvnodes.
This situation will not occur under normal operation, it is strictly
for correctness. The kernel should never panic on normal filesystem
operations even if those operations are unrealistic.
* Tested w/HAMMER and a few million hardlinks to a single file.
Reported-by: Venkatesh Srinivas <me@acm.jhu.edu>
Matthew Dillon [Tue, 23 Nov 2010 02:25:33 +0000 (18:25 -0800)]
kernel - AHCI hotplug work to help support AMD chipsets
* Change the Hot-plug mechanics to something which appears to work for
both NVidia and AMD AHCI chipsets, and hopefully Intel too (untested).
This appears to fix hot-plug for AMD's SB850-based AHCI (circa AM3 socket
mobos).
* Basically the SCTL.DET and CMD.SUD bits control the behavior of the
SATA Phy, but in typical Intel fashion the specification is seriously
lacking on how events such as hot-plug are handled based on what state
the phy is in.
Previously we were looking for phy transition events while holding
the port in the RESET state (DET=1, SUD=1), which worked up till this
point. But it doesn't work with AMD's SB850-based AHCI.
Now we are attempting to do the same thing with the port in
the SPIN-UP/NORMAL state (DET=0, SUD=1).
* The AHCI documentation wants us to use the LISTEN mode (DET=0, SUD=0)
and get a SERR.DIAG.X event for hot-plug but this doesn't seem to work
very reliably. In fact, 10.10.4 is ambiguous for the case
where Staggered-spin-up is not supported since SUD is wired to '1'
in that case (making LISTEN mode impossible).
Matthew Dillon [Mon, 22 Nov 2010 23:34:56 +0000 (15:34 -0800)]
kernel - More AHCI work to help support broken AMD chipsets
This cleans up more of our AHCI support for AMD 880/890/SB850 chipsets.
This does NOT clean up hot-plug issues (fixing those might require actually
probing dead ports every few seconds).
* Better PCS/PRCS masking during low level reset sequences to prevent
the PCS/PRCS interrupt from poking ports while we are in a hard reset.
* Breakout the COMRESET sequence into its own procedure.
* Make sure SPM is disabled in addition to IPM when doing a hard reset
of a port. Also make sure that POD (Power Up Device) is set in
addition to SUD (Spin up Device) while we are in a hard reset.
* Wait one full second after aftering DET_INIT (sending COMINIT) before
testing the SSTS bits, to ensure the microcontroller has reinitialized
itself so we do not get bogus bits and to prevent bogus device detection
which some chipsets may have left unmasked.
This may also be needed in general when supporting SATA-III's longer
training times.
* Do not reinit the port after a PM probe fails as it could undo all of
the hard work we did initializing it.
* Reissue the COMRESET if a PM probe fails to ensure that any state left
over from the PM detection gets cleared and to deal with any devices
which brick when they receive a PM-related command.
Matthew Dillon [Mon, 22 Nov 2010 21:46:58 +0000 (13:46 -0800)]
kernel - Add APIC_IO conf option back in / make it adjust hw.apic_io_enable
* APIC_IO again controls whether a SMP kernel will use the io-apic or not.
All it does now is adjust the hw.apic_io_enable default value.
Changing the code to allow apic-io to be soft-selectable was great, but
removing the kernel config option was not so great.
* SMP Kernels compiled without APIC_IO again default to not using it. You
can use APIC_IO either by configuring the kernel with the option or
by setting hw.apic_io_enable=1 in /boot/loader.conf.
* SMP Kernels compiled with APIC_IO default to using APIC_IO.
* Reduces confusion between 2.8 and 2.9 kernel config files.
* Reduces personal frustrations.
Peter Avalos [Sun, 21 Nov 2010 06:25:10 +0000 (20:25 -1000)]
OpenSSL: Add pre-generated asm files to the build.
This causes measurable performance increases.
The Makefile in asm/ will generate the .s files from the vendor-provided
.pl files when a new version of OpenSSL is imported.
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1542>
Peter Avalos [Mon, 22 Nov 2010 11:11:26 +0000 (01:11 -1000)]
Merge branch 'vendor/OPENSSL' into HEAD
Peter Avalos [Sat, 20 Nov 2010 19:50:41 +0000 (09:50 -1000)]
OpenSSL: Reduce diffs to vendor source.
Peter Avalos [Sat, 20 Nov 2010 07:41:06 +0000 (21:41 -1000)]
Make OpenSSL thread-safe.
YONETANI Tomokazu [Mon, 22 Nov 2010 02:35:48 +0000 (11:35 +0900)]
tmpfs - fix chgrp(), or chown() when one of uid/gid is to be unchanged
uid/gid values from function arguments were being used instead of the ones
arranged by vop_helper_chown(), accidentally setting one of them to -1
(
4294967295) instead of leaving it unchanged.
Matthew Dillon [Sun, 21 Nov 2010 22:21:31 +0000 (14:21 -0800)]
debug - Add seekbench.c
* Add a little program which purposefully attempts to defeat OS and disk
caches to calculate seek latencies for different relative seek spans.
Well, this doesn't tell us anything we didn't know already, that being
that unless one can make accesses use of the HDs zone cache well anything
other than a linear read is going to have a fairly huge seek-time cost.
Dylan Reinhold [Sun, 21 Nov 2010 05:56:45 +0000 (21:56 -0800)]
Fortune: update hammer snapshot info
Sascha Wildner [Sun, 21 Nov 2010 13:23:02 +0000 (14:23 +0100)]
kbdmap(1): Fix a segmentation fault with -r.
Reported-by: Mikael Moghadam <binarybusiness@gmail.com>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1918>
Alex Hornung [Sun, 21 Nov 2010 10:03:39 +0000 (10:03 +0000)]
mount_devfs - don't unconditionally clear rules
* mount_devfs was unconditionally clearing all rules of a mountpoint
after mounting.
* According to the man page (and my original intentions, I'd presume),
mount_devfs should only clear the rules of a mountpoint if it was
already mounted. So fix mount_devfs accordingly.
Dragonfly-bug: http://bugs.dragonflybsd.org/issue1885
Alex Hornung [Sun, 21 Nov 2010 08:46:07 +0000 (08:46 +0000)]
kern_shutdown - sync_devs before looking for dumpdev
* We need to sync_devs before starting to look for dumpdev, otherwise it
might have happened that the probing of the disk hasn't finished yet.
Alex Hornung [Sun, 21 Nov 2010 08:44:02 +0000 (08:44 +0000)]
devfs - don't propagate on terminate, it's redundant
* Don't propagate the device removal in the cdev terminate op since it
must have happened before; otherwise something went horribly wrong.
* Verify that the cdev isn't linked into the dev list anymore upon
terminate. As explained in the commit, this *must* be the case.
Alex Hornung [Fri, 19 Nov 2010 19:00:52 +0000 (19:00 +0000)]
dloader - understand dumpdev
Alex Hornung [Fri, 19 Nov 2010 16:09:13 +0000 (16:09 +0000)]
devfs - Only check rules after inserting into topology
* Previously rules were checked in allocp before binding the node into
the topology. Since the rule checking itself needs the topology,
stuff(TM) didn't work properly.
* NOTE: this still doesn't fix the issue of rules not being applied
correctly on mount, but it's the first step towards that end.
Dragonfly-bug: http://bugs.dragonflybsd.org/issue1885
Peter Avalos [Sun, 21 Nov 2010 05:49:12 +0000 (19:49 -1000)]
Add files to OpenSSL that will generate optimized asm code.
Matthew Dillon [Sun, 21 Nov 2010 02:09:23 +0000 (18:09 -0800)]
build - Fix IP_DIVERT w/UP build error
Reported-by: Stephane Russell <srussell@prodigeinfo.com>
Sascha Wildner [Sat, 20 Nov 2010 14:58:34 +0000 (15:58 +0100)]
mlxcontrol(8): Sync with FreeBSD.
While here, raise WARNS to 6 and fix the warnings.
Alex Hornung [Fri, 19 Nov 2010 15:26:15 +0000 (15:26 +0000)]
vn - switch to using own malloc type
Alex Hornung [Fri, 19 Nov 2010 14:49:17 +0000 (14:49 +0000)]
devfs - Fix FREEBLKS
* Since vn and md were changed to use the disk subsystem they
essentially haven't been able to receive any BUF_CMD_FREEBLKS since
their D_CANFREE flag was not propagated through the disk subsystem.
* Fix this by making the flag specific to the device via SI_CANFREE and
propagating the D_CANFREE of even *underlying*/covered devices to the
top-level device's SI_CANFREE.
Alex Hornung [Fri, 19 Nov 2010 14:48:14 +0000 (14:48 +0000)]
kern_udev - fix the devtype property
* The devtype cannot be extracted from the si_flags in cdev, but only
from the ops flags.
Alex Hornung [Fri, 19 Nov 2010 09:18:18 +0000 (09:18 +0000)]
vn - Major overhaul
* Now that we can do proper disk cloning we do so. vn_create will now
return the top device of the disk (the one that belongs to the disk
subsystem and not us) if asked to do so. This is then passed back from
the clone handler so that we have a real cloned disk.
* Remove all sorts of old hacks, mostly related to finding vn's and
strange cdev lists that were not being used anymore anyways.
* Avoid the destruction/detachment of devices that are in use by keeping
track of whether they are open or not and checking the opencount
provided by the disk susbsystem.
* Fix a memory leak related to adding references to devs but never
releasing them.
Dragonfly-bug: http://bugs.dragonflybsd.org/issue1561 (partly)
Alex Hornung [Fri, 19 Nov 2010 14:31:26 +0000 (14:31 +0000)]
subr_disk - Keep an open count
Alex Hornung [Fri, 19 Nov 2010 09:15:30 +0000 (09:15 +0000)]
subr_disk - 'official' support for cloning; cleanup
* Add 'official' cloning support, so that the top level node is also
make_only_dev'd in the case of a cloned disk creation. This way
the top level node can be used as a return value for the clone
handler.
* Right now we are basically returning the raw underlying device node
when we clone in vn. This can now be changed to actually do things
properly so that everything passes through the disk subsystem.
* Clean up some dead code mostly related to the old understanding of
'cloning', which has nothing to do with what's going on nowadays.
* Fix a leak of cdevs. The underlying 'rawdev' was never being released,
resulting in a leak of these each time a disk was destroyed.
Alex Hornung [Fri, 19 Nov 2010 09:28:16 +0000 (09:28 +0000)]
kern_conf - add make_only_dev_covering
Alex Hornung [Fri, 19 Nov 2010 07:48:16 +0000 (07:48 +0000)]
libdm - Be a bit more verbose about ioctl issues
Reported-by: Sascha Wildner
Alex Hornung [Fri, 19 Nov 2010 07:01:11 +0000 (07:01 +0000)]
dm - Disallow active vol removal; ret err of ioctl cmd
* Disallow the removal of volumes that are currently in use (determined
by whether they are open or not).
* Return the error of the actual ioctl command that was executed and not
of some prop copyout.
Reported-by: Sascha Wildner
Sascha Wildner [Thu, 18 Nov 2010 18:24:00 +0000 (19:24 +0100)]
installer: Remove /dev/mapper/* mappings where necessary.
Matthew Dillon [Thu, 18 Nov 2010 17:20:23 +0000 (09:20 -0800)]
kernel - Fix global counter used in lockf assertions
* lockf elements can be accessed MP.
* This may fix the 'panic: assertion: lf_global_counter>=0 in lf_destroy_range'
panic.
Reported-by: Peter Avalos <peter@theshell.com>
Peter Avalos [Thu, 18 Nov 2010 05:57:01 +0000 (19:57 -1000)]
Update build for OpenSSL-1.0.0b import.
Peter Avalos [Thu, 18 Nov 2010 05:49:41 +0000 (19:49 -1000)]
Merge branch 'vendor/OPENSSL'
Peter Avalos [Thu, 18 Nov 2010 05:41:45 +0000 (19:41 -1000)]
Import OpenSSL-1.0.0b.
This primarily fixes CVE-2010-3864 and CVE-2010-2939.
Peter Avalos [Sun, 14 Nov 2010 20:32:22 +0000 (10:32 -1000)]
Remove unused file from OpenSSH source.
Peter Avalos [Sun, 14 Nov 2010 19:43:34 +0000 (09:43 -1000)]
libssh: Unset BROKEN_GLOB. Ours works fine.
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1891>
Thomas Nikolajsen [Wed, 17 Nov 2010 05:30:39 +0000 (06:30 +0100)]
Fix buildkernel (LINT)
Sascha Wildner [Tue, 16 Nov 2010 17:45:23 +0000 (18:45 +0100)]
libc: Remove unused bit of code in __ujtoa().
All values of val that are <= ULONG_MAX have been handed to __ultoa() previously
so we can safely assume that val is not < 10.
Unless, of course, we're dealing with an architecture where ULONG_MAX <= 8,
which we hope will _never_ happen. :-)
Sascha Wildner [Tue, 16 Nov 2010 17:33:22 +0000 (18:33 +0100)]
Remove hotplug(4) since hotplugd(8) uses udev/devattr now.
On-behalf-of: alexh
Alex Hornung [Tue, 16 Nov 2010 14:49:03 +0000 (14:49 +0000)]
udev_monitor(3) - Add new _property* macros
Alex Hornung [Thu, 4 Nov 2010 20:31:54 +0000 (20:31 +0000)]
dm - adjust use of minor numbers to new reality
* Allocate (theoretical) minor numbers using the devfs_clone_bitmap
facility instead of an ever-increasing int64.
* Set the actual minor of the dm-specific device information to the
minor returned by the disk subsystem.
* Undo some of the dkunit() uses as they only covered very specific use
cases.
Alex Hornung [Thu, 4 Nov 2010 20:28:54 +0000 (20:28 +0000)]
disk - Add device-mapper specific fallthroughs
* Fall through for psize and ioctl if the underlying device is a device
mapper volume and we aren't operating on a (real) slice or part.
* Enable the code hiding the compatibility slice s0.
Sascha Wildner [Mon, 15 Nov 2010 20:08:30 +0000 (21:08 +0100)]
Move net.wlan.force_swcrypto out of IEEE80211_DEBUG.
This fixes kernel builds that don't have IEEE80211_DEBUG in the config
(such as SOEKRIS).
Alex Hornung [Mon, 15 Nov 2010 17:57:19 +0000 (17:57 +0000)]
fsid - Add to tree but don't build
* Add 'fsid', a proof-of-concept for now that reads volume names from
hammer and ufs volumes (so far) and creates links to the devices with
fs volumes in a /dev directory.
Alex Hornung [Mon, 15 Nov 2010 17:54:52 +0000 (17:54 +0000)]
iostat - undo previous changes
* undo some previous changes that were not intended to be committed.
Alex Hornung [Mon, 15 Nov 2010 17:47:23 +0000 (17:47 +0000)]
hotplugd rc script - add udevd dependency
Alex Hornung [Mon, 15 Nov 2010 06:34:34 +0000 (06:34 +0000)]
udevd - Break startup into pre and post mount parts
* Add a SIGHUP handler to udevd that will recreate the socket and pid
files, flush the current device database and read out a new one.
* Break the udevd rc.d script into udevd_early, to be run before
mountcritlocal and a dependency of lvm, and udevd, which is the
regular rc.d script which can be run at any time and on init takes
over from udevd_early.
* Adjust lvm rc.d script to depend on udevd_early instead of udevd.
Suggested-by: Sascha Wildner
Alex Hornung [Mon, 15 Nov 2010 04:12:44 +0000 (04:12 +0000)]
subr_disk - Maintain uuid aliases for disk volumes
* Maintain part-by-uuid (partitions on slices) and slice-by-uuid
(GPT slices) aliases for the respective device nodes.
* This allows for access to a given partition or slice even after moving
it around on a disk.
Alex Hornung [Mon, 15 Nov 2010 04:10:30 +0000 (04:10 +0000)]
hotplugd - Switch to using udev/devattr
* Switch hotplugd from using the now removed hotplug devfs magic to
using the unified device dictionary magic provided by kern_udev via
devattr.
Alex Hornung [Mon, 15 Nov 2010 04:06:34 +0000 (04:06 +0000)]
devfs - Add a destroy_dev_alias, remove hotplug
* Move the wildCmp* functions into devfs_core and expose them to the
whole of devfs, but renamed as devfs_wildCmp*.
* Add a destroy_dev_alias functionality that will remove specific
aliases to a cdev that match a given wild string.
* Remove the whole hotplug magic since it was broken already for systems
with several devfs mount points (it would receive several attaches,
one for each mount point). It is also redundant now that udev/devattr
provides that functionality.
Alex Hornung [Mon, 15 Nov 2010 04:03:13 +0000 (04:03 +0000)]
ufs - Adjust the on-disk structure to FreeBSD's
* Adjust the superblock on-disk structure a bit to include a few things
like a volume name as FreeBSD does.
* NOTE: This introduces no functional changes but will allow to easily
extract volume names from volumes.
Obtained-from: FreeBSD
Alex Hornung [Mon, 15 Nov 2010 04:02:25 +0000 (04:02 +0000)]
kern_udev - Also add the device type to the dict
* By default also add the device type (D_DISK, ...) to the initial
device dictionary.
Alex Hornung [Mon, 15 Nov 2010 04:00:24 +0000 (04:00 +0000)]
udevd - Change filters to AND instead of OR processing
* Now all conditions in filters for monitor and enumerate have to be met
instead of only one.
* This seems to be the way linux does it and it is
pretty much the sensible way of doing it.
Alex Hornung [Mon, 15 Nov 2010 03:59:01 +0000 (03:59 +0000)]
proplib - Don't link unconditionally to libphtread
* There is no need to link unconditionally to libpthread, since it can
also work in single-thread applications using the libc stubs. That is
after all why we fixed some of them a few months ago.