Robert Watson [Thu, 26 Feb 2009 10:56:13 +0000 (10:56 +0000)]
Add static tracing for privilege checking:
priv:kernel:priv_check:priv_ok fires for granted privileges
priv:kernel:priv_check:priv_errr fires for denied privileges
The first argument is the requested privilege number. The naming
convention is a little different from the OpenSolaris equivilent
because we can't have '-' in probefunc names, and our privilege
namespace is different.
Jung-uk Kim [Wed, 25 Feb 2009 20:26:48 +0000 (20:26 +0000)]
Enable support for PAT_WRITE_PROTECTED and PAT_UNCACHED cache modes
unconditionally on amd64. On i386, we assume PAT is usable if the CPU
vendor is not Intel or CPU model is newer than Pentium IV.
Alan Cox [Wed, 25 Feb 2009 07:52:53 +0000 (07:52 +0000)]
Prior to r188331 a map entry's last read offset was only updated by a hard
fault. In r188331 this update was relocated because of synchronization
changes to a place where it would occur on both hard and soft faults. This
change again restricts the update to hard faults.
Maxim Sobolev [Wed, 25 Feb 2009 01:49:01 +0000 (01:49 +0000)]
Make machdep.hyperthreading_enabled tunable working with the SCHED_ULE.
Unlike with SCHED_BSD, however, it can only be set to 0 at boot time,
it's not possible to change it at runtime.
Pyun YongHyeon [Wed, 25 Feb 2009 01:12:56 +0000 (01:12 +0000)]
Update to latest 3Com firmware image. The latest fimware is
required to make 3CR990 familiy controllers run on NV flash
firmware version 03.001.008.
The latest firmware added HMAC digest information so teach txp(4)
to pass them to sleep image before downloading is started.
While I'm here restore previous IMR/IER register if firmware
downloading have failed.
John Baldwin [Tue, 24 Feb 2009 23:11:15 +0000 (23:11 +0000)]
Fix some more issues with the real mode BTX.
The old BTX passed the general purpose registers from the 32-bit client to
the routines called via virtual 86 mode. The new BTX did the same thing.
However, it turns out that some instructions behave differently in virtual 86
mode and real mode (even though this is under-documented). For example, the
LEAVE instruction will cause an exception in real mode if any of the upper
16-bits of %ebp are non-zero after it executes. In virtual 8086 mode the
upper 16-bits are simply ignored. This could cause faults in hardware
interrupt handlers that inherited an %ebp larger than 0xffff from the 32-bit
client (loader, boot2, etc.) while running in real mode.
To fix, when executing hardware interrupt handlers provide an explicit clean
state where all the general purpose and segment registers are zero upon
entry to the interrupt handler. While here, I attempted to simplify the
control flow in the 'intusr' code that sets up the various stack frames
and exits protected mode to invoke the requested routine via real mode.
A huge thanks to Tor Egge (tegge@) for debugging this issue.
Revert the addition of the freelist argument for the vm_map_delete()
function, done in r188334. Instead, collect the entries that shall be
freed, in the deferred_freelist member of the map. Automatically purge
the deferred freelist when map is unlocked.
John Baldwin [Tue, 24 Feb 2009 16:01:56 +0000 (16:01 +0000)]
Bring back the code to prime the ACCESS cache when fetching attributes for
an NFS file. Now the priming is conditional on a new
vfs.nfs.prime_access_cache sysctl. For now I've left the default setting
to disabling the priming.
Robert Watson [Tue, 24 Feb 2009 11:17:50 +0000 (11:17 +0000)]
In tcp_usr_shutdown() and tcp_usr_send(), I missed converting NULL
checks for the tcpcb, previously used to detect complete disconnection,
with INP_DROPPED checks. Correct that, preventing shutdown() from
improperly generating a TCP segment with destination IP and port of
0.0.0.0:0.
PR: kern/132050
Reported by: david gueluy <david.gueluy at netasq.com>
MFC after: 3 weeks
Andrew Thompson [Tue, 24 Feb 2009 03:41:52 +0000 (03:41 +0000)]
MFp4 //depot/projects/usb@157958
- We don't need to exit the Giant mutex when sleeping. This is done
automatically. Replace Giant by NULL mutex for all control requests in the
enumeration path.
- Optimise away duplicate alternate interface selection requests in USB Host
mode.
Andrew Thompson [Tue, 24 Feb 2009 03:38:24 +0000 (03:38 +0000)]
MFp4 //depot/projects/usb@157847
Improvements to "usb2_transfer_setup()" and "usb2_transfer_unsetup()". Set
"ppxfer[n]" when the transfer setup is complete to prevent races. Remove
redundant NULL-checks from "usb2_transfer_unsetup()".
Andrew Thompson [Tue, 24 Feb 2009 03:34:05 +0000 (03:34 +0000)]
MFp4 //depot/projects/usb; 157814, 157863, 157868
- The software computed HID size is not always correct, because the algoritm
does not handle unsorted HID descriptors.
- Change the way we obtain the report ID.
- Use the X/Y/Z+button locations instead for report ID source for ums.
- Add more range checks.
- Remove Microsoft Mouse quirks. If the positions are moduloed the report
length multiplied by 8, the values seem correct.
- Some minor style changes.
Sam Leffler [Tue, 24 Feb 2009 01:07:06 +0000 (01:07 +0000)]
Add PCIE power control api:
o add ah_configPCIE and ah_disablePCIE for drivers to configure PCIE
power save operation (modeled after ath9k, may need changes)
o add private state flag to indicate if device is PCIE (replaces private
hack in 5212 code)
o add serdes programming ini bits for 5416 and later parts and setup
for each part (5416 and 9160 logic hand-crafted from existing routines);
5212 remains open-coded but is now hooked in via ah_configPCIE
o add PCIE workaround gunk
o add ar5416AttachPCIE for iodomatic code used by 5416 and later parts
Sam Leffler [Tue, 24 Feb 2009 00:33:08 +0000 (00:33 +0000)]
Fill in gpio support for 5416 and later parts:
o add output mux support
o gpio pin count is chip-dependent
o 9280 and 9285 do input handling different
o hookup gpio interrupts
o no need to save/restore soft led state around reset
Robert Watson [Mon, 23 Feb 2009 23:00:12 +0000 (23:00 +0000)]
Add a debugging sysctl, debug.vm_lowmem, that when assigned a value of
1 will trigger a pass through the VM's low-memory handlers, such as
protocol and UMA drain routines. This makes it easier to exercise
these otherwise rarely-invoked code paths.
Robert Watson [Mon, 23 Feb 2009 22:57:55 +0000 (22:57 +0000)]
In in_rtqkill(), assert the radix head lock, and pass RTF_RNH_LOCKED
to in_rtrequest(); the radix head lock is already acquired before
rnh_walktree is called in in_rtqtimo_one(). This avoids a recursive
acquisition that is no longer permitted in 8.x due to use of an rwlock
for the radix head lock.
Reported by: dikshie <dikshie at gmail.com>
MFC after: 3 days
Right now, when trying to unmount a device that's already gone,
msdosfs_unmount() and ffs_unmount() exit early after getting ENXIO.
However, dounmount() treats ENXIO as a success and proceeds with
unmounting. In effect, the filesystem gets unmounted without closing
GEOM provider etc.
Ed Maste [Mon, 23 Feb 2009 18:22:06 +0000 (18:22 +0000)]
SVN rev 188743 modified aac_rx_get_fwstatus to use the AAC_RX_OMR0
register instead of AAC_RX_FWSTATUS, as that is the way it's done in
Adaptec's vendor driver and in the Linux drivers. (The same applies
to aac_rkt_get_fwstatus as well.)
However, a concern has been raised about the compatibility of this
change and old hardware / firmware versions. In the absense of
specific information, revert to the original behaviour if the firmware
does not support the "New comm." interface. Users of old cards or
firmware haven't reported the problems that are potentially solved by
switching to OMR0.
John Baldwin [Mon, 23 Feb 2009 15:38:35 +0000 (15:38 +0000)]
FreeBSD/i386 doesn't include a software FPU emulator anymore, so adjust
an iBCS2 syscall to indicate that there is no FPU support at all rather
than emulated support if an FPU is not present.
It is only really necessary for open(2)'s third argument, which is optional and
obtained through stdarg(3). open(2)'s third argument is 32bit and we pass 64
bits. On little endian it works, because we take lower 32 bits, but on big
endian platforms we take upper 32 bits, so we end up with 0.