Commit Graph

51705 Commits

Author SHA1 Message Date
Robert Watson
471135a3af Style cleanup: with removal of mutex operations, we can also remove
{}'s from securelevel_gt() and securelevel_ge().

MFC after:	1 week
2005-01-23 21:11:39 +00:00
Robert Watson
0b880542e6 When reading pr_securelevel from a prison, perform a lockless read,
as it's an integer read operation and the resulting slight race is
acceptable.

MFC after:	1 week
2005-01-23 21:01:00 +00:00
Robert Watson
4261ed50fd When retrieving the current per-jails securelevel for a sysctl read,
don't acquire the prison mutex, as it's an integer read and races
here don't make a difference.

MFC after:	1 week
2005-01-23 20:59:19 +00:00
Alan Cox
7258e9687b Correctly move the packet header in ip_insertoptions().
Reported by: Anupam Chanda
Reviewed by: sam@
MFC after: 2 weeks
2005-01-23 19:43:46 +00:00
Scott Long
d563f671c3 Fix whitespace 2005-01-23 16:13:10 +00:00
Robert Watson
20e3484680 Remove an obsoleted comment about struct versions.
MFC after:	3 days
Pointed out by:	trhodes
2005-01-23 14:26:09 +00:00
Julian Elischer
2f4829e6cb Add code to do better auto detection of tuner types etc.
PR:		kern/75831
Submitted by:	Branko Lankester <branko@euro.net>
MFC after:	1 week
2005-01-23 07:13:09 +00:00
Matt Jacob
796a9ee342 Remember to snag firmware for the DELL OEM (6312) card
MFC after:	2 days
2005-01-23 06:37:28 +00:00
Matt Jacob
1b94141649 Add some macros for inserting tag ids.
MFC after:	2 weeks
2005-01-23 06:28:49 +00:00
Matt Jacob
182d1c037e Macroize the making of tag ids.
MFC after:	2 weeks
2005-01-23 06:28:08 +00:00
Matt Jacob
99334b0de4 Roll minor number.
MFC after:	2 weeks
2005-01-23 06:27:05 +00:00
Matt Jacob
f2e4186204 Don't set ZIO for 23XX for target mode (use fast posting instead).
Use the correct number of handles for multihandle returns.

Very, very, rarely on some SMP systems we've seen an 'unstable' type
in the response queue. I dunno whether or not it's a bug in our
handling, or whether there's a cache incoherency issue, but
try to guard against it.

MFC after:	2 weeks
2005-01-23 06:26:45 +00:00
Matt Jacob
dd1419abe1 Support the DELL OEM 2312 cards (1077,6312).
Many thanks to Stormweb for making the h/w available for testing.

MFC after:	2 days
2005-01-23 06:23:55 +00:00
Warner Losh
784d07b40d Protect against wrapping. This appaers to fix some hangs that people
have seen in the isa pnp case where a resource buts up against
0xffffffff.  This would only impact when the board was booted without
ACPI.

Submitted by: Ed Maste (freebsd-stable <20050103145720.GA90754@sandvine.com>)
MFC After: 5 days
2005-01-23 03:03:58 +00:00
Matt Jacob
f4322bc884 This is a somewhat imperfect means to try and bring FreeBSD forward in
its ability to automatically scan and attach luns for modern storage
which has luns in the 0..1000 range, not 0..7.

The correct thing would be to do REPORT LUNS for devices whose LUN0
version shows a version >= SCSI3, but lacking that we should be able
to search higher than LUN 7 if we're >= SCSI3 with no ill effects.

This change keeps all of the QUIRK_HILUNS quirks, obeys the QUIRK_NOLUNS,
and introduces a QUIRK_NOHILUNS which will keep searches above LUN 7
happening for devices that report >= SCSI3 compliance. I doubt the latter
will be needed, but you never know.

This allowed me to randomly scan and attach  > 500 disks at a time in
a situation where quirking for QUIRK_HILUNS wasn't practical (the
vendor id and product id changes of the virtualization changes
constantly).

Reviewed by:	ken@freebsd.org, scottl@freebsd.org, gibbs@freebsd.org
MFC after:	2 weeks
2005-01-22 22:46:45 +00:00
Warner Losh
5fb99dcabe Bring in support for SUGOI LAN GIGA NIC made by System TALKS, Inc from
a RealTek 8169SB.

PR: 74262
Submitted by: Yoshikazu GOTO-san

# Submitter notes that he's unsure of the revision string for 8169SB
2005-01-22 22:40:53 +00:00
Robert Watson
5324bda309 When DDB is not defined, don't implement witness_thread_has_locks() and
witness_proc_has_locks(), as they are unused, which results in a compiler
error.  This problem was introduced with the implementation of "show
alllocks".

Spotted by:	Artem Kuchin <matrix at itlegion dot ru>
2005-01-22 21:14:21 +00:00
Sam Leffler
a8b16e8727 handle potential stale values of bssid in neighbor nodes that
can occur after an ibss merge

Submitted by:	David Young
2005-01-22 20:33:37 +00:00
Robert Watson
7e400ed143 Update mac_test for MAC Framework policy entry points System V IPC
objects (message queues, semaphores, shared memory), exercising and
validating MAC labels on these objects.

Submitted by:	Dandekar Hrishikesh <rishi_dandekar at sbcglobal dot net>
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, SPAWAR, McAfee Research
2005-01-22 20:31:29 +00:00
Sam Leffler
4ef04d32f3 when ssid suppression is enabled don't respond to probe requests
unless our ssid is specified
2005-01-22 20:31:22 +00:00
Sam Leffler
e5a96ac7fb be consistent in naming inactivity timers;
net.wlan.X.inact -> net.wlan.X.inact_run
2005-01-22 20:29:23 +00:00
Robert Watson
ba53d9c937 Update mac_stub for MAC Framework policy entry points System V IPC
objects (message queues, semaphores, shared memory).

Submitted by:   Dandekar Hrishikesh <rishi_dandekar at sbcglobal dot net>
Obtained from:  TrustedBSD Project
Sponsored by:   DARPA, SPAWAR, McAfee Research
2005-01-22 20:26:43 +00:00
Sam Leffler
a88be5f1ae o replace out-of-line copy of FCS w/ a flag that indicates the
frame includes FCS (requires applications to be updated, but since
  we weren't doing the out-of-line FCS stuff anyway app changes
  were needed already)
o add a flag to indicate padding exists between the 802.11 header and
  the payload (e.g. for Atheros cards)
o diff reducation against netbsd

MFC after:	1 week
2005-01-22 20:12:05 +00:00
Robert Watson
82d16d5e03 Implement MLS confidentiality protection for System V IPC objects
(message queues, semaphores, shared memory).

Submitted by:	Dandekar Hrishikesh <rishi_dandekar at sbcglobal dot net>
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, SPAWAR, McAfee Research
2005-01-22 20:11:16 +00:00
Robert Watson
842b39018a Implement Biba integrity protection for System V IPC objects (message
queues, semaphores, shared memory).

Submitted by:	Dandekar Hrishikesh <rishi_dandekar at sbcglobal dot net>
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, SPAWAR, McAfee Research
2005-01-22 20:07:11 +00:00
Pawel Jakub Dawidek
1db17c6db2 - Don't destroy UMA zone on error in mdcreate_malloc(), because we need it
in mddestroy() to properly free already allocated memory.
  This fixes a panic when we want to create too big memory backed device
  with preallocate memory (-o reserve).
- Remove redundant { }.

MFC after:	1 week
2005-01-22 19:56:03 +00:00
Alan Cox
75337a5677 Guard against address wrap in kernacc(). Otherwise, a program accessing a
bad address range through /dev/kmem can panic the machine.

Submitted by: Mark W. Krentel
Reported by: Kris Kennaway
MFC after: 1 week
2005-01-22 19:21:29 +00:00
Robert Watson
14cedfc842 Invoke label initialization, creation, cleanup, and tear-down MAC
Framework entry points for System V IPC shared memory.

Submitted by:	Dandekar Hrishikesh <rishi_dandekar at sbcglobal dot net>
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, SPAWAR, McAfee Research
2005-01-22 19:10:25 +00:00
Poul-Henning Kamp
9d3a77c463 Add a couple of mtx_asserts() to try to narrow down the window on
a bug repeatedly reported.
2005-01-22 19:08:50 +00:00
Robert Watson
a6009aa7c1 Invoke label initialization, creation, cleanup, and tear-down MAC
Framework entry points for System V IPC semaphores.

Submitted by:	Dandekar Hrishikesh <rishi_dandekar at sbcglobal dot net>
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, SPAWAR, McAfee Research
2005-01-22 19:04:17 +00:00
Robert Watson
e6a543f8db Invoke label initialization, creation, cleanup, and tear-down MAC
Framework entry points for System V IPC message queues.

Submitted by:	Dandekar Hrishikesh <rishi_dandekar at sbcglobal dot net>
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, SPAWAR, McAfee Research
2005-01-22 18:51:43 +00:00
Matt Jacob
c81d2c74ac Don't pass unadulterated unit numbers to make_dev and its ilk- if you
have more than 256 units, you die. Horribly. Convert them using
unit2minor.

MFC after:	1 week
2005-01-22 07:21:25 +00:00
David E. O'Brien
4d28b4d206 Embellish rev 1.61. If we're not building a debug kernel, use -O2 as before.
Submitted by:	ru
2005-01-22 00:58:34 +00:00
Bosko Milekic
eca64e79b5 s/round_page/trunc_page/g
I meant trunc_page.  It's only a coincidence this hasn't caused
problems yet.

Pointed out by: Antoine Brodin <antoine.brodin@laposte.net>
2005-01-22 00:09:34 +00:00
Warner Losh
327f4aba35 we don't need the offset in the attr memory to get the ethernet
address, nor do we need the alignment requirements, so eliminate them.
This likely means that we can now collapse some of the entries as we
have no need of them anymore (they match other entries and were there
only to get the right attr memory offset of the enet addr).
2005-01-21 19:51:23 +00:00
Lukas Ertl
f9b7569c09 Only report state changes of subdisks and plexes when there's
really a state change.

Reword the info a bit.
2005-01-21 18:27:23 +00:00
Lukas Ertl
0d93122102 Don't initialize error with ENXIO as we might end up here when
the plex has no more consumers (e.g. orphaning).
2005-01-21 18:24:20 +00:00
Hajimu UMEMOTO
5b8c5ac438 we don't need to make fake sockaddr_in6 to compare subject address.
MFC after:	1 week
2005-01-21 18:12:46 +00:00
Bosko Milekic
e4eb384b47 Bring in MemGuard, a very simple and small replacement allocator
designed to help detect tamper-after-free scenarios, a problem more
and more common and likely with multithreaded kernels where race
conditions are more prevalent.

Currently MemGuard can only take over malloc()/realloc()/free() for
particular (a) malloc type(s) and the code brought in with this
change manually instruments it to take over M_SUBPROC allocations
as an example.  If you are planning to use it, for now you must:

	1) Put "options DEBUG_MEMGUARD" in your kernel config.
	2) Edit src/sys/kern/kern_malloc.c manually, look for
	   "XXX CHANGEME" and replace the M_SUBPROC comparison with
	   the appropriate malloc type (this might require additional
	   but small/simple code modification if, say, the malloc type
	   is declared out of scope).
	3) Build and install your kernel.  Tune vm.memguard_divisor
	   boot-time tunable which is used to scale how much of kmem_map
	   you want to allott for MemGuard's use.  The default is 10,
	   so kmem_size/10.

ToDo:
	1) Bring in a memguard(9) man page.
	2) Better instrumentation (e.g., boot-time) of MemGuard taking
	   over malloc types.
	3) Teach UMA about MemGuard to allow MemGuard to override zone
	   allocations too.
	4) Improve MemGuard if necessary.

This work is partly based on some old patches from Ian Dowse.
2005-01-21 18:09:17 +00:00
Poul-Henning Kamp
27d62ec5a6 Remove prototype of undefined function so this compiles again. 2005-01-21 10:19:17 +00:00
Peter Wemm
b6e89c6d47 JumboMFi386: use bitmapped IPI handler. Update elcr and default mptable
config handler.  Tidy up various local apic initialization.
2005-01-21 06:01:20 +00:00
Peter Wemm
4fe91893a6 MFi386: handle PSL_T properly across fork. Typo fix. 2005-01-21 05:57:45 +00:00
Peter Wemm
ba2426ff44 MFi386: whitespace, copyright header, etc updates 2005-01-21 05:56:41 +00:00
Peter Wemm
6db058b5f1 MFi386: use %rip - 1 for the symbol search address (for noreturn funcs) 2005-01-21 05:54:05 +00:00
Warner Losh
3b36b3703e Rework pccard attachment a little. Now both of my fe based ethernet
cards work.  These changes depend on the expanded funce parsing that
just was committed to pccard_cis.c.  In NetBSD the ethernet address
was read out of attr memory directly.  We rely on the kernel pccard
parser to pulll this information out of what appears to be an obsolete
funce with the information in it.

# I'm still getting the no rx interrupt sometimes with some hub/switches
# for reasons unknown...  But usually only one and only when dhclient
# runs.
2005-01-21 02:14:40 +00:00
Warner Losh
9cdd39c25f Some older PC Cards have a weird format for FUNCE tuples. They appear
as type 0, rather than the usualy type 4.  Assume that this format is
from an old standard and go with it.  The Fujitsu FMV-186A and Silicom
Ethernet cards I have both have tuples with this format, and they are
both pretty old cards.

# if somebody knows for sure, please let me know.
2005-01-21 02:11:48 +00:00
Peter Grehan
94aa7aecdf Fix (accidental?) lock order reversal in pmap_remove. Found when
a process that has mmap'd device mem exits.
2005-01-21 01:02:38 +00:00
Paul Saab
f3f8276732 Remove 6422, V100 and add the P600.
Submitted by:	John Cagle
2005-01-20 22:51:38 +00:00
Olivier Houchard
a881074e10 Remove references to non-existing symbols DO_corb and got_mmu.
While I'm there, remove dead code.
2005-01-20 22:23:26 +00:00
Pawel Jakub Dawidek
857d14cbc9 Protect against recursive slices creation in simlar way as it is done
in BSD class, ie. if provider below us uses the same metadata, don't
create slices based on the metadata.
This allows to create slices on geoms with rank != 1 without hacks.

Discussed with:	phk
Approved by:	phk
MFC after:	2 weeks
2005-01-20 22:14:05 +00:00