Commit Graph

61949 Commits

Author SHA1 Message Date
Max Laier
191c6e1310 Clean up pfr_kentry_pl2 as well. This fixes a kernel panic in the vm.zone
sysctl after unloading pf.

Submitted by:	Earl Lapus
MFC after:	3 days
2007-01-01 16:51:11 +00:00
Xin LI
59038483f5 Fix amd64 build.
Submitted by:	Divacky Roman <xdivac02 stud fit vutbr cz>
2007-01-01 14:47:45 +00:00
Christian S.J. Peron
17870c0627 Teach the stub policy about some of the more recent entry points that have
been introduced to the MAC framework:

mpo_associate_nfsd_label
mpo_create_mbuf_from_firewall
mpo_check_system_nfsd
mpo_check_vnode_mmap_downgrade
mpo_check_vnode_mprotect
mpo_init_syncache_label
mpo_destroy_syncache_label
mpo_init_syncache_from_inpcb
mpo_create_mbuf_from_syncache

MFC after:	2 weeks [1]

[1] The syncache related entry points will NOT be MFCed as the changes in
    the syncache subsystem are not present in RELENG_6 yet.
2007-01-01 01:47:18 +00:00
Christian S.J. Peron
22a0de89ff Remove conditional return of 1. For the MAC_STATIC case at this point in
the code, one being returned is invariant.

Discussed with:	rwatson
MFC after:	1 week
2007-01-01 01:40:29 +00:00
Warner Losh
e79c6a301d MFp4: Fix bit name for SPI SR register 2007-01-01 00:50:25 +00:00
Warner Losh
5434a91804 MFp4: Remove watchdog timeout that appears to be unused. 2007-01-01 00:48:25 +00:00
Warner Losh
c36172be39 Merge from FreeBSD-tsf-6 by way of p4:
correct values for PIO registers

	submitted by: patrick schweiger
2007-01-01 00:46:54 +00:00
Warner Losh
6796a2d434 Fix typo in comment.
Submitted by: remko
2007-01-01 00:35:34 +00:00
Warner Losh
74eb3236c7 Add comment about udp checksums being off in BSD 4.2 compatibility mode.
Submitted by: Dr. Markus Waldeck
PR: kern/106657
2006-12-31 21:34:53 +00:00
Robert Watson
989d409801 Only signal the CV indicating that the MAC Framework is available for
exclusive access if there is at least one thread waiting for it to
become available.  This may significantly reduce overhead by reducing
the number of unnecessary wakeups issued whenever the framework becomes
idle.

Annotate that we still signal the CV more than necessary and should
fix this.

Obtained from:	TrustedBSD Project
Reviewed by:	csjp
Tested by:	csjp
2006-12-31 20:26:20 +00:00
John-Mark Gurney
5afbb3a8b1 remove delays that have been unnecessary since 2002... The iicbb driver
has the proper delays...
2006-12-31 19:42:47 +00:00
Xin LI
0660f55828 Welcome to 2007 2006-12-31 16:35:29 +00:00
Robert Watson
2da78e3862 Prefer a more traditional spelling of inhibited in comments and panic
messages.
2006-12-31 15:56:04 +00:00
Alexander Leidinger
99e9dcf022 regen after addition of linux_utimes and linux_rt_sigtimedwait 2006-12-31 13:20:31 +00:00
Alexander Leidinger
c9447c7551 MFp4 (111746, 108671, 108945, 112352):
- add linux utimes syscall [1]
 - add linux rt_sigtimedwait syscall [2]

Submitted by:	"Scot Hetzel" <swhetzel@gmail.com> [1]
Submitted by:	Bruce Becker <hostmaster@whois.gts.net> [2]
PR:		93199 [2]
2006-12-31 13:16:00 +00:00
Alexander Leidinger
a628609ee9 MFp4:
- semi-automatic style fixes
2006-12-31 12:42:55 +00:00
Alexander Leidinger
9ce8f9bcdd MFp4 (111746+):
Redo the checking for 2.6 emulation. We now cache the value of
  use26 and replace calls to linux_get_osrelease() + parsing with
  a call to linux_use26(). Typical path is lockless now.

  Pointed out by: kib

This allows to ship RELENG_7_0 with a default osrelease of 2.4.2 and the
possibility to enable 2.6.x emulation without the possible performance
impact of the previous version of the check.

Submitted by:	rdivacky
2006-12-31 12:39:10 +00:00
Alexander Leidinger
ef95cfeab9 MFp4:
- semi-automatic style fixes
 - spelling fixes in comments
 - add some comments
2006-12-31 11:56:16 +00:00
Christian S.J. Peron
90339ccb12 Invert the logic inside of two KASSERTS which resulted in two kernel panics
for circumstances which are quite normal.

Discussed with:	kmacy
2006-12-31 02:50:07 +00:00
Yaroslav Tykhiy
2dc879b337 - Don't defer the removal of an 802.1q header for no real reason.
- Micro-optimize the addition of an 802.1q header to match the removal code.
- Consistently check for interfaces being up and running.
- Consistently use NULL instead of 0 with pointers.
2006-12-30 21:10:25 +00:00
John-Mark Gurney
83616b3aff now that MFS_IMAGE is in the FULLKERNEL section, use FULLKERNEL instead of
KERNEL_KO, this fixes MFS_IMAGE on a debugging kernel...

Submitted by:	Neelkanth Natu
2006-12-30 20:27:24 +00:00
John Baldwin
54e3607de6 Whitespace fix and remove an extra cast. 2006-12-30 17:53:28 +00:00
Ceri Davies
18929073b9 Be consistent with the spelling of "dependent" in user-visible places.
PR:		kern/27429
Submitted by:	T. William Wells
2006-12-30 11:55:47 +00:00
Paolo Pisati
ff2f6fe80f Summer of Code 2005: improve libalias - part 2 of 2
With the second (and last) part of my previous Summer of Code work, we get:

-ipfw's in kernel nat

-redirect_* and LSNAT support

General information about nat syntax and some examples are available
in the ipfw (8) man page. The redirect and LSNAT syntax are identical
to natd, so please refer to natd (8) man page.

To enable in kernel nat in rc.conf, two options were added:

o firewall_nat_enable: equivalent to natd_enable

o firewall_nat_interface: equivalent to natd_interface

Remember to set net.inet.ip.fw.one_pass to 0, if you want the packet
to continue being checked by the firewall ruleset after being
(de)aliased.

NOTA BENE: due to some problems with libalias architecture, in kernel
nat won't work with TSO enabled nic, thus you have to disable TSO via
ifconfig (ifconfig foo0 -tso).

Approved by: glebius (mentor)
2006-12-29 21:59:17 +00:00
Randall Stewart
139bc87fda a) macro-ization of all mbuf and random number
access plus timers. This makes the code
   more portable and able to change out the
   mbuf or timer system used more easily ;-)
b) removal of all use of pkt-hdr's until only
   the places we need them (before ip_output routines).
c) remove a bunch of code not needed due to <b> aka
   worrying about pkthdr's :-)
d) There was one last reorder problem it looks where
   if a restart occur's and we release and relock (at
   the point where we setup our alias vtag) we would
   end up possibly getting the wrong TSN in place. The
   code that fixed the TSN's just needed to be shifted
   around BEFORE the release of the lock.. also code that
   set the state (since this also could contribute).
Approved by:	gnn
2006-12-29 20:21:42 +00:00
Robert Watson
c441d123ef Slightly resort functions in file so that no forward function prototypes
are required.

Obtained from:	TrustedBSD Project
2006-12-29 20:21:21 +00:00
Robert Watson
39b73a30c0 Re-add include of opt_mac.h in mac_framework.c, which was improperly
removed from this file.  It is required to pick up the definition of
MAC_STATIC.
2006-12-29 20:16:29 +00:00
John Baldwin
5583491044 Fix fat-fingering in previous commit.
Pointy hat to:	jhb
2006-12-29 16:38:22 +00:00
Bruce Evans
0b194ec872 Fix oops in previous commit. 2006-12-29 15:48:18 +00:00
Bruce Evans
f28e1c8f99 Fixed some style bugs (mainly assorted errors in comments, and inconsistent
spelling of `result').
2006-12-29 15:29:49 +00:00
John Baldwin
08651e1f24 Some whitespace nits and remove a few casts. 2006-12-29 14:58:18 +00:00
Bruce Evans
6c296ffa81 Fixed some style bugs (whitespace only). 2006-12-29 14:28:23 +00:00
John Baldwin
0dea849ae9 Various bpf(4) related fixes to catch places up to the new bpf(4)
semantics.
- Stop testing bpf pointers for NULL.  In some cases use
  bpf_peers_present() and then call the function directly inside the
  conditional block instead of the macro.
- For places where the entire conditional block is the macro, remove the
  test and make the macro unconditional.
- Use BPF_MTAP() in if_pfsync on FreeBSD instead of an expanded version of
  the old semantics.

Reviewed by:	csjp (older version)
2006-12-29 13:59:50 +00:00
Max Laier
240589a9fe Work around a long standing LOR with user/group rules by doing the socket
lookup early.  This has some performance implications and should not be
enabled by default, but might help greatly in certain setups.  After some
more testing this could be turned into a sysctl.

Tested by:	avatar
LOR ids:	17, 24, 32, 46, 191 (conceptual)
MFC after:	6 weeks
2006-12-29 13:59:03 +00:00
Bruce Evans
7e4277e591 Try harder to garbage-collect the "LOCORE" (really asm) version of
MPLOCKED.  The cleaning in rev.1.25 was supposed to have been undone
by rev.1.26, but 1.26 could never have actually affected asm files
since atomic.h is full of C declarations so including it in asm files
would just give syntax errors.  The asm MPLOCKED is even less needed
than when misplaced definitions of it were first removed, and is now
unused in any asm file in the src tree except in anachronismns in
sys/i386/i386/support.s.
2006-12-29 13:36:26 +00:00
Gleb Smirnoff
9e6f1d3be4 Build bits for ng_deflate(4) and ng_pred1(4). 2006-12-29 13:16:43 +00:00
Yaroslav Tykhiy
9b3d1b0253 Fix a group of typos:
preceed -> precede,
preceeded -> preceded,
preceeding -> preceding.

Submitted by:	Andre Guibert de Bruet <andy@siliconlandmark.com>
2006-12-29 13:08:46 +00:00
Jeff Roberson
c02bbb43a0 - More search and replace prettying. 2006-12-29 12:55:32 +00:00
Robert Watson
4cfbab605a Remove two XXX comments that no longer apply.
Obtained from:	TrustedBSD Project
2006-12-29 11:03:44 +00:00
Robert Watson
aa6fe97ca3 Use p_cansee() to check that a target process for an audit state
manipulation is visible to the subject process.  Remove XXX comments
suggesting this.

Convert one XXX on a difference from Darwin into a note: it's not a
bug, it's a feature.

Obtained from:	TrustedBSD Project
2006-12-29 10:49:13 +00:00
Robert Watson
dc97e8c70a Add a witness sleep warning to canon_path(), which invokes vput() and hence
may perform an unbounded sleep.  Remove an XXX comment suggesting that one
be added.

Obtained from:	TrustedBSD Project
2006-12-29 10:37:32 +00:00
Jeff Roberson
d2ad694caa - Clean up a bit after the most recent KSE restructuring. 2006-12-29 10:37:07 +00:00
Gleb Smirnoff
700218c77b A node that implements Predictor-1 compression for PPP.
Submitted by:	Alexander Motin <mav alkar.net>
2006-12-29 09:54:32 +00:00
Pyun YongHyeon
2271eac77c Piggyback watchdog timer handling with msk_tick which is called every
hz. This will result in slightly faster Tx processing as it does not
need lock operations for callouts in msk_start/msk_txeof.
2006-12-29 04:55:38 +00:00
Pyun YongHyeon
b55031fd1a Fix interrupt handling on a dual port card. Previously it ignored
the second port interrupt if the first port was in down state.
Since I don't have a dual port card it's just guess work.

Noticed by:	jhb
2006-12-29 03:56:29 +00:00
Pyun YongHyeon
298946a985 Fix MSI support. Now it correctly allocates SYS_RES_IRQ resources
on Yukon II which reports it can handle two messages.

Submitted by:	jhb
Tested by:	bms
2006-12-29 03:33:33 +00:00
Robert Watson
e9e1341c06 Regenerate. 2006-12-29 01:17:09 +00:00
Robert Watson
a46b391df7 Assign or clean up audit identifiers for a number of additional Linux
system calls on the amd64 architecture.

Some minor white space tweaks for consistency with other syscalls.master
files.

Obtained from:	TrustedBSD Project
2006-12-29 01:17:02 +00:00
Marcel Moolenaar
b92167c505 In cpu_reset(), call OF_reboot() instead of OF_exit(). The latter
doesn't do a reboot and has been observed to reset the NVRAM to its
default values.
2006-12-28 23:56:50 +00:00
Robert Watson
d02188c146 Add missing include guards to mac_internal.h, update include guards in
mac_policy.h following move to new location in src/sys/security/mac.

Obtained from:	TrustedBSD Project
2006-12-28 23:23:35 +00:00
Robert Watson
1afabae4db Update a number of comments:
- Replace XXX with Note: in several cases where observations are made about
  future functionality rather than problems or bugs.

- Remove an XXX comment about byte order and au_to_ip() -- IP headers must
  be submitted in network byte order.  Add a comment to this effect.

- Mention that we don't implement select/poll for /dev/audit.

Obtained from:	TrustedBSD Project
2006-12-28 22:18:43 +00:00
Robert Watson
bd8a9c45aa Remove XXX comments about EA transaction support and provide a more
general and detailed comment on the topic of EA transactions and kernel
warnings.

Obtained from:	TrustedBSD Project
2006-12-28 22:02:59 +00:00
Robert Watson
9b637ee9dd Remove an inaccurate comment I added regarding storage for mbuf tag
labels: they are in fact stored in the tag directly.

Obtained from:	TrustedBSD Project
2006-12-28 21:57:59 +00:00
Robert Watson
c982ffa42a In mac_inpcb_sosetlabel(), assert the socket lock rather than commenting
that we should assert the socket lock.

Obtained from:	TrustedBSD Project
2006-12-28 21:56:39 +00:00
John Baldwin
2dccd58192 Update __FreeBSD_version check for pci_find_extcap() now that it is
present in 6.x.
2006-12-28 21:55:47 +00:00
Robert Watson
be23ba9aab Centralize definition of MAC_VERSION in mac_policy.h, as it defines the
kernel<->policy ABI version.  Add a comment to the definition describing
it and listing known versions.  Modify MAC_POLICY_SET() to reference the
current kernel version by name rather than by number.

Staticize mac_late, which is used only in mac_framework.c.

Obtained from:	TrustedBSD Project
2006-12-28 21:48:38 +00:00
Robert Watson
d5fb913feb Move mac_init_label() and mac_destroy_label() from mac_framework.c to
mac_label.c, and use these instead of replicated code in the label zone
constructor and destructor.

Obtained from:	TrustedBSD Project
2006-12-28 21:15:37 +00:00
Robert Watson
ef136b272a Trim unneeded includes. 2006-12-28 21:07:45 +00:00
Robert Watson
224a974b9b Break contents of kern_mac.c out into two files following a repo-copy:
mac_framework.c   Contains basic MAC Framework functions, policy
                  registration, sysinits, etc.

mac_syscalls.c    Contains implementations of various MAC system calls,
                  including ENOSYS stubs when compiling without options
                  MAC.

Obtained from:	TrustedBSD Project
2006-12-28 20:52:02 +00:00
Robert Watson
471e5756ad Update MAC Framework general comments, referencing various interfaces it
consumes and implements, as well as the location of the framework and
policy modules.

Refactor MAC Framework versioning a bit so that the current ABI version can
be exported via a read-only sysctl.

Further update comments relating to locking/synchronization.

Update copyright to take into account these and other recent changes.

Obtained from:	TrustedBSD Project
2006-12-28 17:25:57 +00:00
Gleb Smirnoff
81ccbd956d A node that implements the Deflate sub-protocols of the Compression Control
Protocol (CCP).

Submitted by:	Alexander Motin <mav alkar.net>
2006-12-28 15:44:05 +00:00
Gleb Smirnoff
ccb07cc3db Before this commit, if the compression is enabled the, ng_ppp(4)
node would send every outgoing frame to the "compress" hook.
Packets received on the "compress" hook were expected to be
compressed and PROT_COMPD tag was put on them unconditionally.

After this commit an alternative compression mode can be set.
In this mode the node doesn't put the PROT_COMPD, the compressor
should put it itself. This is important for such kind of
compressors, that can submit uncompressed frames.

Before this commit, if the decompression is enabled, the ng_ppp(4)
node would send and incoming frame to the "decompress" hook
only if it has the PROT_COMPD proto tag on it.

After this commit an alternative decompression mode can be set.
In this mode the node sends all the incoming packets to the
decompression hook. This is important for such kind of compressors
that need uncompressed packets too, to keep their library in sync.

These new features will be used in new version of mpd4, and in new
compressor nodes.

Submitted by:	Alexander Motin <mav alkar.net>
2006-12-28 13:21:54 +00:00
Bruce Evans
276c702d8d Removed gratuitous cosmetic differences with the i386 version. This
mainly involves removing all __CC_SUPPORTS___INLINE__ ifdefs.  These
ifdefs are even less needed for amd64 than for i386, but the i386
atomic.h never had them.  The ifdefs here were just an optimization
of obsolescent compatibility cruft (__inline) for a null set of
compilers.  I think null sets of compilers should only be supported
in cases where this is more than an optimization, doesn't require
extensive ifdefs, and only involves not-so-obsolescent compatibility
cruft (plain inline here).
2006-12-28 08:15:14 +00:00
John Baldwin
9d1f363daf Disable MSI on the Intel E7505 chipset. It is reported broken on a Tyan
S2665ANF motherboard.

Reported by:	"Eugene M. Kim" <blue at white lv>
2006-12-28 06:14:42 +00:00
Sam Leffler
45fa8b0e9a o unbreak rate set defaulting
o mark 11g mode support on finding 11g or pure 11g (OFDM-only)
  channels; was requiring pure 11g which caused some contortions
  in drivers that manually setup their channel lists
2006-12-28 01:31:26 +00:00
Jung-uk Kim
7be240e621 Fix shared authentication mode. 2006-12-28 00:05:40 +00:00
Bruce Evans
26ab2d1d23 Avoid an instruction in atomic_cmpset_{int_long)() in most cases.
These functions are used a lot for mutexes, so this reduces the text
size of an average kernel by about 0.75%.  This wasn't intended to
be a significant optimization, but it somehow increased the maximum
number of packets per second that can be transmitted by my bge hardware
from 320000 to 460000 (this benchmark is CPU-bound and remarkably
sensitive to changes in the text section).

Details: we would prefer to leave the result of the cmpxchg in %al,
but cannot tell gcc that it is there, so we have to convert it to an
integer register.  We converted  to %al, then to %[re]ax, but the
latter step is usually wasted since gcc usually only wants the condition
code and can recover it from %al just as easily as from %[re]ax.  Let
gcc promote %al in the few cases where this is needed.

Nearby style fixes;
- let gcc manage the load of `res', and don't abuse `res' for a copy of `exp'
- don't echo `res's name in comments
- consistently spell the condition code as 'e' after comparison for equality
- don't hard-code %al anywhere except in constraints
- for the version that doesn't use cmpxchg, there is no requirement to use
  %al anywhere, so don't hard-code it in the constraints either.

Style non-fix:
- for the versions that use cmpxchg, keep using "a" (was %[re]ax, now %al)
  for the main output operand, although this is not required.  The input
  and output operands that use the "a" constraint are now decoupled, and
  this makes things clearer except for the reason that the output register
  is hard-coded.  It is now just a hack to tell gcc that the input "a" has
  been clobbered without increasing the number of operands.
2006-12-27 20:26:00 +00:00
Sam Leffler
aaa70f2f6f Add half/quarter rate 11a channel support:
o change handling of regdomain-related mib knobs so they can be set
  post-attach: regdomain, countrycode, outdoor, and xchanmode; the
  hal will not permit changing the regdomain but we expose it for now
o on regdomain/countrycode change recalculate the channel list and
  push it to the net80211 layer (NB: looks to need more tweaking)
o setup rate tables for half/quarter rate channels
o honor half/quarter rate channel configs when changing channels
o honor half/quarter rate channel configs when setting the slot time
o use hack/nonstandard channel numbering scheme for the public safety
  band to avoid overlapping 2.4G channels on dual-band cards
o remove setup of ic_sup_rates; the net80211 layer can do this for us
  and it simplifies handling of half/quarter rate channels

Tested only in Public Safety Band with cards that have RF5112.
2006-12-27 19:07:09 +00:00
Sam Leffler
41b3c790eb First cut at half/quarter-rate 11a channel support (e.g. for use
in the Public Safety Band):
o add channel flags to identify half/quarter-rate operation
o add rate sets (need to check spec on 4Mb/s in 1/4 rate)
o add if_media definitions for new rates
o split net80211 channel setup out into ieee80211_chan_init
o fixup ieee80211_mhz2ieee and ieee80211_ieee2mhz to understand half/quarter
  rate channels: note we temporarily use a nonstandard/hack numbering that
  avoids overlap with 2.4G channels because we don't (yet) have enough
  state to identify and/or map overlapping channel sets
o fixup ieee80211_ifmedia_init so it can be called post attach and will
  recalculate the channel list and associated state; this enables changing
  channel-related state like the regulatory domain after attach (will be
  needed for 802.11d support too)
o add ieee80211_get_suprates to return a reference to the supported rate
  set for a given channel
o add 3, 4.5, and 27 MB/s tx rates to rate <-> media conversion routines
o const-poison channel arg to ieee80211_chan2mode
2006-12-27 18:46:18 +00:00
Bruce Evans
b64728e55e After rev.1.169, the "interrupt" coalescing parameters are not used in
bge_intr().  Some of them are used in bge_poll().  Simplify by only
initializing these for polling mode and not toggling them when switching
modes.  This also fixes missing synchronization with the coalescing
engine in the toggling.
2006-12-26 18:33:55 +00:00
Jung-uk Kim
0c4578975e Back out revision 1.33. usb/98983 was misfiled and the patch had no effect.
The originator confirmed the adapter works fine without the patch.

Tested by:	Massimo Lusetti (mlusetti at gmail dot com)
2006-12-26 17:43:46 +00:00
Kip Macy
a8248daa3e turn non-INVARIANT KASSERT into an empty but real C
statement so that syntax errors will still be caught
even if INVARIANTS aren't enabled in the config file
2006-12-26 02:48:42 +00:00
Sam Leffler
b1d83a2508 add entry points required by newer broadcom wireless driver
PR:		kern/106131
Submitted by:	Scot Hetzel
MFC after:	2 weeks
2006-12-25 17:04:41 +00:00
Xin LI
44ecc8e382 Fix build 2006-12-25 17:03:04 +00:00
David Xu
016fa30228 break loop early if we know that there are at least two signals. 2006-12-25 03:00:15 +00:00
Kip Macy
35d16ac000 - add ranged shootdowns when fewer than 64 mappings are being invalidated 2006-12-25 02:05:52 +00:00
Yaroslav Tykhiy
9983b3c02d Note that rev. 1.221 introduced a local workaround for a general problem.
Add a pointer to the relevant PR for future reference.  The whole comment
will be OK to remove as soon as the general solution is applied.

PR:	kern/105943
2006-12-24 08:52:13 +00:00
Kip Macy
4654a1f82f - remove all calls to sched_pin and sched_unpin as they are only useful to
pmap on i386
- check for change in executable status in pmap_enter
- pmap_qenter and pmap_qremove only need to invalidate the range if one
  of the pages has been referenced
- remove pmap_kenter/pmap_kremove as they were only used by pmap_qenter
  and pmap_qremove
- in pmap_copy don't copy wired bit to destination pmap
- mpte was unused in pmap_enter_object - remove
- pmap_enter_quick_locked is not called on the kernel_pmap, remove check
- move pmap_remove_write specific logic out of tte_clear_phys_bit
- in pmap_protect check for removal of execute bit
- panic in the presence of a wired page in pmap_remove_all
- pmap_zero_range can call hwblkclr if offset is zero and size is PAGE_SIZE
- tte_clear_virt_bit is only used by pmap_change_wiring - thus it can be
  greatly simplified
- pmap_invalidate_page need only be called in tte_clear_phys_bit if there
  is a match with flags
- lock the pmap in tte_clear_phys_bit so that clearing the page bits is
  atomic with invalidating the page

- these changes result in 100s reduction in buildworld from a malloc backed
  disk to a malloc backed disk - ~2.5%
2006-12-24 08:03:27 +00:00
Kip Macy
5e296dbf52 Don't count on the first phys_avail range being greater than zero 2006-12-24 07:47:10 +00:00
Darren Reed
4012ba6ec7 TCP Window scaling was being recognised but the recorded settings were being
clobbered and thus effectively disabled.

MFC after:	7 days
2006-12-24 02:18:36 +00:00
Kip Macy
83e3f6ad3e - resizing the tte_hash in pmap_copy is not likely to occur
- the implementation also made the mistake of assuming the
  dst_pmap is the current pmap
2006-12-24 01:56:35 +00:00
David Xu
34e1241b9d Fix typo, p_slptime should be td_slptime. 2006-12-24 01:52:27 +00:00
Robert Watson
6baacecd1b Re-wrap comments following de-indentation. 2006-12-23 22:21:13 +00:00
Bruce M Simpson
a86ec33820 Drop all received data mbufs from a socket's queue if the MT_SONAME
mbuf is dropped, to preserve the invariant in the PR_ADDR case.

Add a regression test to detect this condition, but do not hook it
up to the build for now.

PR:             kern/38495
Submitted by:   James Juran
Reviewed by:    sam, rwatson
Obtained from:  NetBSD
MFC after:      2 weeks
2006-12-23 21:07:07 +00:00
Pav Lucistnik
35e0662415 Call vnode_create_vobject() in VOP_OPEN. Makes mmap work on UDF filesystem.
PR:		kern/92040
Approved by:	scottl
MFC after:	1 week
2006-12-23 18:53:22 +00:00
Alfred Perlstein
cc8317f2b0 Fix a deadlock in detach/shutdown.
The problem was that I was acquiring the driver sx lock and then waiting
for a taskqueue to drain, however the taskqueue itself would try to
acquire the lock as well leading to a deadlock.

To fix the problem roll my own exclusive lock that allows for lock
cancellation.  This is a normal exclusive lock, however if someone
marks it as "dead" then all waiters who request an error return will
get back an error instead of continuing to wait for the lock.

In this particular case, the shutdown and detach functions kill the
lock while the async task thread tries to acquire the lock but will
abort if the lock returns an error.

The other option was to drop the driver lock mid-detach and mid-shutdown,
mid-detach was a ok, however mid-shutdown was not.

While I'm here, fix a bug in what appears to be the mii link status
word in the softc going out to lunch.  Explicitly set the status
word to 1 after initializing the mii.  This would result in an interface
that would never respond to "if_start" requests as the mii interface
would always look down.
2006-12-23 17:18:18 +00:00
Remko Lodder
9409f9ed87 Fix a typo in ata-queue.c
PR:		kern/107100
Submitted by:	Stephen J. Roznowski <sjr at comcast dot net>
Approved by:	sos
2006-12-23 12:40:54 +00:00
David Xu
4b0f4e9d9e Fix a panic when rebooting a SMP machine, when option STOP_NMI is used,
nmi handler is used to stop other processors, nmi hander calls trap(),
however, trap() now accepts a pointer rather than a reference, this was
changed by kmacy@.
2006-12-23 03:30:50 +00:00
Robert Watson
afae638809 Update comments to reflect changes in the extattrctl() code.
Clean up comment formatting.

Obtained from:	TrustedBSD Project
2006-12-23 00:30:03 +00:00
Robert Watson
6c5b167508 Connect vfs_extattr.c to build by default. 2006-12-23 00:11:02 +00:00
Robert Watson
168d0553a3 Following a repo-copy of vfs_syscalls.c to vfs_extattr.c, remove
non-extattr functions from vfs_extattr.c, and extattr functions from
vfs_syscalls.c.

Change copyright/license on vfs_extattr.c to my copyright/license on
the extended attribute implementation (from extattr.h).

Clean up includes a bit.

Obtained from:	TrustedBSD Project
2006-12-23 00:10:36 +00:00
Robert Watson
0efd6615cd Move src/sys/sys/mac_policy.h, the kernel interface between the MAC
Framework and security modules, to src/sys/security/mac/mac_policy.h,
completing the removal of kernel-only MAC Framework include files from
src/sys/sys.  Update the MAC Framework and MAC policy modules.  Delete
the old mac_policy.h.

Third party policy modules will need similar updating.

Obtained from:	TrustedBSD Project
2006-12-22 23:34:47 +00:00
Ariff Abdullah
65de329ee2 Fix distorted sound on Intel Desktop Board D101GGC (ATI SB450/ALC861).
Turn on ALC861 quirk as default since it seems affecting all hardwares
with the same codec.

Reported/Tested by:	Darryl Yeoh <drl@MyBSD.org.my>
2006-12-22 11:55:59 +00:00
John Polstra
bf6ef57a40 Re-enable MSI support for those chips on which it is believed to work
properly.
2006-12-22 02:59:58 +00:00
John Polstra
65b8185c34 Correct the BGE_CHIPID_BCM5750_B0 constant.
MFC after:	1 week
2006-12-22 01:10:36 +00:00
Warner Losh
ee9391865e ACPIIO_BATT_GET_UNITS would always return ENXIO. However, it should never
return an error since it returns a count of battery devices in the system.
Set it to 0 explicitly, since it is the only switch branch that doesn't set
it.

# I guess no one uses it.
2006-12-22 00:57:26 +00:00
Matt Jacob
a2821e04a7 fix botch 2006-12-21 23:20:51 +00:00
Pawel Jakub Dawidek
297507d08c Document MTX_NOPROFILE flag. 2006-12-21 22:42:18 +00:00
Yaroslav Tykhiy
1ffe761633 Allow this module to get its options from the kernel build directory
instead of always hard coding them in CFLAGS.  POLA is kept here:
The module file built with GENERIC stays the same.

Tested with:	md5(1)
2006-12-21 21:35:49 +00:00
Matt Jacob
df82698084 Pay attention to return value from xpt_bus_register in xpt_init.
Obtained from:	Xin Li (Coverity)
MFC after:	3 days
2006-12-21 20:06:30 +00:00