Commit graph

3675 commits

Author SHA1 Message Date
Hajimu UMEMOTO 543729cf93 avoid module name conflict with opencrypto/rijndael.c.
Reported by:	tinderbox
2003-11-12 04:22:37 +00:00
Robert Watson eca8a663d4 Modify the MAC Framework so that instead of embedding a (struct label)
in various kernel objects to represent security data, we embed a
(struct label *) pointer, which now references labels allocated using
a UMA zone (mac_label.c).  This allows the size and shape of struct
label to be varied without changing the size and shape of these kernel
objects, which become part of the frozen ABI with 5-STABLE.  This opens
the door for boot-time selection of the number of label slots, and hence
changes to the bound on the number of simultaneous labeled policies
at boot-time instead of compile-time.  This also makes it easier to
embed label references in new objects as required for locking/caching
with fine-grained network stack locking, such as inpcb structures.

This change also moves us further in the direction of hiding the
structure of kernel objects from MAC policy modules, not to mention
dramatically reducing the number of '&' symbols appearing in both the
MAC Framework and MAC policy modules, and improving readability.

While this results in minimal performance change with MAC enabled, it
will observably shrink the size of a number of critical kernel data
structures for the !MAC case, and should have a small (but measurable)
performance benefit (i.e., struct vnode, struct socket) do to memory
conservation and reduced cost of zeroing memory.

NOTE: Users of MAC must recompile their kernel and all MAC modules as a
result of this change.  Because this is an API change, third party
MAC modules will also need to be updated to make less use of the '&'
symbol.

Suggestions from:	bmilekic
Obtained from:		TrustedBSD Project
Sponsored by:		DARPA, Network Associates Laboratories
2003-11-12 03:14:31 +00:00
John Baldwin 961a7b244d Add an implementation of turnstiles and change the sleep mutex code to use
turnstiles to implement blocking isntead of implementing a thread queue
directly.  These turnstiles are somewhat similar to those used in Solaris 7
as described in Solaris Internals but are also different.

Turnstiles do not come out of a fixed-sized pool.  Rather, each thread is
assigned a turnstile when it is created that it frees when it is destroyed.
When a thread blocks on a lock, it donates its turnstile to that lock to
serve as queue of blocked threads.  The queue associated with a given lock
is found by a lookup in a simple hash table.  The turnstile itself is
protected by a lock associated with its entry in the hash table.  This
means that sched_lock is no longer needed to contest on a mutex.  Instead,
sched_lock is only used when manipulating run queues or thread priorities.
Turnstiles also implement priority propagation inherently.

Currently turnstiles only support mutexes.  Eventually, however, turnstiles
may grow two queue's to support a non-sleepable reader/writer lock
implementation.  For more details, see the comments in sys/turnstile.h and
kern/subr_turnstile.c.

The two primary advantages from the turnstile code include: 1) the size
of struct mutex shrinks by four pointers as it no longer stores the
thread queue linkages directly, and 2) less contention on sched_lock in
SMP systems including the ability for multiple CPUs to contend on different
locks simultaneously (not that this last detail is necessarily that much of
a big win).  Note that 1) means that this commit is a kernel ABI breaker,
so don't mix old modules with a new kernel and vice versa.

Tested on:	i386 SMP, sparc64 SMP, alpha SMP
2003-11-11 22:07:29 +00:00
Hajimu UMEMOTO 34d78ec3f1 cleanup rijndael API.
since there are naming conflicts with opencrypto, #define was
added to rename functions intend to avoid conflicts.

Obtained from:	KAME
2003-11-11 18:58:54 +00:00
John Baldwin f9dbba5c4e Disable probing of HTT CPUs by default for the MP Table case. HTT CPUs
should only be used if they are enabled in the BIOS.  Now that we support
enumerating CPUs using the ACPI MADT, any HTT machine using ACPI should
respect the BIOS setting.  For HTT machines with ACPI disabled in the
kernel, the MPTABLE_FORCE_HTT kernel option can be used to try to probe HTT
CPUs like have done in the past for the MP Table case.  This option should
only be enabled if HTT is enabled in the BIOS.
2003-11-11 17:14:26 +00:00
Jake Burkholder d2f154c95e Add a uart attachment/syscons keyboard driver for sun keyboards. In theory
this will work with any uart backend, currently supported hardware uses
either ns8250 or z8530.
2003-11-11 07:33:24 +00:00
Hajimu UMEMOTO db54001806 enable aes-xcbc-mac and aes-ctr, again. 2003-11-10 10:39:14 +00:00
Peter Wemm 0432a0f961 Rename npx.c to fpu.c (it isn't an extension, its part of the core
architecture now).
2003-11-08 02:40:40 +00:00
Bruce Evans dd7b5bb30b Fixed insertion sort errors in the opt_cpu.h section.
Removed banal comments about ELAN*.  Complain about ELAN* being misnamed
instead (so that these options are not obviously related to a CPU and
don't sort with CPU_ELAN).

Complain about CPU_DISABLE_CMPXCHG being in the wrong namespace.
2003-11-07 15:14:53 +00:00
Hartmut Brandt ed91f9a547 Allow the ng_uni node (NgATM signalling layer) to be built into the
kernel via options NGATM_UNI.
2003-11-07 09:18:53 +00:00
Bruce Evans b75a04af23 Removed the garbage options DPT_ALLOW_MEMIO, HIFN_NO_RNG,
IPFIREWALL_FORWARD, NTIMECOUNTER, OHCI_DEBUG, UGEN_DEBUG, UHCI_DEBUG,
UHID_DEBUG, UHUB_DEBUG, UKBD_DEBUG, ULPT_DEBUG, UMASS_DEBUG, UMS_DEBUG,
URIO_DEBUG and VINUM_AUTOSTART.
2003-11-05 14:37:48 +00:00
Bruce Evans 1cee000cfc Removed references to the garbage (and soon to be deleted) options
DPT_ALLOW_MEMIO, IPFIREWALL_FORWARD and NTIMECOUNTER
2003-11-05 14:32:27 +00:00
Bruce Evans 250ebca656 Fixed misformatting of the options lines for CD9660_ICONV,
DA_OLD_QUIRKS, DCONS_BUF_SIZE, DCONS_FORCE_CONSOLE, DCONS_FORCE_GDB,
DCONS_POLL_HZ, DIRECTIO, HIFN_DEBUG, HIFN_RNDTEST, KSTACK_MAX_PAGES,
LIBMBPOOL, MBUF_STRESS_TEST, MSDOSFS_ICONV, NETGRAPH_ATM_ATMPIF,
NSWBUF_MIN, NTFS_ICONV, P1003_1B_SEMAPHORES, RAID_AUTOCONFIG,
SCHED_4BSD, SOCKBUF_DEBUG, UBSEC_DEBUG, UBSEC_RNDTEST, UDF_ICONV,
UVSCOM_DEFAULT_OPKTSIZE and WATCHDOG.
2003-11-05 12:52:35 +00:00
Bruce Evans d00ce91973 Moved $FreeBSD$ to the beginning of the file.
Don't put the name of the file in a comment.  $FreeBSD$ gives more than
enough about the file's pathname.

Fixed misdescription of the file.  It isn't the whole unified Makefile...

Moved the settings of WERROR and of the standard extra CFLAGS
-finline-limit and -fno-strict-aliasing to a less wrong place.  They
were in the section for profiling.
2003-11-05 12:20:16 +00:00
Scott Long 126f0dfa3a Hook the udf_iconv module up to the kernel build.
Submitted by: imura@ryu16.org
2003-11-05 06:38:14 +00:00
Peter Wemm 5064105e52 Move the inline limit default variable to a per-arch place. For example,
the amd64 implementation of the pcpu macros is even more verbose than on
i386 and that causes gcc to way overestimate the complexity of this
2-instruction macro.  The other platforms can probably lower their
default values.
2003-11-04 23:29:17 +00:00
Yoshihiro Takahashi 1a16033398 MFi386: revision 1.456 2003-11-04 13:11:58 +00:00
Yoshihiro Takahashi 83f3d4e5e5 MFi386: revision 1.200 2003-11-04 12:19:54 +00:00
Brian Feldman afdc68c42f Add a "-f" flag for asf(8) which performs a search to find the each module
no matter where in the directory structure it may be.  Use this and the "-k"
flag in the generated gdbinit files so that the "getsyms" function in gdb
requires no user intervention to run and will find every module if they're
in the kernel build's module directory.  This is still quite useful for
cases where gdb knows that the path for some modules is /boot/kernel and
others are in the object directory for /usr/src/sys/$ARCH/compile/kernel.

Approved by:	grog
2003-11-04 06:38:37 +00:00
John Baldwin 7058adba6c - Remove references to old interrupt and SMP code.
- Add entries for new interrupt and SMP code.
2003-11-03 22:46:43 +00:00
John Baldwin a13b813801 - Remove APIC_IO option.
- Add NO_MIXED_MODE, DEV_ACPI, and DEV_APIC options.
2003-11-03 22:45:54 +00:00
Hartmut Brandt ec7ceac96a Put address handling, traffic descriptor handling and message encoding
and decoding into the atmbase module when compiled directly into the kernel.
2003-11-03 12:05:58 +00:00
Poul-Henning Kamp 5843f50d9b Change /dev/soekris-errled to be /dev/led/error and make it conditional
on CPU_SOEKRIS.

Note the subtle change in semantfics for 'f%d' flash instruction and the
new morse facility (see details in dev/led/led.c)
2003-11-03 11:03:40 +00:00
Poul-Henning Kamp 1c66457ee5 Introduce new CPU_SOEKRIS option to tell soekris hardware from other
hardware based on similar chipsets.
2003-11-03 10:34:40 +00:00
Poul-Henning Kamp 8dd85c33e3 Free major#100 2003-11-03 10:19:33 +00:00
Nate Lawson cc65a50cc5 Change the reset video option to be positive (hw.acpi.reset_video).
Requested by:	jhb

Initialize the real mode stack.  This is needed at least for the return
address from the lcall.
Requested by:	takawata

Fix style bugs in acpi_wakecode.S
Requested by:	bde

Remove the kernel option now that we have the tunable.
2003-11-01 00:18:29 +00:00
Yoshihiro Takahashi 19ec2ca3b5 MFi386: revision 1.198. 2003-10-31 13:50:09 +00:00
John Baldwin 555639e062 Fixup the sorting of some of the options. DISABLE_P* are still out of
order to keep all of the opt_pmap.h options together.
2003-10-30 21:45:34 +00:00
Mitsuru IWASAKI d63ab51a51 Alphabetical order for ACPI options broken by adding ACPI_NO_RESET_VIDEO.
Add short comment about ACPI_NO_RESET_VIDEO into NOTES.

Pointed-out by:	njl
2003-10-29 14:22:09 +00:00
Mitsuru IWASAKI 92781c3567 Add kernel option ACPI_NO_RESET_VIDEO as workaround for problems
(e.g. LCD white-out after resume) on some machine cased by
re-initialize video BIOS code in acpi_wakecode.
2003-10-29 03:30:45 +00:00
Sam Leffler 395bb18680 speedup stream socket recv handling by tracking the tail of
the mbuf chain instead of walking the list for each append

Submitted by:	ps/jayanth
Obtained from:	netbsd (jason thorpe)
2003-10-28 05:47:40 +00:00
Hartmut Brandt 027ebd2f39 Allow building the NgATM SAAL layer directly into the kernel. 2003-10-27 11:19:08 +00:00
Nate Lawson eb4f7a817c Fix style problems with new options.
Requested by:	bde
2003-10-27 02:42:08 +00:00
Hidetoshi Shimokawa ffbfc256fc Revert previous change.
We have to put dcons_crom at first after 'optional' and
dcons and firewire are necessary and not optional for dcons_crom anyway.

Reported by: brooks
2003-10-26 07:42:32 +00:00
Hidetoshi Shimokawa b604f6e80f dcons_crom.c needs dcons and firewire. 2003-10-25 12:59:22 +00:00
Hidetoshi Shimokawa 869093b15d Add dumb console driver and related bits.
dcons(4): very simple console and gdb port driver
dcons_crom(4): FireWire attachment
dconschat(8): User interface to dcons

Tested with: i386, i386-PAE, and sparc64.
2003-10-24 15:44:10 +00:00
Marcel Moolenaar 4d85274d1a Remove unused file. db_disasm() has been implemented in db_interface.c
now.
2003-10-24 06:48:41 +00:00
Marcel Moolenaar 1f98bf53d9 Hook-up the new disassembler. 2003-10-23 06:11:37 +00:00
Nate Lawson 3c0014e8ae Add the ACPICA_PEDANTIC option which is off by default. Enabling it will
enable strict checks of the AML.  Our default behavior will be to relax
checks to work on as many platforms as possible.  Also clean up and document
other ACPI options while I'm here.
2003-10-22 22:27:49 +00:00
Robert Watson 5d79de444b Hook up to the build for options MAC:
security/mac/mac_net.c
	security/mac/mac_pipe.c
	security/mac/mac_process.c
	security/mac/mac_system.c
	security/mac/mac_vfs.c

Note: Here begins a period of NOTES/LINT build breakage due to duplicate
symbols that will shortly be removed from kern_mac.c.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-10-22 20:39:33 +00:00
Hajimu UMEMOTO 9132d5071c - revert to old rijndael code. new rijndael code broke gbde.
- since aes-xcbc-mac and aes-ctr require functions in new
  rijndael code, aes-xcbc-mac and aes-ctr are disabled for now.
2003-10-19 21:28:34 +00:00
Hidetoshi Shimokawa e9e688e243 Add SBP-II target mode driver.
Though this is still incomplete and has some missing features such as
exclusive login and event notification, it may be enough for someone
who wants to play with it.

This driver is supposed to work with firewire(4), targ(4) of CAM(4)
and scsi_target(8) which can be found in /usr/share/example/scsi_target.
This driver doesn't require sbp(4) which implements initiator mode.

Sample configuration:

Kernel: (you can use modules as well)
device	firewire
device	scbus
device	targ
device	sbp_targ

After reboot:
# mdconfig -a -t malloc -s 10m
md0
# scsi_target 0:0:0 /dev/md0
(Assuming sbp_targ0 on scbus0)

You should find the 10MB HDD on FreeBSD/MacOS X/WinXP or whatever connected
to the target using FireWire.

Manpage is not finished yet.
2003-10-18 05:41:31 +00:00
Poul-Henning Kamp db25ce18d8 Make sure to pull in all relevant crypto for GEOM_BDE 2003-10-15 08:53:04 +00:00
Alan Cox 7fb578933f MFia64
Move uma_small_alloc() and uma_small_free() to uma_machdep.c.
2003-10-14 05:51:31 +00:00
Hajimu UMEMOTO 66c7fe4056 use BF_ecb_encrypt().
Obtained from:	KAME
2003-10-13 19:26:08 +00:00
Hajimu UMEMOTO b42ac57f4f - support AES counter mode for ESP.
- use size_t as return type of schedlen(), as there's no error
  check needed.
- clear key schedule buffer before freeing.

Obtained from:	KAME
2003-10-13 14:57:41 +00:00
Hajimu UMEMOTO c65ee7c758 - support AES XCBC MAC for AH
- correct SADB_X_AALG_RIPEMD160HMAC to 8

Obtained from:	KAME
2003-10-13 04:54:51 +00:00
Hajimu UMEMOTO 3dbacd2651 use opencrypto for RMD160.
Requested by:	sam
2003-10-12 18:25:38 +00:00
Hajimu UMEMOTO 492528c051 - RIPEMD160 support
- pass size arg to ah->result (avoid assuming result buffer size)

Obtained from:	KAME
2003-10-12 09:41:42 +00:00
Poul-Henning Kamp b8ab710431 Free the SCSI cd major number 2003-10-06 09:13:08 +00:00