Commit Graph

34077 Commits

Author SHA1 Message Date
rwatson
2de72eb7f5 Correct a bug introduced in 1.26: M_PKTHDR is set in the 'flags'
argument, not the 'type' argument.  As a result of the buf, the
MAC label on some packet header mbufs might not be set in mbufs
allocated using m_getcl(), resulting in a page fault.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-08-07 20:15:29 +00:00
tmm
2b807b6abc Use the CPU_* OID constants instead of OID_AUTO for the clock-related
sysctls for compatability with old applications.
2002-08-07 19:43:54 +00:00
alc
88f95af1ed o Introduce pmap_page_is_mapped(). Its purpose is to obsolete
the PG_MAPPED flag.
2002-08-07 19:37:22 +00:00
rwatson
4d0a996d18 Cache the credential provided during accton() for use in later accounting
vnode operations.  This permits the rights of the user (typically root)
used to turn on accounting to be used when writing out accounting entries,
rather than the credentials of the process generating the accounting
record.  This fixes accounting in a number of environments, including
file systems that offer revocation support, MAC environments, some
securelevel scenarios, and in some NFS environments.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-08-07 19:30:16 +00:00
alc
40626b3576 o Introduce pmap_page_is_mapped(). Its purpose is to obsolete
the PG_MAPPED flag.
2002-08-07 18:03:00 +00:00
rwatson
647037845a Refresh the credential on the first initproc thread following divorcing
the initproc credential from the proc0 credential.  Otherwise, the
proc0 credential is used instead of initproc's credentil when authorizing
start_init() activities prior to initproc hitting userland for the
first time.  This could result in the incorrect credential being used
to authorize mounting of the root file system, which could in turn cause
problems for NFS when used in combination with uid/gid ipfw rules, or
with MAC.

Discussed with:	julian
2002-08-07 17:53:31 +00:00
luigi
2573e2eec1 Use new interface for ether_input().
Remove some unnecessary assignments to mbuf fields in sis_newbuf(),
the "length" fields are of no use while the mbuf is in the receive ring.

MFC after: 3 days
2002-08-07 16:08:54 +00:00
iwasaki
c395ac01ee Improve stack manipulation code of ACPI wakeup routine.
The new code just override stack top value with saved return address
rather than pop/push operation.

Submitted by:	jhb
2002-08-07 12:48:28 +00:00
mdodd
81d5cd61a7 Move code block added in 1.157 to a safer part of fork1().
Submitted by:	 jake
2002-08-07 11:31:45 +00:00
imp
836a5bf4a5 Add Intersil and Symbol as vendors for 802.11 cards that the wi driver
supports.

Obtained from: NetBSD
2002-08-07 05:40:34 +00:00
iedowse
9e1cd6cb85 Our awk does not implement the ARGIND variable, so we were attempting
to parse the binary .kld file as a list of symbols. Fix this by
simply deleting the unwanted argument from the ARGV[] array instead
of trying to skip over it.
2002-08-06 19:31:04 +00:00
alc
a7174d2f86 Set the ident field of the struct kevent that is registered by _aio_aqueue()
to the address of the user's aiocb rather than the kernel's aiocb.  (In other
words, prior to this change, the ident field returned by kevent(2) on
completion of an AIO was effectively garbage.)

Submitted by:	Romer Gil <rgil@cs.rice.edu>
2002-08-06 19:01:08 +00:00
jake
ea746a5dab Remove new console devices with cnremove before initializing them in
cninit.  This allows a console driver to replace the existing console
by calling cninit again, eg during the device probe.  Otherwise the
multiple console code sends output to both, which is unfortunate if
they're using the same hardware.
2002-08-06 18:56:41 +00:00
fjoe
ed392d3011 printf() formats fixes 2002-08-06 17:00:02 +00:00
bde
2e0be03c3e Try harder to "set signal flags proprly [sic] for ast()". See rev.1.154. 2002-08-06 15:22:09 +00:00
rwatson
63281d6d63 Regen. 2002-08-06 15:16:55 +00:00
rwatson
78fda4925f Rename mac_policy() to mac_syscall() to be more reflective of its
purpose.

Submitted by:	cvance@tislabs.com
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-08-06 15:15:53 +00:00
truckman
6473035499 Don't automagically call vslock() from SYSCTL_OUT(). Instead, complain
about calls to SYSCTL_OUT() made with locks held if the buffer has not
been pre-wired.  SYSCTL_OUT() should not be called while holding locks,
but if this is not possible, the buffer should be wired by calling
sysctl_wire_old_buffer() before grabbing any locks.
2002-08-06 11:28:09 +00:00
benno
81be47f1e1 Connect bmtphy to the mii module build.
Forgotten a long time ago by:	benno
2002-08-06 06:09:47 +00:00
silby
23c761aa82 Handle PMTU discovery in syn-ack packets slightly differently;
rely on syncache flags instead of directly accessing the route
entry.

MFC after:	3 days
2002-08-05 22:34:15 +00:00
pb
bfe148fa25 Fix typo in vnode flags causing deadlock in msdosfs_fsync().
Reviewed by:	jeff
2002-08-05 21:07:30 +00:00
alc
98877a3b30 o The introduction of kevent() broke lio_listio(): _aio_aqueue() thought
that LIO_READ and LIO_WRITE were requests for kevent()-based
   notification of completion.  Modify _aio_aqueue() to recognize LIO_READ
   and LIO_WRITE.

Notes: (1) The patch provided by the PR perpetuates a second bug in this
code, a direct access to user-space memory.  This change fixes that bug
as well. (2) This change is to code that implements a deprecated interface.
It should probably be removed after an MFC.

PR:		kern/39556
2002-08-05 19:14:27 +00:00
fjoe
7bf0358c9b Make driver portable:
- bus_space'ify
- generate fake ethernet address using read_random() instead of reading
from timer i/o ports

Other minor fixes:
- remove "hack" in connect_to_master()
- use M_ZERO
- remove unused variable in sbni_ioctl()
- properly release irq in sbni_attach_isa() on attach errors
2002-08-05 18:14:16 +00:00
iedowse
504ae196a9 Don't call softdep_slowdown() if soft updates are not active on the
filesystem. This causes a panic for kernels compiled without
softupdates.

Reported by:	luigi
2002-08-05 17:59:20 +00:00
fjoe
5020fa3b22 back out one change that crept in (will be committed later) 2002-08-05 17:32:16 +00:00
fjoe
d8fc8f4943 style fixes 2002-08-05 17:20:17 +00:00
des
3b4ccdf949 Check the far end before registering an EVFILT_WRITE filter on a pipe. 2002-08-05 15:03:03 +00:00
silby
739c46b18b Make sure to set the DMA transfer length register, plus one
small style fix.

Submitted by:	Thomas Nystrom <thn@saeab.se>
2002-08-05 13:24:06 +00:00
jeff
e50cd4d249 - Document more of the struct vnode locking protocol.
- Slightly reformat a comment block.
2002-08-05 10:25:56 +00:00
jeff
f91961bfed - Move some logic from getnewvnode() to a new function vcanrecycle()
- Unlock the free list mutex around vcanrecycle to prevent a lock order
   reversal.
2002-08-05 10:15:56 +00:00
jeff
fbb42c58e2 - Move a VOP assert to the right place.
Spotted by:	i386 tinderbox
2002-08-05 08:55:53 +00:00
jeff
fcdac052f8 - Add a missing VI_UNLOCK to an error case in nfs_flush. 2002-08-05 08:54:29 +00:00
imp
1e47b78a27 Fix minor typo in ID number in last commit 2002-08-05 07:48:31 +00:00
imp
c4f3562c5c A definition of regulatory domains that matches the docs. 2002-08-05 07:45:57 +00:00
imp
317f436475 Differentiate between AT45DB011 compatible large serial flash parts
and the AT24C08 small serial flash parts.  We still report these as
the same part (since we group things already), but now we recognize
the small serial versions as well.
2002-08-05 07:24:02 +00:00
imp
5454e6118c Add a comment that says it looks like lucent cards have a primary
firmware revision as well (not sure which firmware versions are needed
for this, but the 6.x and 8.x 'software' versions that I have seem to
support it).

Add dBm comm quality RID.  This is like the normal comm quality rid,
except the signal and noise numbers are normalized to dBm.  Some
revisions of the prism firmware, however, don't support this RID, and
some that do support it return 0 for quality and/or noise.  Your
milage may vary.
2002-08-05 07:19:27 +00:00
peter
273b24988c Revert rev 1.356 and 1.352 (pmap_mapdev hacks). It wasn't worth the
pain.
2002-08-05 06:10:03 +00:00
alfred
e7bcbc4dbf Add a macro for SLIST traversal 'SLIST_FOREACH_PREVPTR',
this macro keeps a pointer to the previous element's next
pointer to allow for search and O(1) removal.
2002-08-05 05:18:43 +00:00
alfred
0a5393ffc8 Cleanup:
Fix line wrapping.
Remove 'register'.
malloc(9) with M_WAITOK can't fail, so remove checks for that.
2002-08-05 05:16:09 +00:00
alc
e363dee16b o Introduce pmap_page_is_mapped(). Its purpose is to obsolete
the PG_MAPPED flag.
2002-08-05 03:40:28 +00:00
luigi
6e0282cae2 Use m_getcl() to allocate buffers for the receive ring.
MFC after: 3 days
2002-08-05 00:21:24 +00:00
alc
3b63a2bd2b o Don't set PG_MAPPED or PG_WRITEABLE when a page is mapped
using pmap_kenter() or pmap_qenter().
 o Use VM_ALLOC_WIRED in pmap_new_thread().
2002-08-05 00:04:18 +00:00
luigi
a86f01c717 Extend the interface to ether_input(): a NULL eh pointer means that
the mbuf contains the ethernet header (eh) as well, which ether_input()
will strip off as needed.

This permits the removal (in a backward compatible way) of the
header removal code which right now is replicated in all drivers,
sometimes in an inconsistent way. Also, because many functions
called after ether_input() require the eh in the mbuf, eventually
we can propagate the interface and handle outdated drivers just
in ether_input().

Individual driver changes to use the new interface will follow as
we have a chance to touch them.

NOTE THAT THIS CHANGE IS FULLY BACKWARD COMPATIBLE AND DOES NOT BREAK
BINARY COMPATIBILITY FOR DRIVERS.

MFC after: 3 days
2002-08-04 23:55:06 +00:00
luigi
eab6aceed8 Fix handling of Receiver Not Ready errors when doing polling.
Also take this chance to cleanup the code in fxp_intr_body.

Add a missing block of code to disable interrupts when
reinitializing the interface while doing polling (the RELENG_4
version was correct).

MFC after: 3 days
2002-08-04 22:33:28 +00:00
luigi
10249f9449 Use m_getcl() to allocate mbuf+cluster for the receive ring.
Remove the sis_quick variable, as it was there for testing purposes
only.

MFC after: 3 days
2002-08-04 21:52:05 +00:00
luigi
0bfe37b8a2 Temporarily disable polling when no processes are active, while I
investigate the problem described below.

I am seeing some strange livelock on recent -current sources with
a slow box under heavy load, which disappears with this change.
This might suggest some kind of problem (either insufficient locking,
or mishandling of priorities) in the poll_idle thread.
2002-08-04 21:00:49 +00:00
phk
53609e4de1 Repond properly to NGM_TEXT_CONFIG messages. 2002-08-04 20:50:50 +00:00
luigi
056c90a35e bugfix: move check for udp_blackhole before the one for icmp_bandlim.
MFC after: 3 days
2002-08-04 20:50:13 +00:00
mike
fb6cd3904f Fix typo in the last revision.
Noticed by:	i386 tinderbox
2002-08-04 19:34:38 +00:00
jake
3b16da9c19 se -> sab. 2002-08-04 19:07:15 +00:00