Commit Graph

123509 Commits

Author SHA1 Message Date
jmg
fc54b4c090 hold the list lock over the f_event and KNOTE_ACTIVATE calls... This closes
a race where data could come in before we clear the INFLUX flag, and get
skipped over by knote (and hence never be activated, though it should of
been)...

Found by:	glebius & co.
Reviewed by:	glebius
MFC after:	3 days
2006-03-29 18:15:30 +00:00
deischen
b19d325a18 Add symbol versioning.
Reviewed by:	davidxu
2006-03-29 14:08:45 +00:00
des
c3c1cc1abc *thwack*! all the world's not i386.
Pointy hat to:	des
2006-03-29 12:29:01 +00:00
scottl
fd2f2128d5 Teach sysinstall about mfi(4). 2006-03-29 10:02:26 +00:00
scottl
725c458dc3 Hook the MFI driver up to the build. 2006-03-29 09:57:22 +00:00
gshapiro
4b284418b1 Spaces to tab 2006-03-29 07:50:58 +00:00
gshapiro
aa6e893e00 Add sendmail 8.13.4 -> 8.13.6 release note entry. 2006-03-29 07:48:45 +00:00
scottl
e5e7eeb18d Add a manual page for mfi(4). 2006-03-29 07:35:39 +00:00
njl
563f3ee2e4 Add a blacklist for bad IO ports that AML should never touch. It seems
some systems were designed so that AML writes to various resources shared
with OS drivers, including the RTC, PIC, PCI, etc.  These writes could
collide with writes by the OS and should never be performed.  For now, we
print a message if such an access occurs, but do not block it.  To block
the access, the tunable "debug.acpi.block_bad_io" can be set to 1.  In the
future, we will flip the switch and this will become the default.

Information about this problem was found in Microsoft KB 283649.  They
block IO accesses if the BIOS indicates via _OSI that it is Windows 2001
or higher.  They always block accesses to the PIC, cascaded PIC, and ELCRs,
no matter how old the BIOS.
2006-03-29 06:41:56 +00:00
njl
dbd623cfc1 Add reset register support. This is the only method to reboot some new
systems (blade servers).  On most systems, this is implemented as an IO
write to the SMI port and the BIOS generates the actual reset.

PR:		kern/94939
Submitted by:	dodell@ixsystems.com
Reviewed by:	jhb
MFC after:	3 weeks
2006-03-29 06:30:47 +00:00
des
590f74742c Bring libpthread up to WARNS level 2.
Reviewed by:	deischen
2006-03-29 05:38:19 +00:00
deischen
7415466d60 Account for recent changes in namespace.h. Use _pthread_create
instead of pthread_create.
2006-03-29 04:20:53 +00:00
marius
ea86aa3726 - We only lock the local per-CPU page in the local dTLB, so accessing the
foreign per-CPU pages in cpu_ipi_send() in order to get the module IDs
  of the other CPUs can cause a page fault. If this happens when doing a
  TLB shootdown while dealing with another page fault this causes a panic
  due to the recursive page fault. As I don't spot other code that assumes
  or requires that accessing foreign per-CPU pages must not page fault
  solve this by adding a statically allocated (and therefore locked in the
  kernel pages) array which establishes a FreeBSD CPU ID -> module ID
  relation and use that in cpu_ipi_selected() (instead of statically
  allocating the per-CPU pages which would just waste memory on say a dual
  CPU machine as sun4u theoretically supports up to 128 CPUs or wasting
  dTLB slots for the foreign per-CPU pages). [1]
- Fix a potential race in cpu_ipi_send(); as we don't serialize the access
  to cpu_ipi_selected() between MI and MD use (only MI-MI and MD-MD) we
  might catch the NACK bit caused by sending another IPI. Solve this by
  checking the NACK bit in the contents of the interrupt dispatch status
  reg read while interrupts were still turned off instead of reading that
  reg anew after interrupts were turned on again. This is also what the
  CPU docs suggest to do.
- Add a workaround for the SpitFire erratum #54 bug (affecting interrupt
  dispatch). While public info regarding what this CPU bug actually causes
  is not available testing shows that with the workaround in place it's
  less likely to get a "couldn't send ipi" panic, it doesn't solve these
  panics entirely though. [2]

Reported by:		kris [1]
Some clue from:		kmacy [1]
Info from:		Linux, OpenSolaris [2]
Additional testing by:	kris
MFC after:		3 days
2006-03-29 00:14:08 +00:00
marius
98a829e8ea Add convenience macros for the bits in ASI_ESTATE_ERROR_EN_REG (used
for ECC handling) and the additional uses of the ASIs 0x77 and 0x7f
as well as their bits (used for a CPU bug workaround).

MFC after:	3 days
2006-03-29 00:08:48 +00:00
scottl
cb08e1b408 Fix 64-bit DMA. The problem was an incorrect flag check. Thanks to Paul
Saab for helping to track this down.  Fix a error with 32bit DMA size
calculation that seemed to be harmless.  Add a few micro-optimizations while
I'm here.
2006-03-28 23:59:07 +00:00
jasone
1a854b0cf7 Add malloc_usable_size(3).
Discussed with:		arch@
2006-03-28 22:16:04 +00:00
des
91d320d3aa Fix prototype mismatch and use of un-namespaced pthread functions. 2006-03-28 21:50:12 +00:00
des
5438ed2ce6 Fix prototype mismatch. 2006-03-28 21:46:55 +00:00
jhb
44f0d9f519 - Conditionalize Giant around VFS operations for ALQ, ktrace, and
generating a coredump as the result of a signal.
- Fix a bug where we could leak a Giant lock if vn_start_write() failed
  in coredump().

Reported by:	jmg (2)
2006-03-28 21:30:22 +00:00
jhb
0d8b767dc8 Conditionalize locking of Giant for VFS in acct(2). We already
conditionally acquired Giant in the other parts of the accounting code.
2006-03-28 21:26:59 +00:00
jhb
63f561c624 - Conditionally acquire Giant in mdstart_vnode(), mdcreate_vnode(), and
mddestroy() only if the file is from a non-MPSAFE VFS.
- No longer unconditionally hold Giant in the md kthread for vnode-backed
  kthreads.
- Improve the handling of the thread exit race when destroying an md
  device.
2006-03-28 21:25:11 +00:00
jhb
ec112a33cb Change vn_open() to honor the MPSAFE flag in the passed in nameidata object
and use that instead of testing fdidx against -1 to determine if it should
release Giant if Giant was locked due to the requested file residing on a
non-MPSAFE VFS.

Discussed with:	jeff
2006-03-28 21:22:08 +00:00
jhb
1e32aa137d Use the read_cycle_count() function recently added for cpu_ticks() for
get_cyclecount() as that results in a saner value and makes schedgraph
much happier on Alpha.  (schedgraph doesn't handle the fact that the
counters are out of sync though)
2006-03-28 21:20:12 +00:00
deischen
776daae39d Use the correct type for and argument. Recent changes to namespace.h
exposed this bug.

Reported by:	kris
2006-03-28 21:07:59 +00:00
marius
8aaa7c780c - Add a comment describing why tick_init() is called before cninit().
- Fix a typo in another comment.
2006-03-28 20:28:31 +00:00
marius
d6a3e171f0 - Move the check for too high HZ values from tick_init() to tick_start()
as we have to call tick_init() before cninit() in order to provide the
  low-level console drivers with a working DELAY() which in turn means we
  cannot use panic() in tick_init().
- s,to high, too high, in the panic string

Inspired by:	kmacy's sun4v changes
MFC after:	3 days
2006-03-28 20:25:46 +00:00
marius
e3b3837a25 Add convenience macros for the full register set and use them to replace
magic constants in clkbrd.c

Info from:	OpenSolaris
2006-03-28 19:46:48 +00:00
marius
e2e06058c4 Sync with the other archs and declare the memory location referenced by
the address argument of the bus_space_write_multi_*() familiy as const.

Prodded by:	damien
2006-03-28 19:19:37 +00:00
des
04272f39a0 Add semaphore functions, and remove some dupes from the #if 0 section. 2006-03-28 18:48:49 +00:00
pjd
46a2a98421 Preserve previous behaviour of kern.geom.raid3.n{64,16,4}k tunables were 0
means unlimited.

Reported by:	ru
MFC after:	3 days
2006-03-28 18:34:36 +00:00
simon
d970ab3c6c Remove redundant ike rc.d script, since we do not have an IPsec IKE
daemon in the base system and all the IKE daemons in the Ports
Collection has their own rc.d script.

OK'ed by:	dougb
Discussed on:	freebsd-rc
MFC after:	1 month
Approved by:	cperciva (mentor)
2006-03-28 18:28:33 +00:00
des
ccc2cbd6d1 Don't use dbg if it isn't defined (such as when this file is used by
code outside of rtld-elf)
2006-03-28 18:28:07 +00:00
des
eaebf6a04f Use C99's varadic macro syntax instead of gcc's. 2006-03-28 18:26:47 +00:00
des
da0340f07c Add a bunch of missing pthread functions, and move out-of-order functions. 2006-03-28 16:41:06 +00:00
jkoshy
eabf8d07b4 Remove unused symbols. 2006-03-28 16:20:29 +00:00
cognet
bd709e5883 Don't call audit_logout() if pwd is NULL, as audit_logout() attempts to
dereference it.
This will happen if we ^D at the Login: prompt without having provided a
valid login before.
Set pwd to NULL on bad login attempts to prevent audit_logout() from being
called for a user which didn't actually log on.

Reported by:    Jerome Magnin jethro at docisland dot org
2006-03-28 15:30:42 +00:00
mlaier
332f3f5a7b Document authpf's requirement for a mounted fdescfs(5).
PR:		docs/89635
MFC after:	1 day
2006-03-28 15:26:16 +00:00
des
af5e05fb0b Use wrapper macros for atomic pointer operations in order to perform the
correct casts.  This should probably be merged to other architectures.
2006-03-28 14:34:48 +00:00
des
bb98a84658 Revert previous commit at davidxu's insistance. Instead, use __DECONST
(argh!) and rearrange the prototypes to make it clear that _umtx_op()
is not deprecated.
2006-03-28 14:32:38 +00:00
jkoshy
1ad16902d3 Forcibly turn off all PMCs at module unload time.
MFC after:	1 week
2006-03-28 14:09:21 +00:00
dwmalone
b5db288bf6 This comment on various IPPORT_ defines was copied from in.h and
probably never fully applied to IPv6. Over time it has become more
stale, so replace it with something more up to date.

Reviewed by:	ume
MFC after:	1 month
2006-03-28 12:51:22 +00:00
rwatson
61ae660ca7 Remove manual assignment of m_pkthdr from one mbuf to another in
ipsec_copypkt(), as this is already handled by the call to M_MOVE_PKTHDR(),
which also knows how to correctly handle MAC m_tags.  This corrects a panic
when running with MAC and KAME IPSEC.

PR:		kern/94599
Submitted by:	zhouyi zhou <zhouyi04 at ios dot cn>
Reviewed by:	bz
MFC after:	3 days
2006-03-28 10:16:38 +00:00
des
ea21aeb859 The undocumented and deprecated system call _umtx_op() takes two pointer
arguments.  The first one is never used (all callers pass in 0); the
second is sometimes used to pass in a struct timespec * which is used as
a timeout and never modified.  Constify that argument so callers can pass
a const struct timespec * without jumping through hoops.
2006-03-28 09:18:34 +00:00
pjd
0b67f9b4ea Fix memory leak which occurs when crypto.ko module is unloaded.
Discussed with:	sam
MFC after	3 days
2006-03-28 08:33:30 +00:00
ume
39501d50fa If the query choked with EDNS0, retry without EDNS0.
Obtained from:	res_nquery() of BIND9.
2006-03-28 07:42:57 +00:00
davidxu
88e93ccaa9 Er, forgot to clear tls space to zero for Variant II. 2006-03-28 06:14:22 +00:00
davidxu
f8168da7cf Allocate space for thread pointer, this allows thread library to access
its pointer from begin, and simplifies _get_curthread() in libthr.
2006-03-28 06:09:24 +00:00
scottl
b99f1961b8 Handle invalid capacity parameters from the firmware. 2006-03-28 01:59:11 +00:00
deischen
d76f24935a Add symbol versioning to libm. 2006-03-27 23:59:45 +00:00
ache
593cd30b45 Merge conflicts after official patches 2006-03-27 23:53:05 +00:00