Robert Watson [Tue, 14 Mar 2006 19:29:45 +0000 (19:29 +0000)]
If fifo_open() is called with a negative file descriptor, return EINVAL
rather than panicking later. This can occur if the kernel calls
vn_open() on a fifo, as there will be no associated file descriptor,
and therefore the file descriptor operations cannot be modified to
point to the fifo operation set.
MFC after: 3 days
Reported by: Martin <nakal at nurfuerspam dot de>
PR: 94278
John Baldwin [Tue, 14 Mar 2006 16:13:55 +0000 (16:13 +0000)]
Don't allow userland to set hardware watch points on kernel memory at all.
Previously, we tried to allow this only for root. However, we were calling
suser() on the *target* process rather than the current process. This
means that if you can ptrace() a process running as root you can set a
hardware watch point in the kernel. In practice I think you probably have
to be root in order to pass the p_candebug() checks in ptrace() to attach
to a process running as root anyway. Rather than fix the suser(), I just
axed the entire idea, as I can't think of any good reason _at all_ for
userland to set hardware watch points for KVM.
MFC after: 3 days
Also thinks hardware watch points on KVM from userland are bad: bde, rwatson
David Xu [Tue, 14 Mar 2006 04:00:21 +0000 (04:00 +0000)]
1. Count last time slice, this intends to fix
"calcru: runtime went backwards" bug for threaded process.
2. Add comment about possible logical problem with scheduler.
John-Mark Gurney [Tue, 14 Mar 2006 00:22:10 +0000 (00:22 +0000)]
spell pdata correctly, we now will only dump maxlen of each mbuf in the
chain, instead of the entire mbuf... This should probably be reworked
so that it prints at max maxlen bytes for the entire chain...
Joerg Wunsch [Mon, 13 Mar 2006 22:32:33 +0000 (22:32 +0000)]
When encountering a ISO_SUSP_CFLAG_ROOT element in Rock Ridge
processing, this actually means there's a double slash recorded in the
symbolic link's path name. We used to start over from / then, which
caused link targets like ../../bsdi.1.0/include//pathnames.h to be
interpreted as /pathnahes.h. This is both contradictionary to our
conventional slash interpretation, as well as potentially dangerous.
The right thing to do is (obviously) to just ignore that element.
bde once pointed out that mistake when he noticed it on the
4.4BSD-Lite2 CD-ROM, and asked me for help.
Reviewed by: bde (about half a year ago)
MFC after: 3 days
Ruslan Ermilov [Mon, 13 Mar 2006 14:58:37 +0000 (14:58 +0000)]
The mount(8) manpage says: "In case of conflicting options being
specified, the rightmost option takes effect." Fix code to obey
this. This makes e.g. "mount -r /usr" or "mount -ar" actually
mount file systems read-only.
Hartmut Brandt [Mon, 13 Mar 2006 09:28:46 +0000 (09:28 +0000)]
There has been a shared libdisk for a couple of days until it was reverted
back to be static-only in january. For this period libdisk was used by
the HOSTRES module for bsnmp which was then rewritten to use libgeom. The
only other consumer of libdisk is sysinstall so removing the shared library
should be safe.
Paul Saab [Mon, 13 Mar 2006 08:13:37 +0000 (08:13 +0000)]
Fix the format/display descriptor of vm.kmem_size and vm.kmem_free
to be 'long' instead of 'int' so that sysctl(8) correctly displays
the 8 returned bytes as a single 'long' instead of two 'int' values.
- Reimplement I/O data allocation to prevent deadlocks.
Submitted by: green
- Speed up synchronization process by using configurable number of I/O
requests in parallel.
+ Add kern.geom.raid3.sync_requests tunable which defines how many parallel
I/O requests should be used.
+ Retire kern.geom.raid3.reqs_per_sync and kern.geom.raid3.syncs_per_sec
sysctls.
- Fix race between regular and synchronization requests.
- Reimplement raid3's data synchronization - do not use the topology lock
for this purpose, as it may case deadlocks.
- Stop synchronization from pre-sync hook.
- Fix some other minor issues.
Tested by: Mike Tancsa <mike@sentex.net>
MFC after: 3 days
Daniel Eischen [Mon, 13 Mar 2006 00:59:51 +0000 (00:59 +0000)]
Add compatibility symbol maps. libpthread (.so.1 and .so.2)
used LIBTHREAD_1_0 as its version definition, but now needs
to define its symbols in the same namespace used by libc.
The compatibility hooks allows you to use libraries and
binaries built and linked to libpthread before libc was
built with symbol versioning. The shims can be removed if
libpthread is given a version bump.
- Speed up synchronization process by using configurable number of I/O
requests in parallel.
+ Add kern.geom.mirror.sync_requests tunable which defines how many parallel
I/O requests should be used.
+ Retire kern.geom.mirror.reqs_per_sync and kern.geom.mirror.syncs_per_sec
sysctls.
- Fix race between regular and synchronization requests.
- Reimplement mirror's data synchronization - do not use the topology lock
for this purpose, as it may case deadlocks.
- Stop synchronization from pre-sync hook.
- Fix some other minor issues.
Daniel Eischen [Mon, 13 Mar 2006 00:56:02 +0000 (00:56 +0000)]
Add hooks to build libc with symbol versioning. This is
disabled by default; add SYMVER_ENABLED=true to /etc/make.conf
to enable it. libc should get a version bump before this is
enabled by default.
Damien Bergamini [Sun, 12 Mar 2006 18:54:40 +0000 (18:54 +0000)]
o don't use '-' characters in firmware names
o call firmware_put() early to release the firmware module
o on firmware panics or watchdog timeouts, schedule a task to reinitialize
the interface (we may sleep in iwi_init())
o discard oversized rx frames
Flush stdout after printing name of created device, so it can be properly
read when 'ggatec create' is used in backticks or its output is piped to
another command.
Jeff Roberson [Sun, 12 Mar 2006 05:26:12 +0000 (05:26 +0000)]
- Remove the call to softdep_waitidle after suspending the filesystem.
This does not do what I wanted as all dirty buffers must be flushed
by the call to ffs_sync and any remaining dependency work would mean
that this failed.
Jeff Roberson [Sun, 12 Mar 2006 05:24:14 +0000 (05:24 +0000)]
- Remove the call to softdep_waitidle after suspending the filesystem.
This does not do what I wanted as all dirty buffers must be flushed
by the call to ffs_sync and any remaining dependency work would mean
that this failed.
Tim Kientzle [Sat, 11 Mar 2006 23:59:44 +0000 (23:59 +0000)]
The idea of supporting 'tp' was a fun one, but it is
really not worth the effort to develop and maintain
support for a format that hasn't been used for 30 years. ;-/
Philip Paeps [Fri, 10 Mar 2006 23:50:53 +0000 (23:50 +0000)]
Fix multicast support for cs89x0 chips. Just setting the RX_MULTCAST_ACCEPT
flag isn't enough - the filter needs to be set up too, or no multicast frames
are accepted.
Sponsored by: Philips Industrial Applications (indirectly)
MFC after: 3 days
Damien Bergamini [Fri, 10 Mar 2006 20:35:09 +0000 (20:35 +0000)]
o acknowledge interrupts early in the interrupt handler
o stop processing interrupts after a firmware fatal error or a radio kill
o clarify the possible values for the 'antenna' sysctl.
o by default, let the firmware do antenna diversity.
the firmware will periodically switch to another antenna to evaluate the
signal quality.
Søren Schmidt [Fri, 10 Mar 2006 19:08:52 +0000 (19:08 +0000)]
Module that adds support for using USB storage devices through the
ATA framework. Mainly written to be able to use USB Flash keys.
This is work in progress so use with care :)
Doesn't need CAM and cannot coexist with umass.c
Warner Losh [Fri, 10 Mar 2006 18:40:31 +0000 (18:40 +0000)]
Add note about 'audit' group.
Add note about the '_dhcp' user.
While one is expected to run mergemaster -p before installworld, make
a note of the points where this will actively fail due to the addition of
users/groups.
Daniel Eischen [Fri, 10 Mar 2006 07:58:02 +0000 (07:58 +0000)]
Remove including of libc sources. All the required functions
are exported by libc with prototypes in our standard headers.
I guess at one time this was necessary, but not any longer.
When inserting a new component md_provsize metadata field wasn't set, which
means that old problem was triggered (when two providers end at the same
offset, eg. ad0 and ad0s1 and the wrong was is picked up by gmirror/graid3).
Reported by: Michal Suszko <dry@dry.pl>
MFC after: 3 days
Jung-uk Kim [Thu, 9 Mar 2006 22:49:44 +0000 (22:49 +0000)]
- Implement serial numbers, UUID, and asset tag (turned off by default).
Use 'BOOT_SENSITIVE_INFO=YES' variable to turn them on.
- Use 'uint*_t' instead of 'u_int*_t', correct compilation warnings, and
update copyright while I am here.