Commit Graph

123221 Commits

Author SHA1 Message Date
Pawel Jakub Dawidek
8e88808915 md_hash field in g_eli_metadata structure is not 4 byte aligned, which
case panic on sparc64.

The problem is in MD5(9) implementation. The Encode() function takes
'unsigned char *output' as its first argument, which is then assigned to
'u_int32_t *op'. If the 'output' argument is not 4 byte aligned (and in
geli(8) case it is not), sparc64 machine will panic.

I don't know how to fix MD5(9) in a clean way, so I'm implementing a
work-around in geli(8).

Reported by:	brueffer
MFC after:	3 days
2006-03-30 14:41:13 +00:00
Lukas Ertl
ff91880e5d Protect from creating striped and RAID5 plexes with unequally sized
subdisks.
2006-03-30 14:01:25 +00:00
Ruslan Ermilov
03e21a94e4 Rebuild gensnmptree(1) on 700014 systems too. While 700014 corresponds
to post January 26 systems where gensnmptree(1) code was already fixed,
there was a timeframe between February 14 and February 27 when
usr.sbin/bsnmpd/ including gensnmptree was disconnected from build, so
if you upgraded in this timeframe, you ended up with the 700014 system
but still with a buggy gensnmptree binary.  This also means not being
able to buildworld now.

Reported by:	jhb
Attention:	harti, keramida
2006-03-30 13:50:48 +00:00
Pawel Jakub Dawidek
2e128ca835 - 'ndisks' variable is not boolean, so compare it with a value.
- Keep conditions order consistent with the comment above.

MFC after:	3 days
2006-03-30 12:15:41 +00:00
Tom Rhodes
639dab2286 Fix a bug where, for 6-byte sequences, the top 6 bits get compared to
111111 rather than the top 7 bits being compared against 1111110 causing
illegal bytes fe and ff being treated the same as legal bytes fc and fd.
2006-03-30 09:04:12 +00:00
Robert Watson
a260bd4131 Add IFF_NEEDSGIANT to kernel PPP support. I have no idea why this wasn't
here, but it should have been.

MFC after:	3 days
2006-03-30 08:18:27 +00:00
Paul Saab
74f7258fb7 regen for 32bit System V shared memory 2006-03-30 07:43:01 +00:00
Paul Saab
fbb273bc05 Properly support for FreeBSD 4 32bit System V shared memory.
Submitted by:	peter
Obtained from:	Yahoo!
MFC after:	3 weeks
2006-03-30 07:42:32 +00:00
Ariff Abdullah
844f9220aa Remove paranoid thread hijacking check. It cause wierd behaviour
(dangling channel - process association) especially in threaded
or fork()ed apps.
2006-03-30 06:17:03 +00:00
Marcel Moolenaar
0f0d108e27 In afd_describe(), don't initialize sizestring. On ia64, gcc(1) will
generate code that calls memset, which we don't have in the kernel.

MFC after: 3 days
2006-03-30 05:29:57 +00:00
Daniel Eischen
4c6aab055d Add __collate_load_error and __collate_range_cmp to the list of
FBSDprivate locale symbols.  These functions are needed by
libcompat.

Add _cleanup to the list of stdio FBSDprivate symbols.  Some
third party applications use this.  This will be removed and
replaced by fcloseall() once libc version is bumped.

Add _res to the list of resolv symbols.

Found by:	portbuilder runs (thanks Kris!)
2006-03-30 04:37:08 +00:00
Warner Losh
a49ed2a673 On some laptops, under very high loads, the socket event register read
in the ISR doesn't read the actual socket event register, but instead
reads garbage (usually 0xffffffff, but other times other things).
This totally violates the PCI spec, but happens rarely enough that a
workaround is in order.  This adds one test when we have a real
interrupt to service (which is very rare), and doesn't affect the
usualy 'nothing to see here' case at all.

Problem reported by many, but sam@ gave me this workaround after
diagnosing the problem.
2006-03-30 04:25:45 +00:00
Warner Losh
ee516cac43 Add a mask of valid socket events
While I'm hear, fix define<sp> to be define<tab>.
2006-03-30 04:12:28 +00:00
Marcel Moolenaar
793bcd17d5 Don't open if we're going away. 2006-03-30 03:26:52 +00:00
John-Mark Gurney
06f40e9610 document the tty files that uart(4) provides like sio(4) and pty(4) both
do..  This copies only part of the FILES section from sio(4)....

We might want to make tty(4) document the files provided, and have each of
these document the characters that it uses...

Pointed out by:	Yasholomew Yashinski
MFC after:	3 days
2006-03-30 02:27:25 +00:00
John Baldwin
4b3b0413d2 Always explicitly panic in propogate_priority() if we try to propogate
a lock's priority to a sleeping thread.  When we panic, dump a stack
trace of the thread that is asleep if DDB is compiled into the kernel
just before calling panic().  This is much more informative and useful
for debugging than the current behavior of getting a page fault and not
having an easy way of determining which thread caused the original problem.

MFC after:	1 week
2006-03-29 23:24:55 +00:00
Christian Brueffer
0e2ce5ce47 Autogenerate hardware notes for mfi(4). 2006-03-29 21:10:45 +00:00
Christian Brueffer
5bee0fd5d0 Mention that MegaRAID SAS controllers are supported by mfi(4). 2006-03-29 21:02:35 +00:00
Christian Brueffer
48c08eb834 Mention that amr(4) supports older MegaRAID hardware and clean up the
last vestiges of example.4.
2006-03-29 20:53:42 +00:00
Nate Lawson
6e8e1dbdba Fix printf arg on 64-bit arch by casting to an int. The IO port is never
more than a couple digits anyway.

Pointy hat to:	njl
2006-03-29 18:47:59 +00:00
John Baldwin
1aa4d65200 Move the PC_TO_I() and KCOUNT() macros so they aren't GUPROF specific
since they operate on fields of struct gmonparam which is not GUPROF
specific.

Approved by:	bde
Reported by:	alc
2006-03-29 18:17:03 +00:00
John-Mark Gurney
4e095bc045 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
Daniel Eischen
029c3cdf55 Add symbol versioning.
Reviewed by:	davidxu
2006-03-29 14:08:45 +00:00
Dag-Erling Smørgrav
4421d895a9 *thwack*! all the world's not i386.
Pointy hat to:	des
2006-03-29 12:29:01 +00:00
Scott Long
cf3dcc9f57 Teach sysinstall about mfi(4). 2006-03-29 10:02:26 +00:00
Scott Long
7f631a410c Hook the MFI driver up to the build. 2006-03-29 09:57:22 +00:00
Gregory Neil Shapiro
b41709e925 Spaces to tab 2006-03-29 07:50:58 +00:00
Gregory Neil Shapiro
2a1437c073 Add sendmail 8.13.4 -> 8.13.6 release note entry. 2006-03-29 07:48:45 +00:00
Scott Long
91c3e79059 Add a manual page for mfi(4). 2006-03-29 07:35:39 +00:00
Nate Lawson
dbcb35ffb9 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
Nate Lawson
87a500cd3b 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
Dag-Erling Smørgrav
1e5e6f25c5 Bring libpthread up to WARNS level 2.
Reviewed by:	deischen
2006-03-29 05:38:19 +00:00
Daniel Eischen
d688b9ce23 Account for recent changes in namespace.h. Use _pthread_create
instead of pthread_create.
2006-03-29 04:20:53 +00:00
Marius Strobl
9ed61314ff - 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 Strobl
93ff2bd5f8 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
Scott Long
aab582690e 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
Jason Evans
6b2c15da6a Add malloc_usable_size(3).
Discussed with:		arch@
2006-03-28 22:16:04 +00:00
Dag-Erling Smørgrav
adb19548bd Fix prototype mismatch and use of un-namespaced pthread functions. 2006-03-28 21:50:12 +00:00
Dag-Erling Smørgrav
552585665b Fix prototype mismatch. 2006-03-28 21:46:55 +00:00
John Baldwin
33f19bee6f - 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
John Baldwin
11178ee4c1 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
John Baldwin
a08d2e7fe1 - 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
John Baldwin
861dab08e7 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
John Baldwin
40ad471f8e 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
Daniel Eischen
2445cd7c11 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 Strobl
056b9d29b6 - 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 Strobl
20396fc150 - 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 Strobl
edff99cad1 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 Strobl
67be19576a 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
Dag-Erling Smørgrav
a0da77c91d Add semaphore functions, and remove some dupes from the #if 0 section. 2006-03-28 18:48:49 +00:00