kientzle [Sat, 7 Mar 2009 02:51:18 +0000 (02:51 +0000)]
Merge r585,r669 from libarchive.googlecode.com: If zlib is unavailable,
use external "gunzip" instead. With this in place, we can unconditionally
enable gzip read support.
kientzle [Sat, 7 Mar 2009 02:47:04 +0000 (02:47 +0000)]
Merge r550,584,587,609,647,674 from libarchive.googlecode.com:
Refactor the read_compression_program to add two new abilities:
* Public API: You can now include a signature string when you
register a program; the program will run only on input that
matches the signature string.
* Internal API: You can use the init() function to instantiate
an external program as part of a filter pipeline. This
can be used for graceful fallback (if zlib is unavailable, use
external gzip instead) and to use external programs with
bidders that are more sophisticated than a static signature check.
kientzle [Sat, 7 Mar 2009 02:24:32 +0000 (02:24 +0000)]
Merge r558,567,569,571,581,582,583,598 from libarchive.googlecode.com:
Support Joliet extensions. This currently ignores Rockridge extensions
if both exist on the same disk unless the '!joliet' option is provided.
e.g.: tar -xvf example.iso --options '!joliet'
Thanks to: Andreas Henriksson
kientzle [Sat, 7 Mar 2009 01:21:46 +0000 (01:21 +0000)]
Merge r714,r715 from libarchive.googlecode.com: Fix Debian bug #516577.
Don't crash if client does not provide a skip function. Extend one
of the test cases to use archive_read_open2() with only a read callback.
kientzle [Sat, 7 Mar 2009 00:25:33 +0000 (00:25 +0000)]
Merge r659 from libarchive.googlecode.com: Correctly report "none"
as the compression name when no other read filter bid. Add some
assertions to various tests to verify that read filters are properly
setting the textual name as well as the compression code.
sam [Fri, 6 Mar 2009 23:32:45 +0000 (23:32 +0000)]
Cleanup virtual device mapping some more:
o improves understandability by replacing numerous relative address
calculations with fixed addresses; everything should now match up
more easily with the vm layout shown at the top of the file
o move the expansion bus chip select regions to be contiguous with
the expansion bus configuration area; this is not exploited right
now but allows map consolidation in the future
o leave a gap between the expansion bus regions and the pci config
space in case we want to map more exp bus cs regions
lulf [Fri, 6 Mar 2009 20:17:16 +0000 (20:17 +0000)]
- Try to handle rcsfile write failures in the same way as cvsup, as they are not
necessarily fatal. If the file was incorrectly written, the checksum will
detect it and the file will be retransferred.
thompsa [Fri, 6 Mar 2009 17:04:47 +0000 (17:04 +0000)]
Ensure the cached rq pointer is still valid before waking up the address, the
zyd_cmd function may have timed out. It wouldnt cause a panic but could wakeup
someone.
kib [Fri, 6 Mar 2009 15:35:37 +0000 (15:35 +0000)]
Extract the no_poll() and vop_nopoll() code into the common routine
poll_no_poll().
Return a poll_no_poll() result from devfs_poll_f() when
filedescriptor does not reference the live cdev, instead of ENXIO.
rrs [Fri, 6 Mar 2009 11:03:52 +0000 (11:03 +0000)]
Fixes for window probes:
1) WP should never be marked unless flight size is 0
2) When recovering from wp if the peer ack's it we don't mark for retran
3) When recovering, we must assure a timer is still running.
kientzle [Fri, 6 Mar 2009 06:14:44 +0000 (06:14 +0000)]
Merge r668 from libarchive.googlecode.com: Style correction to the
'ar' reader: Don't redefine 'isdigit' and don't create a macro that's
only used once.
kientzle [Fri, 6 Mar 2009 05:58:56 +0000 (05:58 +0000)]
Merge r491,493,500,507,510,530,543 from libarchive.googlecode.com:
This implements the new generic options framework that provides a way
to override format- and compression-specific parameters.
kientzle [Fri, 6 Mar 2009 05:14:55 +0000 (05:14 +0000)]
Merge r505 from libarchive.googlecode.com: Fix %ju support. Simplify
the code here a bit by making the int formatting functions static to
archive_string_sprintf.c, which is the only place this has ever been
used.
kientzle [Fri, 6 Mar 2009 05:13:12 +0000 (05:13 +0000)]
Merge r457 from libarchive.googlecode.com: Stop appending strerror()
information to error strings. This caused a lot of unnecessary
duplication in error messages; in particular, there are a few cases
where error messages get copied from one archive object to another
and this would cause the strerror() info to get appended each time.
kientzle [Fri, 6 Mar 2009 04:50:39 +0000 (04:50 +0000)]
Merge r407,r508 from libarchive.googlecode.com: Correctly handle
Zip entries that are zero length but stored with deflate. This
is arguably a silly thing to do (deflating a zero-length file actually
makes it bigger) but apparently quite a few Zip writers do this.
This was broken in two places: archive_write_disk disliked being asked
to write data to zero-length files (even if the write was zero-length)
and zip_read_file_header tripped over itself when non-regular files
had compressed bodies.
kientzle [Fri, 6 Mar 2009 04:35:31 +0000 (04:35 +0000)]
Merge r399,401,402,405,415,430,440,452,453,458,506,533,536,538,544,590
from libarchive.googlecode.com: Add a new "archive_read_disk" API
that provides the important service of reading metadata from the
disk. In particular, this will make it possible to remove all
knowledge of extended attributes, ACLs, etc, from clients such
as bsdtar and bsdcpio.
Closely related, this API also provides pluggable uid->uname
and gid->gname lookup and caching services similar to
the uname->uid and gname->gid services provided by archive_write_disk.
Remember this is also required for correct ACL management.
kientzle [Thu, 5 Mar 2009 21:18:10 +0000 (21:18 +0000)]
Merge r390,r391,r392,r397 from libarchive.googlecode.com: Virtualize
"close" and "finish" across both read and write interfaces.
(Someday, "finish" should be renamed to "free" to better reflect
what it actually does...)
jhb [Thu, 5 Mar 2009 19:42:11 +0000 (19:42 +0000)]
A better fix for handling different FPU initial control words for different
ABIs:
- Store the FPU initial control word in the pcb for each thread.
- When first using the FPU, load the initial control word after restoring
the clean state if it is not the standard control word.
- Provide a correct control word for Linux/i386 binaries under
FreeBSD/amd64.
- Adjust the control word returned for fpugetregs()/npxgetregs() when a
thread hasn't used the FPU yet to reflect the real initial control
word for the current ABI.
- The Linux/i386 ABI for FreeBSD/i386 now properly sets the right control
word instead of trashing whatever the current state of the FPU is.
jhb [Thu, 5 Mar 2009 19:10:17 +0000 (19:10 +0000)]
Allow syscons to work on amd64 and i386 without any hints:
- Enable keyboard autodetection by default for ISA syscons attachments.
- If there are no syscons hints at all, assume there is a single sc0 device
anyway. The console probe will still fail unless a VGA adapter is found.
jhb [Thu, 5 Mar 2009 18:32:43 +0000 (18:32 +0000)]
Some cleanups to the i386 FPU support:
- Remove the control word parameter to npxinit(). It was always set
to __INITIAL_NPXCW__.
- Remove npx_cleanstate_ready as the cleanstate is always initalized
when it is used.
- Improve the handling of the case when the FPU isn't present. Now
the npx0 device no longer succeeds in its probe so all of npx_attach()
is skipped. Also, we allow this case with SMP (though that shouldn't
actually occur as all i386 systems that support SMP have FPUs) now.
SMP was only an issue back when we had an FPU emulator which was not
per-CPU.
- MFamd64: Clear some of the state in npx_cleanstate rather than leaving
it as garbage.
- MFamd64: When a user thread first uses the FPU, use npx_cleanstate for
the initial FPU state.
kientzle [Thu, 5 Mar 2009 18:30:50 +0000 (18:30 +0000)]
Merge r386,r395,r451 from libarchive.googlecode.com: On Windows, break
into the debugger on test setup failures (otherwise, the console window
just goes away and you can't see what went wrong). On all platforms,
clean up a stray buffer before exiting.
alc [Thu, 5 Mar 2009 18:11:26 +0000 (18:11 +0000)]
Make pmap_copy() more TLB friendly. Specifically, make it use the kernel's
direct map instead of the pmap's recursive mapping to access the lowest
level in the page table.
jhb [Thu, 5 Mar 2009 16:56:16 +0000 (16:56 +0000)]
A few cleanups to the FPU code on amd64:
- fpudna() always returned 1 since amd64 CPUs always have FPUs. Change
the function to return void and adjust the calling code in trap() to
assume the return 1 case is the only case.
- Remove fpu_cleanstate_ready as it is always true when it is tested.
Also, only initialize fpu_cleanstate when fpuinit() is called on the BSP.
jhb [Thu, 5 Mar 2009 16:43:33 +0000 (16:43 +0000)]
Add support for the single-port NetMos NM9835 serial adapter. The puc(4)
entry is a specific entry to override the generic NetMos entry so that
puc(4) will leave this device alone and let uart(4) claim it.
jhb [Thu, 5 Mar 2009 16:03:44 +0000 (16:03 +0000)]
At least one BIOS bogusly includes duplicate entries for I/O APICs. The
bogus entries have a starting IRQ that is invalid (> 255, so won't fit
into a PCI intline config register). It had the side effect of breaking
MSI by "claiming" several IRQs in the MSI range. Fix this by ignoring such
I/O APICs.
jhb [Thu, 5 Mar 2009 15:33:04 +0000 (15:33 +0000)]
Always read/write the full 64-bit value of 64-bit BARs. Specifically,
when determining the size of a BAR by writing all 1's to the BAR and
reading back the result, always operate on the full 64-bit size.
jhb [Thu, 5 Mar 2009 15:28:46 +0000 (15:28 +0000)]
Honor the prefetchable flag in memory BARs by setting the RF_PREFETCHABLE
flag when calling bus_alloc_resource() to allocate resources from a parent
PCI bridge. For PCI-PCI bridges this asks the bridge to satisfy the
request using the prefetchable memory range rather than the normal
memory range.
kib [Thu, 5 Mar 2009 11:45:42 +0000 (11:45 +0000)]
Systematically use vm_size_t to specify the size of the segment for VM KPI.
Do not overload the local variable size in kern_shmat() due to vm_size_t
change.
Fix style bug by adding explicit comparision with 0.
rodrigc [Thu, 5 Mar 2009 08:57:35 +0000 (08:57 +0000)]
Add a -o mountprog parameter to mount which explicitly allows
an alternative program to be used for mounting a file system.
Ideally, all file systems
should be converted to pass string arguments to nmount(), so that
/sbin/mount can handle them. However, certain file systems such as FUSE have
not done this, and want to have their own userland mount programs.
For example, to mount an NTFS file system with the FUSE NTFS driver:
mount -t ntfs -o mountprog=/usr/local/bin/ntfs-3g /dev/acd0 /mnt
kientzle [Thu, 5 Mar 2009 02:37:05 +0000 (02:37 +0000)]
Merge r551,r561 from libarchive.googlecode.com: Update gzip read filter
to fully take advantage of the new peek/consume I/O support.
In particular, this now properly handles concatenated gzip streams.
kientzle [Thu, 5 Mar 2009 02:19:42 +0000 (02:19 +0000)]
Merge r364, r378, r379, r393, and r539 from libarchive.googlecode.com:
This is the last phase of the "big decompression refactor" that
puts a lazy reblocking layer between each pair of read filters.
I've also changed the terminology for this area---the two kinds
of objects are now called "read filters" and "read filter bidders"---and
moved ownership of these objects to the archive_read core.
This greatly simplifies implementing new read filters, which
can now use peek/consume I/O semantics both for bidding (arbitrary
look-ahead!) and for reading streams (look-ahead simplifies handling
concatenated streams, for instance).
The first merge here is the overhaul proper; the remainder are small
fixes to correct errors in the initial implementation.
kientzle [Thu, 5 Mar 2009 00:42:50 +0000 (00:42 +0000)]
Merge r357 from libarchive.googlecode.com: bzip2 compression
support can always be enabled even if bzlib doesn't exist on
this platform; don't give up until we fail to open the file.
kientzle [Thu, 5 Mar 2009 00:35:21 +0000 (00:35 +0000)]
Merge r344 from libarchive.googlecode.com: __LA_INT64_T and __LA_SSIZE_T
are part of the public API and therefore need to be exposed. This is
ugly; I'd like to find a better solution for this.
kientzle [Thu, 5 Mar 2009 00:31:48 +0000 (00:31 +0000)]
Merge r341,r345,r346,347 from libarchive.googlecode.com: Style
fixes to test harness and a few extra guards to detect tests
that can't succeed on certain platforms.
jhb [Wed, 4 Mar 2009 21:04:52 +0000 (21:04 +0000)]
The recent PCI resource allocation fixes exposed a bug where the same
BAR could be allocated twice by different children of a vgapci0 device.
To fix this, change the vgapci0 device to track references on its associated
resources so that they are only allocated once from the parent PCI bus and
released when no children are using them. Previously this leaked a small
amount of KVA on at least some architectures.
rrs [Wed, 4 Mar 2009 20:54:42 +0000 (20:54 +0000)]
- PR-SCTP bug, where the CUM-ACK was not being updated
into the advance_peer_ack point so we would incorrectly
send a wrong value in the FWD-TSN
- PR-SCTP bug, where an PR packet is used for a window
probe which could incorrectly get the packet moved
back into the send_queue, which will cause major issues and
should not happen.
- Fix a trace to use the proper macro.
rnoland [Wed, 4 Mar 2009 18:23:48 +0000 (18:23 +0000)]
Extend the management of PCIM_CMD_INTxDIS.
We now explicitly enable INTx during bus_setup_intr() if it is needed.
Several of the ata drivers were managing this bit internally. This is
better handled in pci and it should work for all drivers now.
We also mask INTx during bus_teardown_intr() by setting this bit.
dchagin [Wed, 4 Mar 2009 12:14:33 +0000 (12:14 +0000)]
Add AT_PLATFORM, AT_HWCAP and AT_CLKTCK auxiliary vector entries which
are used by glibc. This silents the message "2.4+ kernel w/o ELF notes?"
from some programs at start, among them are top and pkill.
Do the assignment of the vector entries in elf_linux_fixup()
as it is done in glibc.
Fix some minor style issues.
Submitted by: Marcin Cieslak <saper at SYSTEM PL>
Approved by: kib (mentor)
MFC after: 1 week
bms [Wed, 4 Mar 2009 03:45:34 +0000 (03:45 +0000)]
In ip_output(), do not acquire the IN_MULTI_LOCK(),
and do not attempt to perform a group lookup.
This is a socket layer lock, and the bottom half of IP
really has no business taking it.
Use the value of the in_mcast_loop sysctl to determine
if we should loop back by default, in the absence of
any multicast socket options. Because the check on
group membership is now deferred to the input path,
an m_copym() is now required.
This should increase multicast send performance where the
source has not requested loopback, although this has not been
benchmarked or measured.
It is also a necessary change for IN_MULTI_LOCK to become
non-recursive, which is required in order to implement IGMPv3
in a thread-safe way.
bms [Wed, 4 Mar 2009 03:40:02 +0000 (03:40 +0000)]
Add sysctl net.inet.ip.mcast.loop. This controls whether or not
IPv4 multicast sends are looped back to senders by default
on a stack-wide basis, rather than relying on the socket option.
Note that the sysctl only applies to newly created multicast sockets.