Commit Graph

103505 Commits

Author SHA1 Message Date
simonb
5a8c043bd9 Build the GENERIC kernel. 2002-10-07 02:00:23 +00:00
lukem
93305911e9 Move libcrypto.so* from /usr/lib to /lib, as /sbin/cgdconfig needs it.
Requested by elric@.
2002-10-07 00:53:31 +00:00
dan
73aa8b3b5b warn about the arc4 generator if no NRND, but still use it 2002-10-07 00:40:15 +00:00
wiz
4685690c6e Begin new sentence in upper case. 2002-10-07 00:12:40 +00:00
wiz
57ed9ac8ea Bump date for VT8235; fix a major whitespace error; new sentence, new line. 2002-10-07 00:09:16 +00:00
wiz
669b738c2e Bump date for VT8235 support. 2002-10-07 00:05:10 +00:00
wiz
24d7aadd13 Mdoc nits, and bump date for FNM_LEADING_DIR addition. 2002-10-07 00:03:14 +00:00
kristerw
e367c94b9c Do not try to print uninitialized variable. 2002-10-06 23:34:56 +00:00
kristerw
e20c7acad8 Do not free uninitialize pointers.
Do not try to print with uninitialized format-string pointers.
2002-10-06 23:17:46 +00:00
kent
bebbf91a39 - auvia_trigger_output(): correct register;
AUVIA_RP_CONTROL -> AUVIA_RP_MODE
- auvia_trigger_output(), auvia_trigger_input(): Remove DXS_[LR]VOL setting.
- whitespace
2002-10-06 23:14:25 +00:00
petrov
94f3e9b824 Reset the driver on scsibus reset. 2002-10-06 21:35:33 +00:00
fvdl
d1cbc91464 Remove ci_lapic_ints from struct cpu_info again, it isn't needed anymore. 2002-10-06 20:40:27 +00:00
fvdl
3319c2f2dc Add cpu_id field to mp_intr_map structure. Declare mp_nintr. 2002-10-06 20:39:33 +00:00
fvdl
f493e906e6 Handle per-CPU local apic redir entries a little better. My previous
solution relied on CPU entries coming first in the table, which
isn't guaranteed. Instead, export mp_intrs to lapic.c, and scan
it for entries that match the current CPU in lapic_set_lvt().

Also, do not try to up intr_cnt by the number of IO APICs or CPUs in
the case of MPS_ALL_APICS; it isn't needed, and it also relies on
CPU and IO APIC entries being earlier in the table.
2002-10-06 20:38:37 +00:00
oster
644e9151d0 poolify the RF_ReconMapListElem_t's used by rf_ReconMapUpdate().
Gives LOCKDEBUG kernels one less thing to complain about.
2002-10-06 18:49:12 +00:00
fvdl
be146319cd Keep size of struct cpu_info independent of DIAGNOSTIC/LOCKDEBUG
(was done in rev. 1.81, got lost in the MP merge).
2002-10-06 18:31:21 +00:00
bjh21
c62984115f Turn curcpu() into a macro.
Rename cpu_info_array to cpu_info and make it public.
Add CPU_FOREACH() and friends.
2002-10-06 18:28:48 +00:00
thorpej
7d588a758e * Move the rescue bits into their own file.
* In makeflist, skip rescue bits in arch's that don't yet support it
  (MIPS, currently, due to an objcopy-crunch bug).
2002-10-06 17:28:46 +00:00
thorpej
6f086f7ea1 Compare MACHINE_CPU and "mips" rather than MACHINE_ARCH and "mipseb" or
"mipsel".
2002-10-06 17:19:12 +00:00
thorpej
70cc64f942 Make this compile with strict prototypes. 2002-10-06 17:13:58 +00:00
heinz
c624907cf7 fix small typo 2002-10-06 17:13:24 +00:00
thorpej
9f704b38bd Move forward decls earlier in the file. Expose bufq_state for the
benefit of kmem grovelers.
2002-10-06 17:05:56 +00:00
thorpej
796c5d9347 Crank ramdisk size to 1440k. 2002-10-06 17:01:27 +00:00
kent
f06ae93219 Add some constant symbols for AC97 registers and values based on OpenBSD.
Rename some symbols to sync with OpenBSD:
	AC97_REG_EXTENDED_ID
	-> AC97_REG_EXT_AUDIO_ID
	AC97_REG_EXTENDED_STATUS
	-> AC97_REG_EXT_AUDIO_CTRL
	AC97_CODEC_DOES_VRA/AC97_ENAB_VRA
	-> AC97_EXT_AUDIO_VRA
	AC97_CODEC_DOES_MICVRA/AC97_ENAB_MICVRA
	-> AC97_EXT_AUDIO_VRM

ac97feature: "mic channel" -> "dedicated mic channel"
ac97_attach(): print extended capabilities; VRA, DRA, SPDIF, VRM, CDAC,
SDAC, LDAC.
2002-10-06 16:33:35 +00:00
kent
f5f630d1df Correct MICVRA values: 0x0004 -> 0x0008 2002-10-06 15:06:05 +00:00
fvdl
f8a5d4e00c Handle per-CPU local APIC redir tables in the MP BIOS. 2002-10-06 14:28:55 +00:00
fvdl
85eaacd06e Add per-CPU local apic redir table (2 pointers). 2002-10-06 14:28:17 +00:00
dan
73390e7e36 let this compile in the non KERNEL case without NRND. 2002-10-06 13:42:36 +00:00
simonb
c3bdd6ef09 ANSIfy, KNF, declare externs in headers only. 2002-10-06 13:23:00 +00:00
bjh21
1f17ac8831 Remove footbridge and isadma glue -- these no longer seem to be necessary. 2002-10-06 13:05:39 +00:00
bjh21
682415134d Call cpu_setup() and cpu_attach() from cpu_hydra_hatch().
Also simplify cpu_hydra_attach() somewhat.
2002-10-06 12:37:59 +00:00
fvdl
a2e301721c cpu_swapin now exists, so remove the empty define. 2002-10-06 12:37:35 +00:00
fvdl
2560973204 If NOREDZONE is defined, keep UPAGES at 2 as before. 2002-10-06 12:37:12 +00:00
fvdl
5e33ec48d8 Define NOREDZONE and use it in the *_TINY config files to save a page
per process.
2002-10-06 12:36:16 +00:00
fvdl
14c70e4627 Put an unmapped page below the kernel stack (and above struct user) to
catch kernel stack overflows. This bumps UPAGES from 2 to 4 (one unmapped),
because struct user take 1 page then there's the unmapped page, and
then the 2 pages for the kernel stack. If the NOREDZONE option is
set, UPAGES is 2 as before, and no unmapped page is used.
2002-10-06 12:35:16 +00:00
bjh21
7d7fc4e3d8 Change obviously-acorn32-specific entries to say acorn32 rather than arm32. 2002-10-06 12:35:01 +00:00
bjh21
b3db781eb3 Add "hydra" on acorn32. 2002-10-06 12:32:02 +00:00
lukem
8b42f7b9d9 Provide strtoll() in libnbcompat.
Should fix relevant build issue on HP-UX and MacOS X hosts.
2002-10-06 12:09:34 +00:00
lukem
9df13b15cf pull in config.h (et al) for libnbcompat 2002-10-06 12:07:28 +00:00
dsainty
12bc497c14 Typo: axctivate -> activate 2002-10-06 11:38:41 +00:00
bjh21
c775c3e73c Give each CPU a struct cpu_info, and have curcpu() return the right one.
Also have cpu_boot_secondary_processors() un-halt all the slave CPUs, and
have them do something visible when that happens.
2002-10-06 11:34:12 +00:00
fvdl
b3e87c44a4 Adjust callers to setgate() to match new prototype. 2002-10-06 10:40:04 +00:00
bjh21
8e25492f64 Make cpu_number() work. 2002-10-06 10:21:50 +00:00
bjh21
f68de9a752 Use HYDRA_ID_SLAVE_MASK rather than 3.
No need for an infinite loop after we jump out of hydra_hatchcode.
2002-10-06 10:21:10 +00:00
kristerw
bc68323a39 Correct test for busy-ness when setting parameters. 2002-10-06 10:01:08 +00:00
kristerw
d509ae30db Correct possible return of uninitialized error variable. 2002-10-06 09:48:29 +00:00
tls
0f95ec4fd5 ESP output was drawing down the entropy pool at a ferocious rate, a
particular problem on hosts with only wireless interfaces that are
definitely not safe to use as entropy sources.

Add arc4randbytes() which hands out bytes from the same source used
by arc4random().  This is intended to be a _temporary_ interface
until we can design and implement a better general PRNG interface
that is decoupled from the entropy-pool implementation.

Modify key_randomfill() (used only for initialization vectors on
SA creation and via key_sa_stir_iv(), which does not "stir",
despite its name) to use arc4randbytes() instead of pulling bits
directly from the entropy pool.  It is my hope that this change
will pose minimal integration problems for the KAME folks as the
random-pool interface is *already* different between each BSD
variant; this just simplifies the NetBSD case and solves a
fairly serious problem.

Note that it is generally considered acceptable cryptographic
practice to use a fast stream cipher to generate IVs for encryption
with stronger block ciphers.  For example, the use of "non-Approved"
PRNGs to generate IVs for "Approved" block ciphers is explicitly
sanctioned by FIPS 140-2.
2002-10-06 08:51:44 +00:00
tls
cd114adca5 This commit includes two major changes:
1) Speed up arc4random().  We make arc4randbyte() inline, which makes this
   not much slower than, say, the other arc4 implementation in our kernel.

   We also replace four calls to arc4randbyte() with a loop, saving about
   20% on some processors where the "unrolled" arc4randbyte() calls would
   needlessly stomp the cache.

2) Address various problems with the initialization/"stirring" code,
   primarily in the area of handling of the source data from the kernel
   entropy pool.  We used to:

	a) Ask the entropy pool for 32 bytes

	b) If we got zero bytes, key with junk from the stack (ouch!)
	   which has some nasty implications, to say the least.  For
	   example, we're most likely to get zero bytes at boot time,
	   when the stack contents are even more predictable than usual.

	c) If we got less than 32 bytes but more than zero bytes, use
	   however many bytes we got as the arc4 key, copying it
	   repeatedly as per usual arc4 key setup.

	   Because of the way NetBSD's entropy pool works, this was
	   mostly harmless, because if you ask for RND_EXTRACT_ANY,
	   you always get as many bytes as you ask for.  However,
	   this is probably a security hole in the original FreeBSD
	   code, where AFAICT you might end up using an 8-bit arc4
	   key -- not good, much worse than using the output of the
	   entropy pool hash function even when it thinks it only
	   has 8 bits of entropy to give you.

	   One thing this code could do on NetBSD that was not so
	   good was to replace a key with a lot of entropy with
	   one with less entropy.  That's clearly counterproductive.

   The new code, instead:

	a) Asks for 32 good bytes.  If it gets them, use them as the
	   arc4 key in the usual way.

	b) Tracks how many entropy bytes the key it's replacing had.
	   If the new entropy request got less bytes, leave the old
	   key in place.  Note that the first time through, the "old
	   key" had zero bytes, so we'll always replace it.

	c) If we get less then 32 bytes but more than we had, request
	   EXTRACT_ANY bytes from the entropy pool, padding the key
	   out to 32 bytes which we then use as the arc4 key in the
	   usual way.

This is still really all rather backwards.  Instead of this generator
deciding to rekey itself using a basically arbitrary metric, it should
register a callback so that the entropy pool code could rekey it when
a lot of bits were available.  Details at 11.

Finally, rename the "stir" function (which did not stir) to "rekey",
which is what it actually does.
2002-10-06 06:47:40 +00:00
oster
eb9d6f5ffa Add a missing RF_LOCK_MUTEX(). 2002-10-06 05:32:59 +00:00
oster
0567afd1cf Introduce a temp variable, and allocate the ReconCtrl structure before
we protect raidPtr.  One less thing for LOCKDEBUG to complain about.
2002-10-06 05:23:55 +00:00