Commit Graph

123711 Commits

Author SHA1 Message Date
Robert Watson
10702a2840 Abstract inpcb drop logic, previously just setting of INP_DROPPED in TCP,
into in_pcbdrop().  Expand logic to detach the inpcb from its bound
address/port so that dropping a TCP connection releases the inpcb resource
reservation, which since the introduction of socket/pcb reference count
updates, has been persisting until the socket closed rather than being
released implicitly due to prior freeing of the inpcb on TCP drop.

MFC after:	3 months
2006-04-25 11:17:35 +00:00
Mohan Srinivasan
2eafb39b67 Bump up the NFS server dupreq cache limit to 2K (from 64). With a small
duplicate request cache, under heavy load a lot of non-idempotent requests
were getting served again, resulting in errors.

Found by : Kris Kennaway.
2006-04-25 00:21:56 +00:00
Jung-uk Kim
daea0aad84 Check if reported HTT cores are physical cores. This commit does not
affect AMD CPUs at all because HTT bit is disabled earlier.  Intel
multicore CPUs and ULE scheduler may be affected.
2006-04-25 00:06:37 +00:00
Marcel Moolenaar
d94607de56 Revert previous commit. It's not part of the ppc(4) changes. 2006-04-24 23:36:32 +00:00
Marcel Moolenaar
cea4d8752f o Move ISA specific code from ppc.c to ppc_isa.c -- a bus front-
end for isa(4).
o  Add a seperate bus frontend for acpi(4) and allow ISA DMA for
   it when ISA is configured in the kernel. This allows acpi(4)
   attachments in non-ISA configurations, as is possible for ia64.
o  Add a seperate bus frontend for pci(4) and detect known single
   port parallel cards.
o  Merge PC98 specific changes under pc98/cbus into the MI driver.
   The changes are minor enough for conditional compilation and
   in this form invites better abstraction.
o  Have ppc(4) usabled on all platforms, now that ISA specifics
   are untangled enough.
2006-04-24 23:31:51 +00:00
Jung-uk Kim
091c9b4961 Add another Intel CPU feature flag, xTPR (Send Task Priority Messages). 2006-04-24 22:56:57 +00:00
Jung-uk Kim
cf24d86bcc Check if deterministic cache parameters leaf is valid before use. 2006-04-24 22:23:52 +00:00
Marcel Moolenaar
95eb1796b1 Remove the sab(4) manpage. 2006-04-24 21:42:28 +00:00
Marcel Moolenaar
a4facdd68b Remove the sab(4) driver. It is superseded by scc(4). 2006-04-24 21:40:58 +00:00
Colin Percival
8b4553119e Adjust dangerous-shared-cache-detection logic from "all shared data
caches are dangerous" to "a shared L1 data cache is dangerous".  This
is a compromise between paranoia and performance: Unlike the L1 cache,
nobody has publicly demonstrated a cryptographic side channel which
exploits the L2 cache -- this is harder due to the larger size, lower
bandwidth, and greater associativity -- and prohibiting shared L2
caches turns Intel Core Duo processors into Intel Core Solo processors.

As before, the 'machdep.hyperthreading_allowed' sysctl will allow even
the L1 data cache to be shared.

Discussed with:	jhb, scottl
Security:	See FreeBSD-SA-05:09.htt for background material.
2006-04-24 21:17:01 +00:00
Maxim Konovalov
481f8fe85f Inherit LOCAL_CREDS option from listen socket for sockets returned
by accept(2).

PR:		kern/90644
Submitted by:	Andrey Simonenko
OK'ed by:	mdodd
Tested by:	NetBSD regress/sys/kern/unfdpass/unfdpass.c
MFC after:	1 month
2006-04-24 19:09:33 +00:00
Diomidis Spinellis
148baf2e02 Add attribution: the quote comes from Perlis's Paradigms of AI Programming
p. 348.  See http://www.norvig.com/Lisp-retro.html
2006-04-24 12:13:02 +00:00
Xin LI
3b28c0c6f9 Move AHC_REG_PRETTY_PRINT and AHD_REG_PRETTY_PRINT below
their corresponding devices.
2006-04-24 08:44:34 +00:00
Robert Watson
c78cbc7b1d Instead of calling tcp_usr_detach() from tcp_usr_abort(), break out
common pcb tear-down logic into tcp_detach(), which is called from
either.  Invoke tcp_drop() from the tcp_usr_abort() path rather than
tcp_disconnect(), as we want to drop it immediately not perform a
FIN sequence.  This is one reason why some people were experiencing
panics in sodealloc(), as the netisr and aborting thread were
simultaneously trying to tear down the socket.  This bug could often
be reproduced using repeated runs of the listenclose regression test.

MFC after:	3 months
PR:		96090
Reported by:	Peter Kostouros <kpeter at melbpc dot org dot au>, kris
Tested by:	Peter Kostouros <kpeter at melbpc dot org dot au>, kris
2006-04-24 08:20:02 +00:00
Marcel Moolenaar
845652dd28 MFp4: Add the ipend() method to the serdev I/F to allow umbrella
drivers to obtain pending interrupt status from subordinate
	drivers.
2006-04-23 22:12:39 +00:00
Marcel Moolenaar
63f8efd314 MFp4: Calculate the divisor before setting the DLAB bit. This
prevents that there's a control flow that leaves the DLAB
	bit set.
2006-04-23 21:15:07 +00:00
Xin LI
b9fcadb97c Note FreeBSD-SA-06:14.fpu.asc 2006-04-23 20:19:03 +00:00
Robert Watson
0cec9959e8 Assert that sockets passed into soabort() not be SQ_COMP or SQ_INCOMP,
since that removal should have been done a layer up.

MFC after:	3 months
2006-04-23 18:15:54 +00:00
David Malone
89ddbd45e5 Add some new options to mac_bsdestended. We can now match on:
subject: ranges of uid, ranges of gid, jail id
	objects: ranges of uid, ranges of gid, filesystem,
		object is suid, object is sgid, object matches subject uid/gid
		object type

We can also negate individual conditions. The ruleset language is
a superset of the previous language, so old rules should continue
to work.

These changes require a change to the API between libugidfw and the
mac_bsdextended module. Add a version number, so we can tell if
we're running mismatched versions.

Update man pages to reflect changes, add extra test cases to
test_ugidfw.c and add a shell script that checks that the the
module seems to do what we expect.

Suggestions from: rwatson, trhodes
Reviewed by: trhodes
MFC after: 2 months
2006-04-23 17:06:18 +00:00
Robert Watson
19af5f6b17 style(9) treatment following fixups.
MFC after:	3 months
2006-04-23 16:33:56 +00:00
Robert Watson
f4b40382e3 Eliminate unnecessary use of labels in error unwinding cases; result is
the same number or fewer lines of code.

Don't cast using caddr_t.

Remember to unlock the natm lock in some error cases where it was leaked
previously.

Annotate two cases where we'd like to hold the natm subsystem lock over
ioctls into the device driver.

Hold the natm lock longer in natm_usr_connect() so we can copy the npcb
fields while holding the mutex.

MFC after:	3 months
2006-04-23 16:25:30 +00:00
Robert Watson
5da9a72fcf Acquire natm mutex after traversing so_pcb, not before, as the protocol
mutex is no longer required to ensure that so_pcb is valid.

Make sure to free (control) in natm_usr_send() when there M_PREPEND()
frees (m).

MFC after:	3 months
2006-04-23 16:04:07 +00:00
Robert Watson
28ea180136 Add missing 'not' to SQ_COMP comment.
MFC after:	3 months
2006-04-23 15:37:23 +00:00
Robert Watson
6ca35d4b81 Move handling of SQ_COMP exception case in sofree() to the top of the
function along with the remainder of the reference checking code.  Move
comment from body to header with remainder of comments.  Inclusion of a
socket in a completed connection queue counts as a true reference, and
should not be handled as an under-documented edge case.

MFC after:	3 months
2006-04-23 15:33:38 +00:00
Robert Watson
3f0c18fdda Update natm PCB debugging code:
- Depend on opt_ddb.h, since npcb_dump() is ifdef'd DDB.
- Include ddb/ddb.h so we can call db_printf() and use DB_SHOW_COMMAND().
- Don't test results of malloc() under DIAGNOSTIC, let the memory allocator
  take care of its own invariants.

MFC after:	1 month
2006-04-23 15:23:31 +00:00
Robert Watson
04f2073775 Modify in6_pcbpurgeif0() to accept a pcbinfo structure rather than a pcb
list head structure; this improves congruence to IPv4, and also allows
in6_pcbpurgeif0() to lock the pcbinfo.  Modify in6_pcbpurgeif0() to lock
the pcbinfo before iterating the pcb list, use queue(9)'s LIST_FOREACH()
for the iteration, and to lock individual inpcb's while manipulating
them.

MFC after:	3 months
2006-04-23 15:06:16 +00:00
Robert Watson
9106a6d6b0 Replace isn_mtx direct use with ISN_*() lock macros so that locking
details/strategy can be changed without touching every use.

MFC after:	3 months
2006-04-23 12:27:42 +00:00
David Xu
d96413eaa4 Remove multiple _get_curthread() calls. 2006-04-23 11:23:37 +00:00
Xin LI
61fb5e6e55 MFen 1.911 -> 1.914
Obtained from:	The FreeBSD Simplified Chinese Project
2006-04-23 09:40:44 +00:00
Hiroki Sato
80f4bf51a8 - Mark MFC'd items.
- Add some missing items:
	snd_ich(4) and snd_es137x(4) MPSAFE,
	bge(4) polling mode support,
	lge(4) MPSAFE,
	glabel NTFS support,
	/var/audit and audit group added,
	snapinfo(8) added, and
	groff 1.19.2 imported.
2006-04-22 23:02:29 +00:00
Olivier Houchard
477d836c4d MFother arches :
date: 2006/04/12 04:22:50;  author: alc;  state: Exp;  lines: +14 -41
Retire pmap_track_modified().  We no longer need it because we do not
create managed mappings within the clean submap.  To prevent regressions,
add assertions blocking the creation of managed mappings within the clean
submap.

Reviewed by: tegge
2006-04-22 22:51:32 +00:00
Robert Watson
4c0e8f41f6 Introduce a new TCP mutex, isn_mtx, which protects the initial sequence
number state, rather than re-using pcbinfo.  This introduces some
additional mutex operations during isn query, but avoids hitting the TCP
pcbinfo lock out of yet another frequently firing TCP timer.

MFC after:	3 months
2006-04-22 19:23:24 +00:00
Robert Watson
602cc7f12b Assert the inpcb lock when rehashing an inpcb.
Improve consistency of style around some current assertions.

MFC after:	3 months
2006-04-22 19:15:20 +00:00
Robert Watson
6466b28a40 Remove pcbinfo locking from in_setsockaddr() and in_setpeeraddr();
holding the inpcb lock is sufficient to prevent races in reading
the address and port, as both the inpcb lock and pcbinfo lock are
required to change the address/port.

Improve consistency of spelling in assertions about inp != NULL.

MFC after:	3 months
2006-04-22 19:10:02 +00:00
Marcel Moolenaar
4b1ead982e Revert part of previous commit. In alpha_platform_alloc_ide_intr(),
there's no RID for us to work with.
2006-04-22 19:04:21 +00:00
Daniel Eischen
babd660805 Oops, correct the weak reference (s/fclose/fcloseall).
Spotted by:	Antoine Brodin (antoine _dot_ brodin _at_ laposte _dot_ net)
2006-04-22 16:47:59 +00:00
Daniel Eischen
1aaee95a1d Bump __FreeBSD_version to reflect the addition of fcloseall() to libc. 2006-04-22 15:12:50 +00:00
Daniel Eischen
ca7f278f1d Now that libc has fcloseall(), remove _cleanup() from the list
of FreeBSD private symbols.
2006-04-22 15:11:33 +00:00
Daniel Eischen
28c94ec4cb Add a prototype for fcloseall(). 2006-04-22 15:10:11 +00:00
Daniel Eischen
b62c955c52 Add fcloseall() to libc. This removes the need to export _cleanup().
Linux also provides an fcloseall() implementation.

Discussed on:	arch
2006-04-22 15:09:15 +00:00
Christian Brueffer
5bb234b1a6 Correct two typos in comments. 2006-04-22 13:42:49 +00:00
Tom Rhodes
8b4b23668d Clean up, comment out non-base utilities, fix up comments.
Prodded by:	hrs
2006-04-22 11:02:44 +00:00
Ariff Abdullah
ee8e8d867e Add support for (latest) VIA VT8251 (rev. 0x07) audio controller.
A slight difference of this chip from its previous siblings is that
it need a gentle "wake up" on every (full) DMA buffer completion to
avoid stalled interrupt handler.

Thanks to George Hartzell for permission on doing remote debugging.

Prime MFC candidate for 6.1-RELEASE. Please reply to this commit if
there are any objections  (so I won't bug re@),  since the  changes
are too small and only specific to VT8251.

PR:		i386/95949
Tested by:	[1] George Hartzel
          	myself (remotely)
MFC after:	3 days

[1] http://lists.freebsd.org/pipermail/freebsd-multimedia/2006-April/004003.html
2006-04-22 09:44:00 +00:00
Tom Rhodes
7b3f1bbd61 Revert previous to this file before an actual request is made. 2006-04-22 04:22:15 +00:00
John-Mark Gurney
af3b868186 document the various bus_space_*_stream_? functions... 2006-04-22 03:58:41 +00:00
Joseph Koshy
ee8e4b36bb Fix a typo.
Submitted by:	Pawel Worach <pawel.worach at gmail dot com>
MFC after:	1 week
2006-04-22 03:04:24 +00:00
John Baldwin
f9ab2f134f Print td_name instead of p_comm if td_name is non-empty for
'show turnstile' and 'show sleepq'.
2006-04-21 20:40:43 +00:00
John Baldwin
cf93bc6617 Use LIST_FOREACH(). 2006-04-21 20:39:51 +00:00
Maxim Konovalov
1bc508492a o Do recrack(arguments) for commands which actually take NAME as
arguments so we do not coredump at "help foo", "back bar" and such.

o Be consistent and print argc - 1 as a command arguments number in
all cases.

PR:		bin/37096
Submitted by:	Joshua Goodall
MFC after:	1 month
2006-04-21 20:33:16 +00:00
Jung-uk Kim
1def0ca64d Free allocated environment variables after use.
Coverity ID:	366
Found by:	Coverity Prevent
2006-04-21 19:35:03 +00:00