Commit graph

38741 commits

Author SHA1 Message Date
Matthew N. Dodd adbc4f03a6 Correct an argument to bus_alloc_resource(). 2003-03-25 04:34:33 +00:00
Matthew N. Dodd c844066969 Give print_child a default method. 2003-03-25 04:32:52 +00:00
Jake Burkholder 07515f29ce Fix 2 vm_offset_t -> vm_paddr_t missed in previous commit.
Sponsored by:	DARPA, Network Associates Laboratories
2003-03-25 01:47:29 +00:00
Robert Watson ca26e8ba85 Update the MAC regression test policy to include stubs and testing
functionality for the following entry pints:

  mac_test_init_proc_label()
  mac_test_destroy_proc_label()

For process labeling entry points, now also track the use of process
labels and test assertions about their integrity and life cycle.

  mac_test_thread_userret()
  mac_test_check_kenv_dump()
  mac_test_check_kenv_get()
  mac_test_check_kenv_set()
  mac_test_check_kenv_unset()
  mac_test_check_kld_load()
  mac_test_check_kld_stat()
  mac_test_check_kld_unload()
  mac_test_check_sysarch_ioperm()
  mac_test_check_system_acct()
  mac_test_check_system_reboot()
  mac_test_check_system_settime()
  mac_test_check_system_swapon()
  mac_test_check_system_swapoff()
  mac_test_check_system_sysctl()

For other entry points, just provide testing stubs.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-03-25 01:20:56 +00:00
Robert Watson 09de2dc22f Update MAC "none" stub policy to include stubs for the following
entry points:

  mac_none_thread_userret()
  mac_none_check_kenv_dump()
  mac_none_check_kenv_get()
  mac_none_check_kenv_set()
  mac_none_check_kenv_unset()
  mac_none_check_kld_load()
  mac_none_check_kld_stat()
  mac_none_check_kld_unload()
  mac_none_check_sysarch_ioperm()
  mac_none_check_system_acct()
  mac_none_check_system_settime()
  mac_none_check_system_swapoff()

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-03-25 01:18:06 +00:00
Robert Watson 4c64787a5b Expand scope of the MLS policy to include a new entry point available
for enforcement:

  mac_mls_check_system_swapon() - Require that the subject and the
  swapfile target vnode labels dominate one another.  An additional
  check is probably needed here to require that the swapfile target
  has a label of mls/high to prevent information leakage through
  swapfiles.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-03-25 01:16:10 +00:00
Robert Watson 96c33a0cea Expand scope of the BSD extended "file system firewall" policy to
include a new entry point available for enforcement:

  mac_bsdextended_check_system_swapon() - Apply extended access
  control checks to the file target of swap.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-03-25 01:14:03 +00:00
Robert Watson 2b03c68008 Expand scope of the Biba policy to include some of the new entry
points available for enforcement:

  mac_biba_check_sysarch_ioperm() - Require Biba privilege to make
  use of privileged machine-dependent interfaces, protecting against
  bypass of the policy via various mechanisms.

  mac_biba_check_system_swapoff() - Require Biba privilege to disable
  swapping against a vnode target.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-03-25 01:10:54 +00:00
Jake Burkholder b5cff0d653 Bump __FreeBSD_version for addition of vm_paddr_t and kvtop prototype
change.
2003-03-25 00:26:52 +00:00
Jake Burkholder 227f9a1c58 - Add vm_paddr_t, a physical address type. This is required for systems
where physical addresses larger than virtual addresses, such as i386s
  with PAE.
- Use this to represent physical addresses in the MI vm system and in the
  i386 pmap code.  This also changes the paddr parameter to d_mmap_t.
- Fix printf formats to handle physical addresses >4G in the i386 memory
  detection code, and due to kvtop returning vm_paddr_t instead of u_long.

Note that this is a name change only; vm_paddr_t is still the same as
vm_offset_t on all currently supported platforms.

Sponsored by:	DARPA, Network Associates Laboratories
Discussed with:	re, phk (cdevsw change)
2003-03-25 00:07:06 +00:00
Matthew N. Dodd 0d98179d63 I seem to have forgotten this. Sorry. 2003-03-24 22:25:08 +00:00
John Baldwin 9a7048530d Oops, SHUTDOWN_PRI_LAST should be EVENTHANDLER_PRI_LAST, not
EVENTHANDLER_PRI_FIRST.  Oddly enough, this didn't seem to break the boxes
I tested these changes on.

Reported by:	jesper
2003-03-24 21:24:37 +00:00
John Baldwin 75b8b3b25c Replace the at_fork, at_exec, and at_exit functions with the slightly more
flexible process_fork, process_exec, and process_exit eventhandlers.  This
reduces code duplication and also means that I don't have to go duplicate
the eventhandler locking three more times for each of at_fork, at_exec, and
at_exit.

Reviewed by:	phk, jake, almost complete silence on arch@
2003-03-24 21:15:35 +00:00
John Baldwin e34334f0a1 Define some generic eventhandler priorities for use with eventhandlers and
redefine the existing priority macros for specific eventhandlers in terms
of the generic priorities.
2003-03-24 21:07:31 +00:00
John Baldwin 959d22329a - Remove witness_dead and just use witness_watch instead. If witness_watch
is set to 0, it now has the same affect as setting witness_dead used to
  have.
- Added a sysctl handler that allows root to change witness_watch from a
  non-zero value to zero to disable witness at runtime.  Note that you
  can't turn witness back on once it is off.  You can only turn it off as
  a one-way switch.
- Added a comment describing the possible values of witness_watch.
2003-03-24 21:03:53 +00:00
Matthew N. Dodd 257427efe3 Retire sys/pc98/pc98/spkr.c 2003-03-24 21:01:54 +00:00
Matthew N. Dodd 1352a54255 Use __packed; 2003-03-24 20:44:39 +00:00
Matthew N. Dodd a954a4fba0 Correct a mis-merge.
Noticed by:	 johan
2003-03-24 19:54:14 +00:00
Poul-Henning Kamp 5d445dcb4e Change g_class initialization to sparse format. 2003-03-24 19:46:26 +00:00
Matthew N. Dodd 96aa42527e - Consolidate smapi driver.
- Attach to nexus.
- Use null{open,close}() instead of rolling our own.
2003-03-24 19:40:54 +00:00
Matthew N. Dodd 863463c1cb Add the 'vpd' and 'smbios' drivers. The 'smbios' driver is just a
stub right now.
2003-03-24 19:32:57 +00:00
Poul-Henning Kamp c138fec0b5 Premptively change initializations of struct g_class to use C99
sparse struct initializations before we extend the struct with
new OAM related member functions.
2003-03-24 19:30:15 +00:00
Matthew N. Dodd b7b5ae3edb Use repo-copied files in sys/i386/bios. 2003-03-24 19:14:46 +00:00
Matthew N. Dodd c1f567e304 PC98 systems don't need to worry about the MCA bus. 2003-03-24 19:10:33 +00:00
John Baldwin c2fae87169 Don't call sysbeep() in sc_bell() if either duration or pitch is zero.
Otherwise sysbeep() makes an annoying clicking sound on some systems.
'kbdcontrol -b off' just sets the duration and pitch to zero, it doesn't
set the QUIET_BELL flag.

Tested by:	SorAlx <soralx@cydem.zp.ua>
PR:		misc/41772
MFC after:	1 week
2003-03-24 15:56:00 +00:00
Maxime Henrion 4974b53e31 Remove a trailing semicolon in SCHED_QUANTUM definition.
Luckily this didn't cause any bugs.

Spotted by:	Samy Al Bahra <samy@kerneled.com>
2003-03-24 15:16:21 +00:00
Poul-Henning Kamp d49d7ca591 Turn /dev/geom.ctl from a GEOM class into a plain character device driver
instead, it will never see a disk-I/O transaction, so this is a lot simpler.
2003-03-24 13:37:15 +00:00
Poul-Henning Kamp fbf79df3b8 Save a lock: Grab the stall_events SX lock exclusively so it also serialize
OAM reqests.
2003-03-24 13:35:06 +00:00
Bruce Evans 520cab0a32 Better fix for the problem addressed by rev.1.79: don't loop in
fifo_open() waiting for another reader or writer if one arrived and
departed while we were waiting (or a little earlier).

Rev.1.79 broke blocking opens of fifos by making them time out after 1
second.  This was bad for at least apsfilter.

Tested by:	"Simon 'corecode' Schubert" <corecode@corecode.ath.cx>,
		Alexander Leidinger <Alexander@leidinger.net>,
		phk
MFC after:	4 weeks
2003-03-24 11:03:42 +00:00
Bruce Evans f261b1f35f Disable interrupts while in kdb_trap() to handle cases where the caller
doesn't do it.  This fixes all known causes of "Context switches not
allowed in the debugger" in mi_switch().  The main cause was trap_fatal()
calling kdb_trap() with interrupts enabled.  Switching to ithreads for
interrupt handling then made fatal traps more fatal and harder to debug.
The problem was limited in -current because most interrupt handlers are
blocked by Giant, but it occurred almost deterministically for me because
my clock interrupt handlers are non-fast and not blocked by Giant.
2003-03-24 10:17:14 +00:00
Hidetoshi Shimokawa f34e847dce - The payload of Write Request Quad must be network byte order. 2003-03-24 04:11:21 +00:00
Hidetoshi Shimokawa 73aa55ba0a - The payload of Write Request Quad and Read Response Quad must be
network byte order.
- Set ATRetries register after each bus reset because the value is 'undef'
	in OHCI spec.
2003-03-24 04:06:21 +00:00
Hidetoshi Shimokawa a84fda13bb Safe PCI configuration.
- Clear PCIM_CMD_MWRICEN:
	some chips seem to have problem with write invalidate.
	clearing this bit fixes SBP timeout problem.

Tested by: Michael Reifenberger <Michael.Reifenberger@Plaut.de>

- Set PCIM_CMD_SERRESPEN and PCIM_CMD_PERRESPEN
- Moderate value for latency timer.
2003-03-24 03:47:36 +00:00
Poul-Henning Kamp dddc28bfe0 Introduce g_cancel_events() and use it a couple of places where it makes
sense.
2003-03-23 23:01:40 +00:00
Poul-Henning Kamp d943f1b0b9 Introduce an SX lock which allows us to stall event processing
during OAM operations.
2003-03-23 21:58:09 +00:00
Olivier Houchard e2f9a08bb0 s/discriptors/descriptors/ 2003-03-23 19:41:34 +00:00
Tim J. Robbins f949f795aa Remove unused mtx_lock_giant(), mtx_unlock_giant(), related globals
and sysctls.
2003-03-23 11:26:11 +00:00
Poul-Henning Kamp 757ed3b591 I forgot the evil ioctl census scripts: #include <geom/geom_ctl.h> 2003-03-23 11:05:44 +00:00
Poul-Henning Kamp 3117e54484 Marshalling stuff for OAM API. 2003-03-23 10:16:14 +00:00
Poul-Henning Kamp 679c4aa68c A note about which #include files may be used where. 2003-03-23 10:08:13 +00:00
Poul-Henning Kamp 62d03b91ec Start leaking the AOM api into the tree. 2003-03-23 10:07:44 +00:00
Robert Watson f09dbc4c57 Garbage collect FREEBSD_MAC_EXTATTR_NAME and FREEBSD_MAC_EXTATTR_NAMESPACE,
which are no longer required now that we have UFS2 with extended
attribute transactions.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-03-23 02:09:20 +00:00
Warner Losh fb9e391927 MFP4 27224 and 27225:
Change 27224 by imp@imp_hammer on 2003/03/22 00:16:22
	Put what I think are the correct TX RATE translation tables
	in place for LUCENT firmware.  This is based on the 4.x driver.
	Maybe it should be table driven?

	ifconfig wi0 media DS/11Mbps still fails, but it fails before
	we even get to the txrate stuff, so other things are wrong.

Change 27225 by imp@imp_hammer on 2003/03/22 00:45:11
	Default ic_fixed_rate to -1.  This is the same thing as autoselect.
	There really should be a #define for this...
2003-03-22 15:39:38 +00:00
Ruslan Ermilov ab0f83bd03 Remove bitrot associated with `maxusers'.
Submitted by:	bde
2003-03-22 14:18:23 +00:00
Yaroslav Tykhiy 17ce5b94d6 We shouldn't assert that a vode is locked in vop_lock_post()
if VOP_LOCK() has failed.

Reviewed by:	jeff
2003-03-22 13:21:54 +00:00
Maxime Henrion 0a50de79cb - Add a new ioctl to get the maximum number of ATA channels.
- Use it in atacontrol(8) when listing ATA devices instead of
  stopping at the first ENXIO received.

This makes atacontrol list work on my sparc64 where the two ATA
channels I have are numbered 2 and 3.

Reviewed by:	sos
2003-03-22 12:18:20 +00:00
Maxime Henrion aecfcdb824 Use __packed instead of __attribute__((__packed__)). 2003-03-22 00:25:14 +00:00
Poul-Henning Kamp 7da1ebfd74 Mitigate deadlock situation pending a more complete solution. 2003-03-21 22:05:33 +00:00
Ruslan Ermilov 7f18da65a4 Added missing dependency on rc4.
Reviewed by:	imp
2003-03-21 22:02:58 +00:00
John Baldwin a3f76a6394 Fix some memory leaks in the failure cases after trying to look up the
OSF/1 runtime loader.  Also, use td_ucred instead of p_ucred.

Tested by:	gallatin
Reviewed by:	rwatson
2003-03-21 21:49:52 +00:00