Matthew Dillon [Fri, 16 Mar 2012 00:01:56 +0000 (17:01 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2
Sascha Wildner [Thu, 15 Mar 2012 18:30:22 +0000 (19:30 +0100)]
kernel: Add mps(4) to our GENERIC kernels.
Sepherosa Ziehau [Thu, 15 Mar 2012 10:22:20 +0000 (18:22 +0800)]
arp: Don't send gratuitous ARP for devices that are not ethernet typed
Reported-by: alexh@ and swildner@
Sepherosa Ziehau [Thu, 15 Mar 2012 09:49:58 +0000 (17:49 +0800)]
LINT64: Adjust comment about TCP_MD5SIG; we use TCP_SIGNATURE_ENABLE
Sepherosa Ziehau [Thu, 15 Mar 2012 09:48:05 +0000 (17:48 +0800)]
tcp/md5sig: Disallow enable/disable TCP MD5SIG after connect(2)/listen(2)
Sepherosa Ziehau [Thu, 15 Mar 2012 07:01:29 +0000 (15:01 +0800)]
tcp_input: Always call tcp_mss(), so snd_cwnd could be properly updated
Sascha Wildner [Wed, 14 Mar 2012 18:26:20 +0000 (19:26 +0100)]
ftpd(8): Remove OLD_SETPROCTITLE related dead code.
Sepherosa Ziehau [Wed, 14 Mar 2012 03:18:44 +0000 (11:18 +0800)]
ioapic: By default, disable I/O APIC if we are booting on a virtual machine
I/O APIC causes too much trouble on virtual machines; simply disable
I/O APIC for virtual machines by default.
You could always explicitly enable I/O APIC on virtual machines by
setting tunable hw.ioapic_enable to 1
Thank swildner@ for hint on virtual machine detection method.
Reported-by: many
Sepherosa Ziehau [Wed, 14 Mar 2012 03:18:00 +0000 (11:18 +0800)]
spacialreg: Add CPUID2_VMM according to AMD's CPUID specification
John Marino [Tue, 13 Mar 2012 22:30:14 +0000 (23:30 +0100)]
gcc44: Update version to gcc-4.4.7 RELEASE
The previous version of gcc was a pre-release snapshot of 4.4.7, dated
2011-10-25. This is the final release of gcc-4.4. The gcc-4.4 branch
has officially been closed by the gcc project.
Also cfgloop.c was added to modified files list as a result of Matt
Dillon's work-around for the AMD bug.
John Marino [Tue, 13 Mar 2012 23:06:56 +0000 (00:06 +0100)]
Merge branch 'vendor/GCC44'
John Marino [Tue, 13 Mar 2012 22:22:06 +0000 (23:22 +0100)]
Upgrade GCC from 4.4.7 snapshot 2011-10-25 to 4.4.7-RELEASE
Chris Turner [Tue, 13 Mar 2012 21:13:35 +0000 (21:13 +0000)]
pstat.8: add reference to the fstat(8) command.
Seems relavent, and kept me from discovering the handyness of fstat(8).
Aycan iRiCAN [Tue, 13 Mar 2012 20:48:27 +0000 (22:48 +0200)]
Merged thread-specific cleanup patch from FreeBSD.
See: http://lists.freebsd.org/pipermail/freebsd-threads/2009-June/004563.html
Sascha Wildner [Sun, 11 Mar 2012 18:05:08 +0000 (19:05 +0100)]
rc.conf.5: Fix the wlan setup example.
Submitted-by: Johannes Hofmann <johannes.hofmann@gmx.de>
Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/2330>
Sascha Wildner [Sun, 11 Mar 2012 12:50:29 +0000 (13:50 +0100)]
<sys/cdefs.h>: For C++, unhide our interfaces via __{BEGIN,END}_DECLS.
This follows up on a previous (pthread specific) commit by alexh
(
e7322b09faff75b1298e9bfe444633425d173536) that used a per-proto
macro. Revert this commit, too. In principle, we do it like NetBSD
now.
See http://gcc.gnu.org/wiki/Visibility in the GCC wiki for details
on the issue.
This solution was suggested by Martin Husemann in a thread about
xulrunner building issues:
http://mail-index.netbsd.org/tech-pkg/2012/03/11/msg008680.html
Reported-and-tested-by: marino and others
John Marino [Sun, 11 Mar 2012 00:45:39 +0000 (01:45 +0100)]
gcc44: Instruct linkers to create GNU hash tables
The real-time linker has just been taught how to use GNU hash tables
to speed up symbol lookup. However, the linkers only generate SysV
hashes by default, so the specs file is being altered to generate
both types of hashes for every shared library and dynamic executable
for a while. Maybe after a release or two we can consider only
generating the superior GNU hash, which will break forward compatibility
with older releases.
John Marino [Fri, 9 Mar 2012 07:40:34 +0000 (08:40 +0100)]
rtld: Support DT_GNU_HASH (startup performance increase)
This is another "First BSD to get" feature that Linux and Solaris
had years ago. Essentially DT_GNU_HASH is a GNU extension to the ELF
format that allows symbol searches much faster than the System V ABI
standard hash does. Both versions of our binutils have the capability
of generating GNU hashes alongside of (or instead of) the SysV hash.
The benefit comes at the real-time link stage when the rtld is
searching the libraries for symbols. For very large programs
written in languages such as c++ that tend to link in many libraries
with many symbols, the reduction in start-time can be dramatic.
According to benchmarks done by binutils team in 2006, more than 90% of
the symbol queries of OpenOffice Writer are rejected by the Bloom filter
before the string comparison takes place:
http://sources.redhat.com/ml/libc-alpha/2006-07/msg00034.html
Chris Turner [Sat, 10 Mar 2012 11:43:41 +0000 (11:43 +0000)]
Merge branch 'master' of git://git.dragonflybsd.org/dragonfly
Chris Turner [Sat, 10 Mar 2012 11:37:48 +0000 (11:37 +0000)]
pkill(1): add '-j jid' flag to restrict matches to jailed processes.
Add a '-j' option to pgrep(1)/pkill(1).
Update manual page to reflect usage.
As DragonFlyBSD did not have this option previously, the 'COMPATIBILITY'
notes outlined in FreeBSD's '-j' options do not apply - namely,
the '-j 0' option defaults to non-jailed processes, and '-1' is used
to indicate all jailed processes should be matched. Also, the 'any'/'none'
string options were not ported as they require more invasive changes.
Inspired-by: FreeBSD
Sascha Wildner [Sat, 10 Mar 2012 08:57:49 +0000 (09:57 +0100)]
Remove the old (and broken) kzip(8) utility.
Sascha Wildner [Sat, 10 Mar 2012 08:53:08 +0000 (09:53 +0100)]
kgzip(8) is i386 only, so stop building/installing on x86_64.
Sascha Wildner [Sat, 10 Mar 2012 08:27:36 +0000 (09:27 +0100)]
svc_vc_create(3): Initialize xprt with NULL.
In the (corner-)case of being out of memory, this prevents free() to be
called on an uninitialized xprt below the cleanup_svc_vc_create: label.
Chris Turner [Fri, 9 Mar 2012 21:31:19 +0000 (21:31 +0000)]
kernel: fixup accidental whitespace shift in vm_fault_copy_entry commit
was resulting in cherry-pick conflicts in MFC branch
Chris Turner [Fri, 9 Mar 2012 20:57:42 +0000 (20:57 +0000)]
kernel: reorganize new holds in vm_fault_copy_entry
Move holds outside of the pagecopy loop to reduce locking overhead.
Suggested-by: dillon
Chris Turner [Fri, 9 Mar 2012 20:34:46 +0000 (20:34 +0000)]
kernel: add missing holds/drops to vm_fault_copy_entry
Add missing holds/drops to vm_fault_copy_entry that were triggering
assertions in vm_page_alloc/vm_page_lookup when when a process
holding locked memory is forked.
Fixes: https://bugs.dragonflybsd.org/issues/2320
Reviewed-by: vsrinavas
X-Nahmean-Status: word
Sascha Wildner [Fri, 9 Mar 2012 17:29:51 +0000 (18:29 +0100)]
setnetpath(3): Fix a double free().
np_sessionp is free()'d after the failed: label.
Sascha Wildner [Fri, 9 Mar 2012 17:05:53 +0000 (18:05 +0100)]
Update the pciconf(8) database.
Feb 27, 2012 snapshot from http://pciids.sourceforge.net/
Sascha Wildner [Fri, 9 Mar 2012 10:57:17 +0000 (11:57 +0100)]
libalias(3): Bring in some fixes from FreeBSD.
It fixes the "dereferencing pointer 'sptr' does break strict-aliasing
rules" warnings which -O2 was generating.
Submitted-by: Aycan iRiCAN <iricanaycan@gmail.com>
Matthew Dillon [Fri, 9 Mar 2012 06:04:10 +0000 (22:04 -0800)]
HAMMER VFS: Conditionalize debug message
* Conditionalize an annoying debug kprintf on hammer_debug_inode.
John Marino [Thu, 8 Mar 2012 18:21:34 +0000 (19:21 +0100)]
rtld: fix debug statement
This bug showed only when rtld is built with -DENABLE_DEBUG.
Sascha Wildner [Wed, 7 Mar 2012 18:19:33 +0000 (19:19 +0100)]
kernel: Add a few forgotten crit_exit()s and fix a wrong crit_enter().
YONETANI Tomokazu [Wed, 7 Mar 2012 15:01:15 +0000 (00:01 +0900)]
Installer: one more place where inform() called without a format string
Noticed-by: swildner@
YONETANI Tomokazu [Wed, 7 Mar 2012 15:01:15 +0000 (00:01 +0900)]
Installer: fix a (possible) crash in show_ifconfig()
inform() expects a printf-like format string as the second argument,
so you should always supply one instead of a random string by itself.
DragonFly-bug: <http://bugs.dragonflybsd.org/issues/1596>
Sascha Wildner [Tue, 6 Mar 2012 19:13:55 +0000 (20:13 +0100)]
Add a coccinelle patch to find 0 (instead of NULL) used with pointers.
Sascha Wildner [Mon, 5 Mar 2012 21:05:24 +0000 (22:05 +0100)]
Sweep-fix comparing pointers with 0 (and assigning 0 to pointers).
For better readability, don't compare pointers with 0 or assign 0
to them. Use NULL instead.
The change was done with coccinelle.
Alex Hornung [Tue, 6 Mar 2012 00:32:08 +0000 (00:32 +0000)]
vfs_conf - remove old debug message tryroot()
Alex Hornung [Tue, 6 Mar 2012 00:30:11 +0000 (00:30 +0000)]
dump_conf - delay extra 2s before looking for dumpdev
* This is the same hack used for the root mount. Some disk devices will
not be probed by CAM's initial probes.
* We give these devices some extra time to settle and hopefully be
ready for when we look them up.
* This fixes the use of some CAM disk devices set via the loader dumpdev
variable.
Alex Hornung [Mon, 5 Mar 2012 21:52:44 +0000 (21:52 +0000)]
vfsops - add two new ops, ncpgen_set, ncpgen_test
* ncpgen_set takes care of setting the namecache generation in an ncp,
while ncpgen_test can force zapping a resolved negative cache hit.
* Make use of the functions in devfs to keep the functionality we had
before.
* Also pass the calls through in nullfs - this should fix a problem
with posix_openpt when /dev is a nullfs mount of devfs.
Reported-by: Markus Pfeiffer (profmakx)
Matthew Dillon [Mon, 5 Mar 2012 18:46:37 +0000 (10:46 -0800)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2
Sascha Wildner [Mon, 5 Mar 2012 12:47:22 +0000 (13:47 +0100)]
sin.3: Sort SEE ALSO alphabetically.
Sascha Wildner [Mon, 5 Mar 2012 10:49:27 +0000 (11:49 +0100)]
ncurses: Fix an almost 7 year old typo in the profiling libtinfo's name.
It was introduced in
c4c23d9061b6eb2a3456620a48b84583b00fe0ce.
Sascha Wildner [Mon, 5 Mar 2012 10:05:48 +0000 (11:05 +0100)]
gcc44: Remove a wrong define for the profiled math library's name.
This caused compiling with -pg to fail for C++:
zoot# c++ -pg -o t t.c
/usr/libexec/binutils222/elf/ld.bfd: cannot find -lm_p
Our libraries for profiling don't have different names than the normal
ones. They just are in a different directory (/usr/lib/profile), which
is already cared for.
Reported-by: Pierre Abbat <phma@phma.optus.nu>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2325>
Chris Turner [Sun, 4 Mar 2012 13:03:12 +0000 (13:03 +0000)]
Update 'rcrun' with a 'onestart' action to use the rc.subr 'one' functionality
For reference - the 'one' functionality differs from 'force'
as it still allows various rc.subr sanity checks to be run.
Suggested-by: swildner
Chris Turner [Sun, 4 Mar 2012 10:43:49 +0000 (10:43 +0000)]
Add 'one' behavior to rc.subr, update rc.subr.8 .
This permits configuring / running services without
requiring *_enable in rc.conf which is handy for non-automatic
services.
Obtained-from: NetBSD
Sascha Wildner [Sat, 3 Mar 2012 12:01:56 +0000 (13:01 +0100)]
Oops, it's kiconv and not kiconf.
Sascha Wildner [Sat, 3 Mar 2012 11:59:24 +0000 (12:59 +0100)]
Fix a number of incomplete/missing DPADDs.
Sascha Wildner [Sat, 3 Mar 2012 11:15:25 +0000 (12:15 +0100)]
vi(1): Remove some old tk stuff from the Makefile.
Sascha Wildner [Fri, 2 Mar 2012 12:42:33 +0000 (13:42 +0100)]
smp.4: Use .Dv for a tunable.
Sascha Wildner [Fri, 2 Mar 2012 09:25:53 +0000 (10:25 +0100)]
Sync zoneinfo database with tzdata2012b from munnari.oz.au
northamerica: 8.52 -> 8.53
* northamerica: Summer time in Cuba has been delayed 3 weeks (now
starts April 1 rather than March 11). Since Mar 11 (the old
start date, as listed in 2012a) is just a little over a week
away, this change is urgent.
Also bump zone.tab's version for a fix that was not in 2012a but
which I already added.
Sascha Wildner [Fri, 2 Mar 2012 09:15:56 +0000 (10:15 +0100)]
rtld: Add a special case in do_dlsym() for TLS stored symbols.
Submitted-by: Markus Pfeiffer <markus.pfeiffer@morphism.de>
Sascha Wildner [Thu, 1 Mar 2012 14:41:05 +0000 (15:41 +0100)]
Sync zoneinfo database with tzdata2012a from munnari.oz.au
antarctica: 8.9 -> 8.10
asia: 8.69 -> 8.70
australasia: 8.29 -> 8.30
europe: 8.40 -> 8.41
leapseconds: 8.11 -> 8.13
northamerica: 8.51 -> 8.52
README: 8.3 -> 8.4
southamerica: 8.52 -> 8.53
zone.tab: 8.52 -> 8.54
* antarctica: Current best known timezone info for various Antarctic
bases for the winter of 2012.
* asia: Armenia has abolished summer time.
* australasia: Tokelau copied Samoa and swapped sides of the
International Date Line last December (affects current timestams).
* europe: Updated URL for UK timezone history.
* leapseconds: Bulletin C43 incorporated (a leap Second will occur
2012-06-30 at 23:59:60 UTC). Bulletin C42 was also incorporated
(but never released) - it said nothing very interesting (no leap
second 2011-12-31).
* northamerica: New zone America/Creston created for an area in
British Columbia that was previously (and apparently incorrectly)
considered identical to Dawson Creek. Also, some corrections to
1918 summer time end dates in several Canadian zones.
* README: Updated to reflect the current home of the mailing list and
files.
* southamerica: Chile has extended Summer time in the 2011/2 summer.
Future years (2013->) are assumed revert to "normal" for now. The
Falkland Islands now have it permanently (continuing the 2011
experiment). This "permanently" is a guess, it apparently is
certain for 2012 (as certain as these things ever are) and
considered likely into the future.
* zone.tab: New America/Creston zone added, and a typo in the entry
for Europe/Samara corrected.
Alex Hornung [Wed, 29 Feb 2012 19:53:07 +0000 (19:53 +0000)]
scsi_cd - don't lock tray on cdcheckmedia()
* Move the tray locking explicitly to cdopen(), so that it matches the
unlocking in cdclose().
* Before disk probing existed this wasn't a problem as every device was
first opened, then operated on, then closed.
* The disk probing code operates directly on the device, which caused
it to be locked via cdcheckmedia() but never unlocked since no
close() was ever called.
Reported-by: Sascha Wildner <swildner@>
Alex Hornung [Wed, 29 Feb 2012 15:46:48 +0000 (15:46 +0000)]
boot/loader - test if CPU supports long mode
* Test if the CPU supports long mode (64 bits) before trying to load an
x86_64 kernel.
Obtained-from: FreeBSD
Dragonfly-bug: http://bugs.dragonflybsd.org/issue1624
Sascha Wildner [Wed, 29 Feb 2012 14:13:23 +0000 (15:13 +0100)]
bsd-family-tree: Sync with FreeBSD.
Matthew Dillon [Wed, 29 Feb 2012 08:53:55 +0000 (00:53 -0800)]
hammer2 - Rework the flusher
* Rework the flusher to remove numerous degenerate cases which caused
excessive re-flushing of the same block(s).
* No longer flushes the volume header on sync if the filesystem is not dirty.
* General code cleanup.
* Beginning of a work-up to implement variable logical block sizes for file
data. Physical blocks will always be 64K but logical blocks and block
allocations can be any multiple of 1K.
Currently any file > 512 bytes allocates a 64K file block, which is
horribly space inefficient. This will be fixed soon.
Matthew Dillon [Wed, 29 Feb 2012 04:53:26 +0000 (20:53 -0800)]
hammer2 - Correct memory leak, skeleton for vop_nlink
* Correct a memory leak related to dangling inodes that were deleted but
also marked modified. The modified status prevented the inode from being
destroyed even on umount.
* Create a skeleton helper for hammer2_vop_nlink (hardlink creation).
(non functional).
Matthew Dillon [Wed, 29 Feb 2012 02:43:15 +0000 (18:43 -0800)]
hammer2 - Implement rename
* Implement hammer2_vop_nrename().
Matthew Dillon [Tue, 28 Feb 2012 23:38:49 +0000 (15:38 -0800)]
hammer2 - Implement nsymlink, readlink, remove, and rmdir
* Implement nsymlink and readlink. Currently requires VMIO because core
file r/w procedures are used to read and write the symlink target.
The symlink target will use inode-embedded data for targets with a
string length <= 512 bytes.
* Move a number of functions embedded in VOPs to their own separate
procedures so they can be called from multiple VOPs. So far: read,
write, and remove. Truncate and extend already had their own
helper procedures.
* Implement rm and rmdir. Currently does not optimize the presence of a
cached vnode (to get to the ip->chain), but the directory lookup is
cheap so it might not matter.
Implement two interesting optmiizations.
First, free block handling is not done in the active path. Since we
never know what snapshots might be pointing deep into our directory
hierarchy there's no point. This means that a removal only needs to
modify the parent chain element pointing to the item. The item itself
DOES NOT NEED TO BE MODIFIED IN ANY WAY, even if it is representitive
of a deep hierarchy (such as if it is a large file).
Second, recursive removals ala 'rm -rf' can proactive CLEAR the modified
bit on directory elements being removed that were previously marked
modified due to removals made from within those elements.
Together this can reduce the amount of write I/O required to remove a
directory hierarchy OF ANY SIZE, even terrabytes, to near zero.
* Hardlinks not yet handled but for the hardlink case the directory entry
itself will be a dummy and thus can be removed without modification. The
related 'real' inode, when we implement hardlinks, will be in some
parent directory and it will be marked modified. However, if a rm -rf is
able to traverse upward through that parent then even the real hardlink
inode will be re-marked as unmodified and virtually no write I/O will
result.
Matthew Dillon [Tue, 28 Feb 2012 23:38:38 +0000 (15:38 -0800)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2
Sascha Wildner [Tue, 28 Feb 2012 22:44:29 +0000 (23:44 +0100)]
libthread_xu/libc_r: Improve the check for EINVAL in sem_* functions.
Before referencing *sem->... in the check, do not just test if sem is
NULL but also if *sem is NULL.
Reported-by: Max Herrgard <herrgard@gmail.com>
Matthew Dillon [Tue, 28 Feb 2012 22:14:44 +0000 (14:14 -0800)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2
Sepherosa Ziehau [Tue, 28 Feb 2012 12:57:57 +0000 (20:57 +0800)]
arp: Don't send gratuitous ARP in arp_ifinit
- Move the CARP's ifaddr_event handler to the first of the
registered ifaddr_event handlers.
- Register ifaddr_event handler for gratuituous ARP; it won't
send gratuitous ARP for CARP interface or CARP interface's
parent. The event handler is registered as the last
ifaddr_event handler, so it is called after CARP's ifaddr_event
handler. It is mainly used to fix following problem before
this commit:
ifconfig emx0 up
ifconfig carp0 create
ifconfig carp0 vhid 1
ifconfig carp0 inet 192.168.3.2
ifconfig emx0 inet 192.168.3.2
Originally, you always saw gratuitous ARP from emx0 first,
then gratuitous ARP from carp0, which is quite confusing.
After this change, only gratuitous ARP from carp0.
- arp_ifinit() now only set ifa_rtrequest and CLONING flags
- Rename arp_iainit() to arp_gratuitous(); call it when CARP
wants to send gratuitous ARP and when link layer address
is changed.
Sascha Wildner [Tue, 28 Feb 2012 10:49:35 +0000 (11:49 +0100)]
kernel: Remove opt_ipfw.h from a few files which don't need it.
Sascha Wildner [Tue, 28 Feb 2012 10:41:21 +0000 (11:41 +0100)]
kernel: Remove the IPFIREWALL_FORWARD option which does nothing.
In FreeBSD it is needed for ipfw's 'forward' action. In DragonFly,
this needs no special option.
In-discussion-with: sephe
Matthew Dillon [Tue, 28 Feb 2012 09:58:05 +0000 (01:58 -0800)]
hammer2 - file truncate and extend
* Implement file truncation and extension. Remember that all partial block
modifications (during truncation) have to roll a new block, so we use
the chain_modify and related functions to handle it.
* Implement inode-embedded direct data (up to 512 bytes)
* Add support for the embedded feature in the chain_lookup/chain_next
code and also fix a couple of bugs.
* Implement deletion flagging for chain structures (used for truncation and
will eventually be used for unlink).
* Initial implementation of setattr (for truncation support).
Matthew Dillon [Tue, 28 Feb 2012 05:22:53 +0000 (21:22 -0800)]
hammer2 - more indirect block work, add advlock
* Fix several bugs in the indirect block code. Directories and files should
both now be able to expand properly. Except for an excessive dirty buffer
buildup (see 'bawrite' below), we can now create regular files linearly
and create sub-directory trees. e.g. cpdup is starting to show results.
* Fix an issue with readdir related to how ranged searches work (results
can be returned in any order within the range). Do a direct lookup of
the key before resorting to a range. Until we sort the keys this is not
going to work correctly in the face of concurrent deletions.
* Try conditionalizing bawrite() vs bdwrite() in the flush code, but there
are still major issues when NFS is used to back a VN device for testing
which can deadlock the system.
* Remove or conditionalize a bunch of debugging kprintfs.
Matthew Dillon [Mon, 27 Feb 2012 23:31:37 +0000 (15:31 -0800)]
hammer2 - More indirect block work & test script work
* Correct strategy read and bmap offset calculations to allow for arbitrary
differences between logical and physical block sizes. This fixes data
read-back issues past the first 16K of data.
* Correct a panic related to the use of an unlocked chain in the lookup
code when indirect blocks have to be recursed through.
* Add vop_getpages/vop_putpages -> stdgetpages/stdputpages.
* Minor reordering for correctness.
* Adjust test scripts to be a bit smarter, adjust debugging kprintf()s
Matthew Dillon [Mon, 27 Feb 2012 23:31:14 +0000 (15:31 -0800)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2
Alex Hornung [Mon, 27 Feb 2012 21:56:41 +0000 (21:56 +0000)]
vn - use DSO_RAWPSIZE flag
* Use the DSO_RAWPSIZE flag so that the disk subsystem uses vn's own
psize when the top level fails.
* This allows the use of vn disks as swap.
Reported-by: Antonio Huete (tuxillo@)
Alex Hornung [Mon, 27 Feb 2012 21:54:09 +0000 (21:54 +0000)]
disk - add flag to use underlying psize
* If the top (disk subsystem) psize fails, try again with the
underlying raw device psize if the DSO_RAWPSIZE flag is set for the
disk.
* This allows for disk devices and slices without a proper disklabel to
return a correct psize, which in turn allows the device to be used
for swap.
* Previously that behaviour was integrated with the DSO_DEVICEMAPPER
flag.
Matthew Dillon [Mon, 27 Feb 2012 21:56:04 +0000 (13:56 -0800)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2
Sascha Wildner [Mon, 27 Feb 2012 19:52:26 +0000 (20:52 +0100)]
uguru(4): Fix a panic when detaching (e.g., on kldunload).
Reported-by: Max Herrgard <herrgard@gmail.com>
Matthew Dillon [Mon, 27 Feb 2012 19:29:49 +0000 (11:29 -0800)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2
Alex Hornung [Mon, 27 Feb 2012 16:47:56 +0000 (16:47 +0000)]
vnconfig - use correct device if using autoclone
* if autoclone device (/dev/vn) is used in vnconfig, the wrong device
is later passed to, e.g., swapon().
* Fix it by changing the device name the rest of vnconfig
operates on to the actual device name as per fdevname.
Reported-by: tuxillo
Alex Hornung [Mon, 27 Feb 2012 12:53:38 +0000 (12:53 +0000)]
subr_disk - clear out old labels
* Whenever a label is blown out and we reprobe, make sure we also clean
the in-memory disklabel inside the diskslice - otherwise dscheck()
will think that there's still an old disklabel around.
* This fixes changing the disklabel from disklabel64 to disklabel32 and
vice versa without rebooting.
Dragonfly-bug: http://bugs.dragonflybsd.org/issue1667
Reported-by: Thomas Nikolajsen
Alex Hornung [Mon, 27 Feb 2012 12:52:08 +0000 (12:52 +0000)]
disklabel - add new freedisklabel op
* The freedisklabel op is simply used to free the disklabel stored in a
disklabel_t (in a diskslice).
* It deallocates the memory and sets the pointer to NULL.
Sascha Wildner [Sun, 26 Feb 2012 16:49:48 +0000 (17:49 +0100)]
kernel: Regenerate pcidevs.h and pcidevs_data.h.
Sascha Wildner [Sun, 26 Feb 2012 16:49:12 +0000 (17:49 +0100)]
kernel/pcidevs: Shrink it down to what we actually need from it.
Sascha Wildner [Sun, 26 Feb 2012 15:14:08 +0000 (16:14 +0100)]
kernel: Move a de(4) specific header file where it belongs.
Sepherosa Ziehau [Sun, 26 Feb 2012 14:02:27 +0000 (22:02 +0800)]
netif: Use ether_ioctl() to handle SIOCSIFADDR
DragonFly's SIOCSIFADDR handling in ether_ioctl() already has unnecessary
if_init avoidance processing; no need to reinvent the wheel
Sepherosa Ziehau [Sun, 26 Feb 2012 13:53:53 +0000 (21:53 +0800)]
e1000: Remove em specific files, which are not and will not be used
Sascha Wildner [Sun, 26 Feb 2012 13:39:01 +0000 (14:39 +0100)]
kernel/pci: Fix indent.
Sascha Wildner [Sun, 26 Feb 2012 13:27:45 +0000 (14:27 +0100)]
kernel/pci: Fix the securelevel check in pci_open() for write access.
While here, clean up some unused code and definitions.
Sascha Wildner [Sat, 25 Feb 2012 23:11:51 +0000 (00:11 +0100)]
dm_target_crypt.4: Remove trailing whitespace.
Alex Hornung [Sat, 25 Feb 2012 19:27:41 +0000 (19:27 +0000)]
puffs - fix possible null pointer dereference
Found-by: clang static analyzer
Sascha Wildner [Sat, 25 Feb 2012 19:08:02 +0000 (20:08 +0100)]
puffs: Install some headers and remove now unnecessary -I's in Makefiles.
Sascha Wildner [Sat, 25 Feb 2012 14:14:46 +0000 (15:14 +0100)]
kernel/i386: Remove the empty CPU_HAS_FXSR kernel option.
Sepherosa Ziehau [Sat, 25 Feb 2012 12:31:26 +0000 (20:31 +0800)]
vlan: Add comment about how MPSAFE works out for vlan
Sepherosa Ziehau [Sat, 25 Feb 2012 11:08:33 +0000 (19:08 +0800)]
vlan: Fix the incorrect logic
It should speak that parent interface is gone or parent interface
was changed.
Alex Hornung [Sat, 25 Feb 2012 08:48:58 +0000 (08:48 +0000)]
rdrand.4 - add warning about being untested
Alex Hornung [Sat, 25 Feb 2012 08:32:59 +0000 (08:32 +0000)]
rdrand.4 - add man page
Alex Hornung [Sat, 25 Feb 2012 08:23:43 +0000 (08:23 +0000)]
LINT{,64} - add rdrand
Alex Hornung [Sat, 25 Feb 2012 08:21:48 +0000 (08:21 +0000)]
rdrand - An RNG driver for the RdRand insn
* The driver is as of yet untested as the hardware is not yet
available!
John Marino [Fri, 24 Feb 2012 17:50:25 +0000 (18:50 +0100)]
build: Add WORLD_LDVER (similar to WORLD_CCVER)
This enables building world and kernel with the gold linker, and the
result is finally fully bootable and functional.
John Marino [Fri, 24 Feb 2012 17:43:56 +0000 (18:43 +0100)]
objformat: Recognize LDVER instead of LINKERVER
An informal discussion on IRC revealed that the environment variable
LDVER is preferred over LINKERVER to select the gold linker.
John Marino [Fri, 24 Feb 2012 23:38:03 +0000 (00:38 +0100)]
boot2: Add linker scripts for gold v2.22
The precursors for boot2 and boot2_64 also require linker scripts
when built with gold. The boot2 program was tested using disklabel
for both linkers after introducing the attached linker script.
John Marino [Fri, 24 Feb 2012 17:33:50 +0000 (18:33 +0100)]
loader: Add linker scripts for gold v2.22
The program header handling defaults for the gold linker that comes with
binutils 2.22 changed from the 2.21 version. As a result, DragonFly's
loader broke when linked with gold, rendering it unbootable.
The solution is to provide dedicated linker scripts for btx, btxldr, and
the loader itself. These scripts specify how to handle the program
headers. In these cases, we don't want to embed the headers in the first
LOAD segment which is what gold was doing, so the PDHRS section of the
scripts prevents that from happening.
The gnu ld-built loader still builds just fine with these linker scripts.
John Marino [Fri, 24 Feb 2012 17:23:39 +0000 (18:23 +0100)]
loader: use _end symbol instead of end
A long time ago, the "_end" symbol replaced the "end" symbol. The "end"
symbol was never present on the x86_64 DragonFly platform, but it was
erroneously carried inside the i386 libc for a few years (removed with
commit
8f73bea34efe21334e560a312017af168f3d1991).
The main.c file of the loader has been carrying the old version of the
symbol, but this was masked with the standard linker script which defined
"end: as an alias of "_end" and put both symbols in the binary.
This is the only instance of "end" found in the DragonFly code base, and
now it is gone.
Alex Hornung [Fri, 24 Feb 2012 12:24:56 +0000 (12:24 +0000)]
identcpu - add bits about RdRand (RDRND)