Peter Avalos [Sat, 16 Apr 2011 21:51:32 +0000 (11:51 -1000)]
Sh: Add test for getting length of string in double-quotes.
Peter Avalos [Sat, 16 Apr 2011 21:48:06 +0000 (11:48 -1000)]
sh: Add test for obscure and ambiguous ${#?}.
Obtained-from: FreeBSD
Peter Avalos [Sat, 16 Apr 2011 21:46:25 +0000 (11:46 -1000)]
sh: Add test for expanding of quoted positional parameters in case.
Peter Avalos [Sat, 16 Apr 2011 21:40:50 +0000 (11:40 -1000)]
sh: Add some tests for ${#parameter}.
Obtained-from: FreeBSD
Peter Avalos [Sat, 16 Apr 2011 21:36:09 +0000 (11:36 -1000)]
sh: Add some tests for omitting whitespace.
Obtained-from: FreeBSD
Peter Avalos [Sat, 16 Apr 2011 21:33:04 +0000 (11:33 -1000)]
sh: Split off some special behavior into separate regress tests.
Obtained-from: FreeBSD
Peter Avalos [Sat, 16 Apr 2011 21:21:02 +0000 (11:21 -1000)]
sh(1): Describe subshell environment, command substitution better
POSIX does not require the shell to fork for a subshell environment, and
we use that possibility in various ways (command substitutions with a
single command and most subshells that are the final command of a shell
process). Therefore do not tie subshells to forking in the man page.
Also, fix some sentences with excessive semicolons.
Obtained-from: FreeBSD
Peter Avalos [Sat, 16 Apr 2011 21:17:03 +0000 (11:17 -1000)]
sh: Fix some parameter expansion variants ${#...}.
These already worked: $# ${#} ${##} ${#-} ${#?}
These now work as well: ${#+word} ${#-word} ${##word} ${#%word}
There is an ambiguity in the standard with ${#?}: it could be the length of
$? or it could be $# giving an error in the (impossible) case that it is not
set. We continue to use the former interpretation as it seems more useful.
Obtained-from: FreeBSD
Peter Avalos [Sat, 16 Apr 2011 21:10:07 +0000 (11:10 -1000)]
sh: Reduce diffs to FreeBSD in the arith code.
Obtained-from: FreeBSD
Sascha Wildner [Sat, 16 Apr 2011 20:29:19 +0000 (22:29 +0200)]
ctags(1): Raise WARNS to 6 and fix warnings.
Sascha Wildner [Sat, 16 Apr 2011 20:22:24 +0000 (22:22 +0200)]
talk(1): Raise WARNS to 6 and fix warnings.
Sascha Wildner [Sat, 16 Apr 2011 20:22:08 +0000 (22:22 +0200)]
usbhidctl(1): Raise WARNS to 6 and fix warnings.
Sepherosa Ziehau [Sat, 16 Apr 2011 16:58:34 +0000 (00:58 +0800)]
acpi/ec: Bring in more GPE fixes from FreeBSD head (acpi_ec.c r216965)
Sepherosa Ziehau [Sat, 16 Apr 2011 15:12:05 +0000 (23:12 +0800)]
acpi: Sync ec with FreeBSD 8
Sascha Wildner [Sat, 16 Apr 2011 08:54:07 +0000 (10:54 +0200)]
mount/umount: Small whitespace fix in the usage().
YONETANI Tomokazu [Sat, 16 Apr 2011 08:02:49 +0000 (17:02 +0900)]
mount, umount: Implement the '-F' option to specify an alternate fstab file.
This also fixes jail_${jail}_fstab option in /etc/rc.d/jail .
Taken-from: FreeBSD (r113220 by mdodd@freebsd.org)
Matthew Dillon [Fri, 15 Apr 2011 17:58:32 +0000 (10:58 -0700)]
kernel - Fix apparent timing race in early usb keyboard polling code
* Fix an apparent timing race where a USB command does not complete
prior to the poll issued with the command. Perform another poll
in a loop to deal with it.
* Problem appears to occur w/ohci's early poll prior to ehci attachment.
Reported-by: Antonio Huete Jimenez <ahuete.devel@gmail.com>
Sascha Wildner [Fri, 15 Apr 2011 15:39:40 +0000 (17:39 +0200)]
asf(8): Fix module path.
Matthew Dillon [Fri, 15 Apr 2011 15:32:56 +0000 (08:32 -0700)]
kernel - Fix hold race and catch bad vm_object terminations
* vm_object_hold_wait() currently also needs the vm_token to safely
test rb_memq.
* Add code to complain if a VM object's rb_memq is not empty when
the object is being terminated.
Matthew Dillon [Fri, 15 Apr 2011 15:31:12 +0000 (08:31 -0700)]
kernel - MFC an IPSEC security fix related to nested compressed frames
* MFC an IPSEC security fix realted to nested compresesd frames
* Note that this code path is disabled and non-working in DFly anyway,
at least atm.
Taken-from: FreeBSD
Matthew Dillon [Fri, 15 Apr 2011 15:29:55 +0000 (08:29 -0700)]
vkernel64 - Start work on kld support
* This is a non-working commit but it progresses the issue a bit.
Matthew Dillon [Fri, 15 Apr 2011 15:27:19 +0000 (08:27 -0700)]
kernel - remove extra tsleep_interlock() calo
* Remove an extra tsleep_interlock() call that slipped into the
tsleep() code.
Matthew Dillon [Fri, 15 Apr 2011 15:24:55 +0000 (08:24 -0700)]
kernel - Change ccb state with lock held
* When putting a CCB back into the ap_ccb_free list do not
change the state until after ap_ccb_lock has been acquired.
Matthew Dillon [Fri, 15 Apr 2011 15:20:44 +0000 (08:20 -0700)]
nrelease - Add targets to Makefile.usr
* Add src-create-repo and pkgsrc-create-repo targets, which create
only the repo and do not attempt to checkout the source.
* Add pkgsrc-2011Q1 to the list of branches.
Matthew Dillon [Fri, 15 Apr 2011 15:19:37 +0000 (08:19 -0700)]
tests - Adjustments to memcpy/memzero test
* Remove assembly from these tests so they compile on x86-64.
* Clean up some timing reporting issues.
Matthew Dillon [Fri, 15 Apr 2011 15:16:46 +0000 (08:16 -0700)]
nrelease - Adjust source inclusion, cleanups
* When including sources only include the git repo, do not also include
the broken-out source.
* Add more slop to the size calculation for the usb image
* tmpfs entries in /etc/fstab should specify 'dummy' as the device,
not 'tmpfs'.
* Add /usr/obj as a tmpfs mount.
* misc cleanups.
Sascha Wildner [Fri, 15 Apr 2011 13:45:56 +0000 (15:45 +0200)]
sppp(4): Fix two x86_64 warnings.
Submitted-by: Edward O'Callaghan <eocallaghan@auroraux.org>
Sascha Wildner [Fri, 15 Apr 2011 12:40:46 +0000 (14:40 +0200)]
More fixes for snapshot building.
Sascha Wildner [Fri, 15 Apr 2011 12:31:05 +0000 (14:31 +0200)]
pf(4): Fix two x86_64 warnings.
Submitted-by: Edward O'Callaghan <eocallaghan@auroraux.org>
Sascha Wildner [Fri, 15 Apr 2011 09:11:24 +0000 (11:11 +0200)]
Fix snapshot building, part 2.
Sascha Wildner [Fri, 15 Apr 2011 08:31:27 +0000 (10:31 +0200)]
keylogout(1): Fix a warning and raise WARNS to 6.
Joe Talbott [Fri, 15 Apr 2011 01:28:28 +0000 (21:28 -0400)]
Merge branch 'master' of git://crater.dragonflybsd.org/dragonfly
Joe Talbott [Fri, 15 Apr 2011 01:25:22 +0000 (21:25 -0400)]
loader.conf.5 - Add note about 'boot_verbose'.
* Since this option is helpful with debugging I consider it useful
enough to be in the man page.
Sepherosa Ziehau [Thu, 14 Apr 2011 12:09:08 +0000 (20:09 +0800)]
acpi: Partly revert
40ad81aa20e2ba47db1f04204a60ffd06b513150
The difference between the original version and the current version
is that we test whether SCI could be shared or not, before falling
back to share PCI interrupt with SCI
Sepherosa Ziehau [Thu, 14 Apr 2011 11:24:39 +0000 (19:24 +0800)]
acpi: Detect SCI interrupt mode, if user does not specified one.
Sascha Wildner [Thu, 14 Apr 2011 07:37:09 +0000 (09:37 +0200)]
md5(1): Fix typo.
Reported-by: Maurizio Lombardi <m.lombardi85@gmail.com>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue2043>
Sepherosa Ziehau [Thu, 14 Apr 2011 05:10:55 +0000 (13:10 +0800)]
systimer: Fix statclock() intr% counting for i8254 interrupt cputimer
If i8254 is used as interrupt cputimer, it will send IPIs to APs to get
statclock() called. In order to detect fast interrupt, statclock()
tests gd_intr_nesting_level to see whether it should bump intr% or not,
however, during IPI processing, gd_intr_nesting_level is bumped up, which
tricks statclock() to believe that intr% should be incremented. This
usually leads to 100% interrupt time on APs reported by utilities like
systat(1). To solve this problem:
- Pass in_ipi to systimer functions to indicate whether the functions are
called during IPI processing or not.
- In statclock(): if it is called during IPI processing, using
(gd_intr_nesting_level - 1) to test whether intr% should be incremented
or not.
Additional cleanup:
- Make systimer_init_*() interface stricter, by using "systimer_func_t"
instead of "void *"
Matthew Dillon [Wed, 13 Apr 2011 16:33:25 +0000 (09:33 -0700)]
test - Add random seek/read program
* Add program which reads a random 512 byte block in a device or file
with 32 concurrent accessors and displays the results.
* make /tmp/rr1 from /usr/src/test/sysperf
Sepherosa Ziehau [Wed, 13 Apr 2011 13:28:14 +0000 (21:28 +0800)]
elcr: Initialize variable before calling TUNABLE_INT_FETCH()
If the tunable is not defined, the variable will not be initailized at all,
which causes random ELCR probing failure.
Sascha Wildner [Wed, 13 Apr 2011 09:24:51 +0000 (11:24 +0200)]
identcpu: Fix some comment whitespace.
Sascha Wildner [Wed, 13 Apr 2011 09:13:09 +0000 (11:13 +0200)]
identcpu: Add some Features2 strings.
Sepherosa Ziehau [Wed, 13 Apr 2011 08:21:02 +0000 (16:21 +0800)]
acpi: Properly configure SCI and correctly share it during PCI interrupt routing
Sepherosa Ziehau [Wed, 13 Apr 2011 07:38:59 +0000 (15:38 +0800)]
ioapic: Allow interrupt mode reconfigure
The prevention of interrupt mode change should be based on whether
the IRQ is enabled or not.
Sascha Wildner [Wed, 13 Apr 2011 08:08:27 +0000 (10:08 +0200)]
Fix snapshot building (hopefully).
Since pkgsrc making USE_DESTDIR active by default snapshot building was
broken since it would try to build a package for the bootstrap and failed:
=> Creating binary package /usr/pkgsrc/packages/All/bootstrap-mk-files-20090807nb2.tgz
pkg_create: Package building is not supported in bootstrap mode
Until this is fixed in pkgsrc, set USE_DESTDIR to "no" to fix snapshot
building.
Sepherosa Ziehau [Wed, 13 Apr 2011 07:16:59 +0000 (15:16 +0800)]
acpi: Add functions to configure SCI and return SCI information
Matthew Dillon [Wed, 13 Apr 2011 07:06:12 +0000 (00:06 -0700)]
kernel - Fix mbuf overflow issue w/ iwn.
* Give iwn the same MJUMPAGESIZE treatment as wpi.
* Fixed a mbuf overflow panic.
Reported-by: Peter Avalos <peter@theshell.com>
Sepherosa Ziehau [Wed, 13 Apr 2011 05:33:31 +0000 (13:33 +0800)]
icu: Configure interrupt trigger mode using ELCR if possible
Matthew Dillon [Wed, 13 Apr 2011 03:42:44 +0000 (20:42 -0700)]
kernel - Add quad intel gige PCIe ethernet adapter pci ids
* Add E1000_DEV_ID_82576_QUAD_COPPER_ET2, probes igbX.
Taken-from: FreeBSD
Sepherosa Ziehau [Wed, 13 Apr 2011 02:58:43 +0000 (10:58 +0800)]
elcr: File relocate
Sascha Wildner [Tue, 12 Apr 2011 23:15:47 +0000 (01:15 +0200)]
Makefile_upgrade.inc: Fix a few typos.
Sepherosa Ziehau [Tue, 12 Apr 2011 12:02:18 +0000 (20:02 +0800)]
acpi/fadt: Hide SCI IRQ logging under bootverbose
Sascha Wildner [Tue, 12 Apr 2011 12:04:17 +0000 (14:04 +0200)]
Rename the memoryallocators(9) manual page to memory(9).
Analogous to memory(3) for userland.
While here, do some minor cleanup on it and link back to it from the
individual allocator manual pages.
Sepherosa Ziehau [Tue, 12 Apr 2011 11:29:49 +0000 (19:29 +0800)]
acpi/sdt/fadt: Build as standard files
Sepherosa Ziehau [Tue, 12 Apr 2011 09:07:30 +0000 (17:07 +0800)]
tcp_connect: Rearrange tcp_lport_extension run logic, no functional change
Sepherosa Ziehau [Tue, 12 Apr 2011 08:57:41 +0000 (16:57 +0800)]
tcp_connect: Calculate local address if it is not done yet
Sascha Wildner [Tue, 12 Apr 2011 08:48:15 +0000 (10:48 +0200)]
c99(1): DragonFly has librt, so do not discard -lrt.
Sepherosa Ziehau [Tue, 12 Apr 2011 08:27:46 +0000 (16:27 +0800)]
tcp: Create seperate local port spaces for laddr/faddr/fport triple
TCP local ports could easily get depleted under stress due to
TIME_WAIT state. Since TIME_WAIT state is used to protect
laddr/lport/faddr/fport, we actually just need to make sure that
lport is not duplicated for each laddr/faddr/fport triple intead of
making sure that lport is not duplicated globally.
Add sysctl net.inet.tcp.lportext to enable seperate local port spaces
for laddr/faddr/fport triple; it is disabled by default.
Sepherosa Ziehau [Tue, 12 Apr 2011 06:16:19 +0000 (14:16 +0800)]
tcp: Make sure that netmsg's so is same as inp->inp_socket
Sascha Wildner [Mon, 11 Apr 2011 22:30:15 +0000 (00:30 +0200)]
<aio.h>: Add aio_fsync() prototype.
Matthew Dillon [Mon, 11 Apr 2011 17:07:37 +0000 (10:07 -0700)]
HAMMER VFS - Fix degenerate stall condition in flusher during unmount
* Fix a case where the flusher can stall during an unmount.
* Rework the flusher sequence numbers to always allocate a sequence number
when a flush is requested, remove the flusher.act field, and rejigger the
code a bit.
* This also cleans up an edge case when a full sync is inserted (when taking
snapshots, filesystem sync, etc), by inserting several sequence numbers to
completely flush the UNDO/REDO FIFO before moving on to the next active
flush group.
Reported-by: Sepherosa Ziehau <sepherosa@gmail.com>, Francois Tigeot <ftigeot@wolfpond.org>, numerous others.
Sepherosa Ziehau [Mon, 11 Apr 2011 09:13:33 +0000 (17:13 +0800)]
acpi: Typo in error logging message
Sepherosa Ziehau [Mon, 11 Apr 2011 09:05:57 +0000 (17:05 +0800)]
platform: Setup bootverbose earlier
Venkatesh Srinivas [Mon, 11 Apr 2011 03:54:53 +0000 (20:54 -0700)]
bufcache(9): Remove obsolete reference to namei.
Joe Talbott [Mon, 11 Apr 2011 03:21:59 +0000 (23:21 -0400)]
iwn(4) - Fix locking in iwn_ioctl().
iwn_ioctl() is already locked so call the non-locking
versions iwn_init_locked() and iwn_stop_locked().
Matthew Dillon [Sun, 10 Apr 2011 16:00:52 +0000 (09:00 -0700)]
kernel - Fix degenerate condition for ahci/cam disks without tags
* Fix a calculation that resolve to a value of at least 1, but
was resolving to a value of 0 for USB sticks and other disk
devices which do not negotiate NCQ.
Reported-by: Matthias Rampke <matthias@rampke.de>, swildner, others
Matthew Dillon [Sun, 10 Apr 2011 15:46:04 +0000 (08:46 -0700)]
HAMMER VFS - Implement async I/O for double-buffer strategy case
* When vfs.hammer.double_buffer is enabled the HAMMER strategy code
was running synchronously. This creates numerous problems including
extra stalls when read-ahead is issued.
* Use the new breadcb() function to allow nominal double_buffer strategy
operations to run asynchronously. Essentially the original buffer and
CRC is recorded in the device bio and the copyback is made in the
callback.
* This improves performance vfs.hammer.double_buffer is enabled.
Matthew Dillon [Sun, 10 Apr 2011 15:43:12 +0000 (08:43 -0700)]
kernel - Add breadcb() function - async I/O w/completion callback
* Add breadcb(). This function performs an asynchronous read for the
requested buffer and issues the specified callback on completion.
If the buffer is already B_CACHE the callback is made synchronously
and BIO_DONE is pre-set on the bio so the callback function can
determine if I/O occured or not (and whether it must bpdone() the buf).
* This function works differently from and is more flexible than the
previously removed breada(), and will be used by HAMMER.
Sepherosa Ziehau [Sun, 10 Apr 2011 11:18:17 +0000 (19:18 +0800)]
intrcnt: Fix long standing interrupt name/count array mismatch
hw.intrnames always returns all interrupts' name, while hw.intrcnt
only returns count of interrupts that get installed. This
mismatching cause utilities like vmstat(8) to report wrong interrupt
counts.
Keep the old symantic of hw.intrcnt and add hw.intrcnt_all, which
returns count of all interrupts. Let vmstat(8) and systat(1) use
hw.intrcnt_all.
Peter Avalos [Sun, 10 Apr 2011 07:35:21 +0000 (21:35 -1000)]
rc.d/sshd: Create /etc/ssh/ssh_host_ecdsa_key if it doesn't exist.
Matthew Dillon [Sun, 10 Apr 2011 02:56:24 +0000 (19:56 -0700)]
kernel - Fix CAM tag reservation for AHCI and SILI driver
* These drivers were adjusting the number of available tags upward
using the wrong CAM call, which resulted in CAM not actually queueing
multiple tags. Use the correct call.
* With the issue fix and verified up to a combined 31 read and write
requests can now be queued in parallel to a SATA drive via the AHCI
driver. It does appear to make a difference.
Matthew Dillon [Sun, 10 Apr 2011 02:52:29 +0000 (19:52 -0700)]
kernel - Limit tags allocated to reads or writes for CAM/scsi/ahci disks
* Limit the number of tags which can be taken up read or write requests.
If all tags are taken up by one type of request then the other type
of request can become starved.
* This is particularly important because drives usually cache writes and
return an immediate completion, so even if the system is reading heavily
enough to eat a lot of tags we always want a few left in reserve to
drain those writes in the drive's write cache.
* A similar situation can occur when flushing a lot of write data, which
is almost guaranteed to fill up not only available tags but also the
drive's write cache. When the drive's write cache becomes full then
write requests begin to stall (no longer return instantly), causing
reads to become starved.
* When no tags are available give reads priority over writes for
the moment. This needs to be fixed.
Matthew Dillon [Sun, 10 Apr 2011 00:42:01 +0000 (17:42 -0700)]
kernel - Adjust AHCI to properly report SATA-III support
* This is primarily so 6gbit/sec links and support is properly reported.
The links already negotiated 6gbit/sec correctly.
John Marino [Sat, 9 Apr 2011 13:14:25 +0000 (15:14 +0200)]
gcc44, crtstuff: Provide -fPIE support
Properly support Position Independent Executables (PIE) generation by
linking PIE binaries with specially-built Scrt1.o instead of crt1.o.
The latter is built without the -fPIC flag.
For the i386 version, gcc-2 code was first purged, and then the new
assembly was placed in a separate file. All data extracted by the
assembler stub as explicit parameters. The hidden _start1 symbol is used
as an interface between the assembly and C code.
The CFLAGS -fkeep-inline-functions was removed as it was legacy FreeBSD
code that has been long since removed. The CFLAGS -elf was removed as
all DragonFly targets are elf. The LDFLAGS -elf was removed because it
was getting interpreted as "-entry=lf" by ld. LDFLAGS weren't even used
before this commit so it's always been completely extraneous.
For x86_64, the no-omit-frame-pointer flag was added during the build of
crt1.o. For the builtin gcc function __builtin_frame_address to work, all
call frames need to save the frame pointer. In particular, this is
important for the upper frame that should terminate the chain.
Sascha Wildner [Sat, 9 Apr 2011 22:13:43 +0000 (00:13 +0200)]
mandoc(1): For now, don't install the mandoc.3 manual page.
I'll split it into libmandoc and the mandoc utility after the release.
Sascha Wildner [Sat, 9 Apr 2011 21:56:08 +0000 (23:56 +0200)]
mandoc(1): Adjust Makefile for 1.11.1.
Sascha Wildner [Sat, 9 Apr 2011 21:56:26 +0000 (23:56 +0200)]
Merge branch 'vendor/MDOCML'
Sascha Wildner [Sat, 9 Apr 2011 21:38:59 +0000 (23:38 +0200)]
Import mdocml-1.11.1
Matthew Dillon [Sat, 9 Apr 2011 19:14:46 +0000 (12:14 -0700)]
systat - Adjust field widths to prevent numbers from running together
* Compress the Trp, Sys, Int, Sof, and Flt fields and reduce the field
width to prevent numbers from running into each other, which was making
them unreadable.
On MP systems these fields can get into the hundreds of K. In particular
the Flt number would often hit up against the 'wire' number to its right.
* Reduce the width for the VN PAGER and SWAP PAGER fields for the same
reason.
These changes force larger numbers to be displayed with less accuracy,
i.e. instead of 104555 we would get 104K, but the output is far more
useful.
Peter Avalos [Sat, 9 Apr 2011 09:34:37 +0000 (02:34 -0700)]
Update files for OpenSSH-5.8p1 import.
Peter Avalos [Sat, 9 Apr 2011 06:57:29 +0000 (23:57 -0700)]
Merge branch 'vendor/OPENSSH'
Peter Avalos [Sat, 9 Apr 2011 05:59:12 +0000 (22:59 -0700)]
Import OpenSSH-5.8p1.
* Fix vulnerability in legacy certificate signing introduced in
OpenSSH-5.6.
* Implement Elliptic Curve Cryptography modes for key exchange (ECDH)
and host/user keys (ECDSA) as specified by RFC5656. ECDH and ECDSA
offer better performance than plain DH and DSA at the same equivalent
symmetric key length, as well as much shorter keys.
* sftp(1)/sftp-server(8): add a protocol extension to support a hard
link operation. It is available through the "ln" command in the
client. The old "ln" behaviour of creating a symlink is available
using its "-s" option or through the preexisting "symlink" command
* scp(1): Add a new -3 option to scp: Copies between two remote hosts
are transferred through the local host. Without this option the
data is copied directly between the two remote hosts.
* ssh(1): automatically order the hostkeys requested by the client
based on which hostkeys are already recorded in known_hosts. This
avoids hostkey warnings when connecting to servers with new ECDSA
keys, since these are now preferred when learning hostkeys for the
first time.
* ssh(1)/sshd(8): add a new IPQoS option to specify arbitrary
TOS/DSCP/QoS values instead of hardcoding lowdelay/throughput.
* ssh(1): "atomically" create the listening mux socket by binding it on
a temporary name and then linking it into position after listen() has
succeeded. This allows the mux clients to determine that the server
socket is either ready or stale without races. stale server sockets
are now automatically removed.
* ssh(1)/sshd(8): add a KexAlgorithms knob to the client and server
configuration to allow selection of which key exchange methods are
used by ssh(1) and sshd(8) and their order of preference.
* sftp(1)/scp(1): factor out bandwidth limiting code from scp(1) into
a generic bandwidth limiter that can be attached using the atomicio
callback mechanism and use it to add a bandwidth limit option to
sftp(1).
BugFixes:
* ssh(1)/ssh-agent(1): honour $TMPDIR for client xauth and ssh-agent
temporary directories.
* ssh(1): avoid NULL deref on receiving a channel request on an unknown
or invalid channel;
* sshd(8): remove a debug() that pollutes stderr on client connecting
to a server in debug mode
* scp(1): pass through ssh command-line flags and options when doing
remote-remote transfers, e.g. to enable agent forwarding which is
particularly useful in this case;
* sftp-server(8): umask should be parsed as octal
* sftp(1): escape '[' in filename tab-completion
* ssh(1): Typo in confirmation message.
* sshd(8): prevent free() of string in .rodata when overriding
AuthorizedKeys in a Match block
* sshd(8): Use default shell /bin/sh if $SHELL is ""
* ssh(1): kill proxy command on fatal() (we already killed it on
clean exit);
* ssh(1): install a SIGCHLD handler to reap expiried child process;
* sshd(8): Use correct uid_t/pid_t types instead of int.
John Marino [Thu, 7 Apr 2011 22:14:07 +0000 (00:14 +0200)]
binutils221: final solution to start/stop label generation
During discussion on binutils mail list about preserving the
__start_* and __stop_* section labels, Dimitry Andric indicated that
FreeBSD had the same exact issue when they recently upgraded to
binutils 2.17.50. The solution they chose was to declare these section
labels as global symbols, and the stock version of ld will retain them.
This commit implements the FreeBSD solution. Besides the obvious
benefit of having minimalist shared objects, it also "fixes" binutils
2.20 which, until this commit, failed to generate the start/stop section
labels.
Commit
f070647cc5317c4924be4dd60563fc39c18094cf has been reverted to
convert binutils 2.21 to a completely stock ld. Some whitespace cleanup
of linker_set.h was done while modifying __MAKE_SET macro.
Matthew Dillon [Thu, 7 Apr 2011 19:04:40 +0000 (12:04 -0700)]
vkernel64 - Push some non-working (as yet) shims for module loading
* Push some shims for module loading in vkernel64's to control
the load address. These currently do not work, probably due
to other symbol/dlsym issues.
The default kmem area is way outside the 32-bit rel relocation
range for the kernel binary proper so modules can't be loaded
into that area.
* Currently non-working.
Sepherosa Ziehau [Thu, 7 Apr 2011 16:29:09 +0000 (00:29 +0800)]
acpi/pci_link: Missing !acpi_enabled to acpi_disabled conversion
Sascha Wildner [Thu, 7 Apr 2011 14:11:51 +0000 (16:11 +0200)]
swapcache.8: Fix typo.
Sepherosa Ziehau [Thu, 7 Apr 2011 10:37:01 +0000 (18:37 +0800)]
acpi: Enable pci, pcib and pci_link by default
Sepherosa Ziehau [Thu, 7 Apr 2011 08:29:03 +0000 (16:29 +0800)]
acpi/pci: Inherit methods from pci_driver, instead of setting them manually
Manually setting all of the necessary methods is error prone, e.g. previously
pci_find_extcap is not set, which causes agp(4) not being attached.
Sepherosa Ziehau [Thu, 7 Apr 2011 10:11:16 +0000 (18:11 +0800)]
acpi/pcib: Rework the _BBN handling for Host-PCI bridges.
Obtained-from: FreeBSD (Revision 193829 by jhb@freebsd.org)
Previously we only trusted a _BBN value of 0 if it was for the first
bridge encountered since some older systems returned _BBN of 0 for
all bridges. However, some newer systems enumerate bridges with
non-zero _BBN before bus 0 which is perfectly valid. Handle both
cases by trusting the first bridge that has a _BBN of 0 and falling
back to reading from non-standard config registers only for
subsequent bridges with a _BBN of 0. We also only perform this
check for segment (domain) 0. We assume that _BBN is always correct
for segments other than 0.
Sepherosa Ziehau [Thu, 7 Apr 2011 10:06:03 +0000 (18:06 +0800)]
bus: Allow subclass to have the same name as the parent class.
Obtained-from: FreeBSD (Revision 154598 by jhb@freebsd.org)
When loading a driver that is a subclass of another driver don't set the
devclass's parent pointer if the two drivers share the same devclass. This
can happen if the drivers use the same new-bus name. For example, we
currently have 3 drivers that use the name "pci": the generic PCI bus
driver, the ACPI PCI bus driver, and the OpenFirmware PCI bus driver. If
the ACPI PCI bus driver was defined as a subclass of the generic PCI bus
driver, then without this check the "pci" devclass would point to itself
as its parent and device_probe_child() would spin forever when it
encountered the first PCI device that did have a matching driver.
John Marino [Thu, 7 Apr 2011 06:28:22 +0000 (08:28 +0200)]
binutils221: revisit start/stop label generation
In commit
b133d3fde203bbf8e2c359d2be9f09c20ce732b5 (3 April), ld's
lang_insert_orphan function was modified to include all symbols, which
matches the behavior of binutils 2.17 and allowed kernel modules
utilizing previously unreferenced __start_* and __stop_* sections to
load properly.
For at least 4 years, the ld developed by binutils has the policy to
discard all unreference symbols, considering them "clutter". This
commit will revert back ld back to its default behavior unless the
options -shared or -Bshareable are passed in the command line. In those
cases, the linked file will include all symbols, referenced or not.
In the future, we may consider modifying an .em file to define a flag
that will revert to 2.17 on a per-target basis rather than forcing all
shared objects to carry extraneous symbols. I'd have to identify all
kernel modules requiring this flag before implementing that change.
John Marino [Wed, 6 Apr 2011 22:34:12 +0000 (00:34 +0200)]
Verified commit access of marino
Matthew Dillon [Wed, 6 Apr 2011 04:36:12 +0000 (21:36 -0700)]
kernel - Add shutdown method for vm.swapcache
* Add shutdown methods for the swapcache to stop operations during a
shutdown. If not stopped swapcache operations can extend beyond the
device shutdown and cause a crash.
Matthew Dillon [Wed, 6 Apr 2011 04:09:09 +0000 (21:09 -0700)]
HAMMER VFS - Fix two minor bugs.
* When downgrading a volume to read-only due to a critical HAMMER error
also properly downgrade the VOP_OPEN/VOP_CLOSE state so the opencount
and writecount match up.
This should fix issues disconnecting the related disk device after
umounting a HAMMER partition which has had a critical error.
* When adding or removing a volume to an existing HAMMER mount flush
disk buffers before calling VOP_CLOSE() instead of after.
Matthew Dillon [Wed, 6 Apr 2011 04:06:03 +0000 (21:06 -0700)]
kernel - Fix slice open mask tracking
* The slice open mask tracking was broken when more than one partition
on a raw disk device was opened. Fix the tracking.
* This should solve problems editing the partition information in the
disklabel for partitions which have been mounted and then unmounted.
* This should also solve problems with the related disk device and
designation (e.g. da8, da9) being properly disconnected when pulling
a USB stick.
Venkatesh Srinivas [Wed, 6 Apr 2011 02:08:14 +0000 (19:08 -0700)]
kernel -- Remove unused vfscache structure.
Venkatesh Srinivas [Wed, 6 Apr 2011 02:02:10 +0000 (19:02 -0700)]
kernel -- Remove unused vfs rangelocks from vnodes.
Matthew Dillon [Tue, 5 Apr 2011 18:08:34 +0000 (11:08 -0700)]
kernel - Possible fix to 'Bad link elm' panic in random callout
* Fix a rare race condition where the acquisition of p_token in the
tsleep callout code can delay the setting of TDF_TIMEOUT, potentially
causing it to skip the current tsleep entirely and trigger on a later
tsleep.
If this occurs the later callout is not terminated and tsleep() can return
with it still active. The callout is declared on the kernel stack, leading
to the assertion and crash.
* During evaluation I noticed that the corrupted callout structure in
Rumko's crash dump contained information that indicated it was part of
a stack frame. I think only tsleep() declares callout structures on the
stack.
PR: 1977, 1835, 2037 (tracking using 2037)
Reported-by: Rumko, Francois Tigeot <ftigeot@wolfpond.org>
Matthew Dillon [Tue, 5 Apr 2011 00:04:12 +0000 (17:04 -0700)]
vkernel - Fix problem where cpu-bound user process cannot be interrupted
* Fix an issue where a cpu-bound user process running in a vkernel cannot
be interrupted from within the vkernel.
The problem occurs because the timer interrupt was not marked MPSAFE,
causing the interrupt thread to hold the MP token which then prevented
the thread preemption code from letting the timer interrupt thread
preempt the currently running user process.
* Fixed by marking the timer interrupt and other vkernel interrupt
handlers as being MPSAFE.
* This is a problem for the vkernel and not for normal kernel. Normal
kernels have a doreti function which 'catches' pending flags on
any attempt to return to userland.
The vkernel does not, instead relying on the preemption mechanic to
catch pending flags.
Reported-by: Antonio Huete Jimenez <ahuete.devel@gmail.com>
Matthew Dillon [Mon, 4 Apr 2011 19:37:13 +0000 (12:37 -0700)]
swapcache - Update manual pages
* Add a section describing the new HAMMER double_buffer feature and how to
use it to radically improve the amount of data the swapcache feature can
cache on a SSD.
* Add a section describing the difference between 34nm flash and 25nm flash
with regards to durability.
Antonio Huete Jimenez [Mon, 4 Apr 2011 19:13:01 +0000 (21:13 +0200)]
rc.subr - Add missing quotes.