Commit Graph

88460 Commits

Author SHA1 Message Date
Matthew N. Dodd
533294b956 - Don't call pci_enable_io() in drivers (unless needed for resume).
- Don't test memory/port status and emit an error message; the PCI
  bus code will do this now.
2003-04-16 03:16:57 +00:00
Matthew N. Dodd
c047e5b1a9 Return status for PCI methods '{enable,disable}_{io,busmaster}'.
Reviewed by:	imp
2003-04-16 03:15:08 +00:00
Greg Lehey
9dc7076193 Clarify US events which may not be so obvious to non-US Americans. 2003-04-16 02:19:27 +00:00
Greg Lehey
19199417fc Clarify that holidays are US holidays. Many conflict with similarly
named holidays in other countries.
2003-04-16 02:18:30 +00:00
Garrett Wollman
66a0371731 Update for the two most recent newsletters from ISO 3166/MA. 2003-04-16 02:13:21 +00:00
Marcel Moolenaar
146324b0d2 Add the EHCI host controller. 2003-04-16 01:29:08 +00:00
Jake Burkholder
5ee414278f Hardlink sunlabel to disklabel so make release is happy. (This only affects
sparc64, where bsd^H^H^Hdisklabel isn't built.)
2003-04-15 23:49:31 +00:00
Jake Burkholder
d2f46c9060 - Use read(2) to get the existing sunlabel on a disk, instead of parsing
kern.geom.conftxt, which md disks don't show up in.  If the magic and
  the checksum are right assume its a valid sunlabel, otherwise use the
  DIOC ioctls to get the disk parameters and whip up a label out of thin
  air.
- Don't just silently create or correct invalid c partitions, warn about
  invalid ones in label proto files.
- Split checksumming into a function since we do it a couple times.  Also
  don't include the sl_cksum field in the checksum, which avoids needing
  to clear it first.

This is makes sunlabel a suitable replacement for disklabel in make release.
2003-04-15 23:46:19 +00:00
Tom Rhodes
c1e3a71e35 Catch this file up with rc.conf(5).
Submitted by:	Simon L. Nielsen <simon@nitro.dk> (original version)
2003-04-15 21:48:40 +00:00
Poul-Henning Kamp
18b492fc8c Bump the config version to force people to upgrade their config(8)
so the fix for emitting multiple instances of .o files will prevent
link errors on LINT.
2003-04-15 21:29:11 +00:00
Maxime Henrion
4cc07f169c Add a note about the work I did for fxp(4) here. 2003-04-15 21:21:36 +00:00
Robert Watson
0712b25402 Modify mac_test policy to invoke WITNESS_WARN() when a potentially
blocking allocation could occur as a result of a label
initialization.  This will simulate the behavior of allocated
label policies such as MLS and Biba when running mac_test from
the perspective of WITNESS lock and sleep warnings.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-04-15 21:20:34 +00:00
John Baldwin
4a87a5eecd Add an example of how to use the -m option that clarifies how the bits in
the mask correspond to slice numbers.  Also, clarify the description of the
existing example.

Requested by:	Larry Rosenman <ler@lerctr.org>
2003-04-15 21:03:19 +00:00
John Baldwin
8667535d13 NO_COMPAT_FREEBSD4 is no longer used. 2003-04-15 20:59:43 +00:00
Robert Watson
9a1b0237a7 Enable the MAC_ALWAYS_LABEL_MBUF flag for the Biba, LOMAC, MLS, and Test
policies.  Missed in earlier merge.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-04-15 20:51:18 +00:00
Robert Watson
3757e11997 Re-add MUTEX_DEBUG and MUTEX_PROFILING, which got hosed by rejected
chunks from bde's patch.

Spotted by:	jhb
2003-04-15 20:49:48 +00:00
John Baldwin
5716b68f9d Remove empty simulator options section and add an ABI emulation section.
Add COMPAT_OSF1, COMPAT_LINUX, and LINPROCFS options to the ABI emulation
section.
2003-04-15 20:21:56 +00:00
Robert Watson
d971c22b4a Improve consistency, ordering, style of options:
- Remove extra blank lines
- Sort options
- Remove comments that belong in NOTES

Submitted by:	bde (older revision)
2003-04-15 19:43:52 +00:00
Warner Losh
7f2af527b0 When the driver allocates memory or I/O ports, enable that bit in the
command config register.  At the present, this represents a nop
because these bits should have been set earlier in the process.  In
the future, we'll only set these bits when the driver requests the
resource, not when the bus code detects the resource.

Reviewed by: mdodd
2003-04-15 19:38:18 +00:00
Robert Watson
6d1a6a9a9a mac_init_mbuf_tag() accepts malloc flags, not mbuf allocator flags, so
don't try and convert the argument flags to malloc flags, or we risk
implicitly requesting blocking and generating witness warnings.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-04-15 19:33:23 +00:00
Alexander Kabaev
8e04260639 Remove the only varargs.h consumer in the tree. Use stdarg.h instead. 2003-04-15 18:59:22 +00:00
Philippe Charnier
2d5506c942 Revert the zombie part of previous commit 2003-04-15 18:49:20 +00:00
Max Khon
0d9d548cbe cosmetic style fixes 2003-04-15 17:26:28 +00:00
John Baldwin
f265002902 Sync up with changes to ptrace() and use P_SHOULDSTOP instead of
a duplicate P_TRACED check.

Submitted by:	marcel
2003-04-15 16:29:39 +00:00
Tom Rhodes
7456d3c673 Add a manual page for the ntp_adjtime syscall.
PR:		32674
Reviewed by:	phk, ru
2003-04-15 15:42:10 +00:00
Ruslan Ermilov
fa01047efc Sync usage() with SYNOPSIS. 2003-04-15 14:27:21 +00:00
Ruslan Ermilov
a07872b53c Don't play with MAKEFLAGS in one other place too; it's dangerous. 2003-04-15 09:54:19 +00:00
Ruslan Ermilov
2d1cc5928b Fixed dofs_vn(): previous revision ran ``rm -f /dev/*vnn*'' too early. 2003-04-15 09:14:14 +00:00
Ruslan Ermilov
9b3f5f7760 A version of <sys/endian.h> in RELENG_4 doesn't have 64-bit functions.
Spotted by:	simokawa
2003-04-15 06:51:04 +00:00
Matthew N. Dodd
f246e4a17f - Express hard dependencies on bus (pci, isa, pccard) and
network layer (ether).
- Don't abuse module names to facilitate ifconfig module loading;
  such abuse isn't really needed.  (And if we do need type information
  associated with a module then we should make it explicit and not
  use hacks.)
2003-04-15 06:37:30 +00:00
Ruslan Ermilov
10646d5f83 Makefile.inc1 rev. 1.341 broke release.5 -- the fuss with MAKEFLAGS
here interferenced with one in Makefile.inc1.  Since we can't avoid
the jugglery in Makefile.inc1 (we want -m /usr/src/tools/build/mk
to come first, before any other -m specified on the command line),
avoid it here.

Reported by:	imp
2003-04-15 06:36:38 +00:00
Matthew N. Dodd
71d66ceb2c Don't abuse module names to facilitate ifconfig module loading;
such abuse isn't really needed.  (And if we do need type information
associated with a module then we should make it explicit and not
use hacks.)
2003-04-15 06:25:58 +00:00
Matthew N. Dodd
726c2ca080 Decode a few more syscalls. 2003-04-15 06:12:12 +00:00
Nate Lawson
d6c5005c05 Fix a warning about deprecated string literals.
Reviewed by:	diff
2003-04-15 05:15:50 +00:00
Matthew N. Dodd
f7130d0977 Add a module version number. 2003-04-15 04:19:49 +00:00
Matthew N. Dodd
5423375573 Express bus dependency a little more clearly. 2003-04-15 04:08:01 +00:00
Mike Silbersack
75d8feb42a Rework the rl_encap failure case. Previously, we would stuff the
unencapsulated packet back into the IFQ.  Unfortunately, the only reason
rl_encap would fail was due to m_defrag failing, which should only happen
when we're low on mbufs.  Hence, it was possible for us to end up with
an IFQ full of packets which could never clear the queue because they could
never be defragmented because they were themselves taking up all the mbufs.

To solve this, take if_xl's approach to the problem of encapsulation failure:
drop the packet.

MFC after:	3 days
2003-04-15 04:06:01 +00:00
Maxime Henrion
0cb112309a style(9) 2003-04-15 03:11:03 +00:00
Mike Silbersack
5a00719d7b Add a description of m_defragrandomfailures. 2003-04-15 02:26:13 +00:00
Mike Silbersack
352d050e79 Add another MBUF_STRESS_TEST feature, m_defragrandomfailures.
When enabled, this causes m_defrag to randomly return NULL (following
its normal failure case so that extra memory leaks are not introduced.)

Code similar to this was used to find / fix a few bugs last week.
2003-04-15 02:14:43 +00:00
Alan Cox
acbff226fc Update locking on the kmem_object to use the new macros. 2003-04-15 01:16:05 +00:00
Robert Watson
e965edfda2 Add MAC_ALWAYS_LABEL_MBUF to options; this permits the administrator
to force the allocation of MAC labels for all mbufs regardless of
whether a configured policy requires labeling when the mbuf is
allocated.  This can be useful it you anticipate loading a fully
labeled policy after boot and don't want mbufs to exist without
label storage, for performance measurement purposes, etc.  It also
slightly lowers the overhead of m_tag labeling due to removing the
decision logic.

While here, improve commenting of other MAC options.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-04-14 21:45:12 +00:00
Robert Watson
225bff6f8b Move MAC label storage for mbufs into m_tags from the m_pkthdr structure,
returning some additional room in the first mbuf in a chain, and
avoiding feature-specific contents in the mbuf header.  To do this:

- Modify mbuf_to_label() to extract the tag, returning NULL if not
  found.

- Introduce mac_init_mbuf_tag() which does most of the work
  mac_init_mbuf() used to do, except on an m_tag rather than an
  mbuf.

- Scale back mac_init_mbuf() to perform m_tag allocation and invoke
  mac_init_mbuf_tag().

- Replace mac_destroy_mbuf() with mac_destroy_mbuf_tag(), since
  m_tag's are now GC'd deep in the m_tag/mbuf code rather than
  at a higher level when mbufs are directly free()'d.

- Add mac_copy_mbuf_tag() to support m_copy_pkthdr() and related
  notions.

- Generally change all references to mbuf labels so that they use
  mbuf_to_label() rather than &mbuf->m_pkthdr.label.  This
  required no changes in the MAC policies (yay!).

- Tweak mbuf release routines to not call mac_destroy_mbuf(),
  tag destruction takes care of it for us now.

- Remove MAC magic from m_copy_pkthdr() and m_move_pkthdr() --
  the existing m_tag support does all this for us.  Note that
  we can no longer just zero the m_tag list on the target mbuf,
  rather, we have to delete the chain because m_tag's will
  already be hung off freshly allocated mbuf's.

- Tweak m_tag copying routines so that if we're copying a MAC
  m_tag, we don't do a binary copy, rather, we initialize the
  new storage and do a deep copy of the label.

- Remove use of MAC_FLAG_INITIALIZED in a few bizarre places
  having to do with mbuf header copies previously.

- When an mbuf is copied in ip_input(), we no longer need to
  explicitly copy the label because it will get handled by the
  m_tag code now.

- No longer any weird handling of MAC labels in if_loop.c during
  header copies.

- Add MPC_LOADTIME_FLAG_LABELMBUFS flag to Biba, MLS, mac_test.
  In mac_test, handle the label==NULL case, since it can be
  dynamically loaded.

In order to improve performance with this change, introduce the notion
of "lazy MAC label allocation" -- only allocate m_tag storage for MAC
labels if we're running with a policy that uses MAC labels on mbufs.
Policies declare this intent by setting the MPC_LOADTIME_FLAG_LABELMBUFS
flag in their load-time flags field during declaration.  Note: this
opens up the possibility of post-boot policy modules getting back NULL
slot entries even though they have policy invariants of non-NULL slot
entries, as the policy might have been loaded after the mbuf was
allocated, leaving the mbuf without label storage.  Policies that cannot
handle this case must be declared as NOTLATE, or must be modified.

- mac_labelmbufs holds the current cumulative status as to whether
  any policies require mbuf labeling or not.  This is updated whenever
  the active policy set changes by the function mac_policy_updateflags().
  The function iterates the list and checks whether any have the
  flag set.  Write access to this variable is protected by the policy
  list; read access is currently not protected for performance reasons.
  This might change if it causes problems.

- Add MAC_POLICY_LIST_ASSERT_EXCLUSIVE() to permit the flags update
  function to assert appropriate locks.

- This makes allocation in mac_init_mbuf() conditional on the flag.

Reviewed by:	sam
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-04-14 20:39:06 +00:00
Philippe Charnier
b85add5f31 Correct style bugs. Don't skip zombies in cputime(), according to Bruce,
zombie CPU times are valid. Adjust array size in strftime(3).

Submitted by:	Bruce
2003-04-14 19:51:36 +00:00
Robert Watson
10eeb10c63 Abstract access to the mbuf header label behind a new function,
mbuf_to_label().  This permits the vast majority of entry point code
to be unaware that labels are stored in m->m_pkthdr.label, such that
we can experiment storage of labels elsewhere (such as in m_tags).

Reviewed by:	sam
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-04-14 18:11:18 +00:00
David E. O'Brien
ae7906208d Add CPUTYPE support for "athlon-tbird", as GCC makes the distinction.
PR:		50801
Submitted by:	Glenn Johnson <glennpj@charter.net>
2003-04-14 17:36:29 +00:00
Robert Watson
aa65d9f538 Use MBTOM() to convert mbuf allocator flags to malloc() flags, rather
than using the same compare/substitute in many places.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-04-14 16:04:10 +00:00
Maxim Sobolev
cf0d8a1e48 Use pci_enable_{busmaster|io}() instead of directly writing into
PCI configuration register.

Submitted by:	mdodd
2003-04-14 15:50:04 +00:00
Ruslan Ermilov
c2400c8ec5 kbdcontrol.c rev. 1.35 and onwards support the KEYMAP_PATH
environment variable, and don't need to be bootstrapped.
2003-04-14 14:46:13 +00:00
Olivier Houchard
695d74f337 Use while (*controlp != NULL) instead of do ... while (*control != NULL)
There are valid cases where *controlp will be NULL at this point.

Discussed with:	dwmalone
2003-04-14 14:44:36 +00:00