Commit Graph

206967 Commits

Author SHA1 Message Date
christos
3f19719796 snprintf/vsnprintf can accept NULL/0 buffers and work properly as expected.
Before they used to return incorrect length on short buffers. Remove unused
error path.
2011-11-20 23:01:18 +00:00
christos
a548e427f9 simplify, no need for va_copy here. Add KASSERT. 2011-11-20 22:58:31 +00:00
christos
51f50a4d9f mark printf function 2011-11-20 22:50:12 +00:00
gavan
6c2570459b Implement timeouts when blocking the calling process with tsleep.
Fixes PR kern/33452
2011-11-20 22:27:39 +00:00
njoly
0a4b126e70 Add Xorg modules debug entries. 2011-11-20 21:50:38 +00:00
dholland
c60360c18d Reshuffle decls among the quota headers so everything is in the place
it should be:
   - stuff for the proplib interface goes in <quota/quotaprop.h>
   - stuff for userlevel only goes in <quota/quota.h>
   - stuff shared between user and kernel goes in <sys/quota.h>

Note that <quota/quota.h> and <quota/quotaprop.h> are expected to be
moved or removed later on... one thing at a time.

Update include directives in other files as needed.
2011-11-20 21:43:34 +00:00
apb
0131e55685 Use va_copy to avoid undefined behaviour in handling the
va_list arg.
2011-11-20 21:27:26 +00:00
dholland
c8530f0b4f Add missing CLEANFILES+=x11perfcomp 2011-11-20 21:02:23 +00:00
jym
6bfeabc65a Expose pmap_pdp_cache publicly to x86/xen pmap. Provide suspend/resume
callbacks for Xen pmap.

Turn static internal callbacks of pmap_pdp_cache.

XXX the implementation of pool_cache_invalidate(9) is still wrong, and
IMHO this needs fixing before -6. See
http://mail-index.netbsd.org/tech-kern/2011/11/18/msg011924.html
2011-11-20 19:41:27 +00:00
yamt
6894cdda89 revert machdep.c rev. 1.168 because it's likely to have the same problem
as i386's one.
http://mail-index.NetBSD.org/source-changes-d/2011/11/19/msg004283.html
2011-11-20 18:42:56 +00:00
yamt
fbc189d43b revert dumpsys.c rev. 1.13 because it was reported to cause a problem.
http://mail-index.NetBSD.org/source-changes-d/2011/11/19/msg004283.html
2011-11-20 18:41:12 +00:00
tsutsui
e60b9ec2c8 Add an entry for romcons. 2011-11-20 17:21:15 +00:00
tsutsui
b05caac801 Create romcons device node. 2011-11-20 17:18:34 +00:00
tsutsui
217e34e4b6 Add preliminary PROM internal function based framebuffer console support,
which was demonstrated at Open Source Conference 2011 Kansai @ Kyoto
back in July:
http://www.NetBSD.org/gallery/events.html#opensourceconf2011-Kansai

- map 0xc0000000-0xffffffff PA region (which is mirror of PA 0x0-0x3fffffff)
  to the same VA via %tt0 and %tt1 registers and move KVA space accordingly
  (like luna68k does for its devices)
- save trap #0 vector for PROM function calls in early bootstrap
  and register it to trap #14 to call it from kernel for console output
- add dumb romcall based tty attachment taken from src/sys/dev/ofw/ofcons.c
- add rom function call stubs from news68k/stand/common/romcalls.S
- remove IIOV() macro for device registers where now mapped PA==VA via %tt1

XXX: romcons is not enabled yet because there is no generic interface
XXX: to attach wskbd(4) to non wsdisplay(4) devices like this romcons.
2011-11-20 15:38:00 +00:00
para
4255d01378 make it compile without DIAGNOSTIC defined 2011-11-20 15:37:31 +00:00
nonaka
2d605fee5f Added "Lenovo ThinkVision LT1421 Wide" entry. 2011-11-20 12:29:33 +00:00
nonaka
63cfe262c0 regen. 2011-11-20 12:27:36 +00:00
nonaka
6c55042254 Added "Lenovo ThinkVision LT1421 Wide" entry. 2011-11-20 12:26:49 +00:00
kiyohara
6c04b3bca9 Fix build failed. Include if_inarp.h. 2011-11-20 12:15:38 +00:00
kiyohara
75e1d93cec Remove a white-space and a Tab. 2011-11-20 11:20:32 +00:00
hannken
d3703f2f33 Fix locking against self in veriexec_fp_calc(). 2011-11-20 10:32:33 +00:00
tnozaki
1c5f19ca24 add comment about r1.6 -> r1.7 change. 2011-11-20 07:43:52 +00:00
jakllsch
fb21a55c1a Recent changes to the at91 code enable this kernel config to build after
the hypothetical ds1672rtc(4) is commented out and symtab space is bumped.
Fixes PR#43834.
2011-11-20 04:18:57 +00:00
nonaka
cfee7b822d compile again. 2011-11-20 04:07:50 +00:00
christos
eb50a1b80e enough with the compile time warnings. 2011-11-20 02:54:25 +00:00
agc
38a27f5af8 simplify code by removing a useless "#define STATIC static" in both debug
and normal usage, and all of its uses.
2011-11-20 01:23:57 +00:00
agc
76ad6f22c6 give the correct count of arguments to the sub-functions 2011-11-20 01:14:17 +00:00
tls
3c620dc145 An undocumented behavior of the sysctl kern.arandom node used to allow
sucking up to 8192 bytes out of the kernel arc4random() generator at a
time.  Supposedly some very old application code uses this to rekey
other instances of RC4 in userspace (a truly great idea).  Reduce the
limit to 256 bytes -- and note that it will probably be reduced to
sizeof(int) in the future, since this node is so documented.
2011-11-20 01:09:14 +00:00
tls
b2b4764c00 Add very, very temporary and ugly work around for my braino about detaching bad devices. Will fix as soon as I have more time with the hardware where I can reproduce this. 2011-11-20 00:45:15 +00:00
tls
dff81727fe Fix a backwards memcmp() that was causing all hardware sources to detach. 2011-11-20 00:28:51 +00:00
tls
3afd44cf08 First step of random number subsystem rework described in
<20111022023242.BA26F14A158@mail.netbsd.org>.  This change includes
the following:

	An initial cleanup and minor reorganization of the entropy pool
	code in sys/dev/rnd.c and sys/dev/rndpool.c.  Several bugs are
	fixed.  Some effort is made to accumulate entropy more quickly at
	boot time.

	A generic interface, "rndsink", is added, for stream generators to
	request that they be re-keyed with good quality entropy from the pool
	as soon as it is available.

	The arc4random()/arc4randbytes() implementation in libkern is
	adjusted to use the rndsink interface for rekeying, which helps
	address the problem of low-quality keys at boot time.

	An implementation of the FIPS 140-2 statistical tests for random
	number generator quality is provided (libkern/rngtest.c).  This
	is based on Greg Rose's implementation from Qualcomm.

	A new random stream generator, nist_ctr_drbg, is provided.  It is
	based on an implementation of the NIST SP800-90 CTR_DRBG by
	Henric Jungheim.  This generator users AES in a modified counter
	mode to generate a backtracking-resistant random stream.

	An abstraction layer, "cprng", is provided for in-kernel consumers
	of randomness.  The arc4random/arc4randbytes API is deprecated for
	in-kernel use.  It is replaced by "cprng_strong".  The current
	cprng_fast implementation wraps the existing arc4random
	implementation.  The current cprng_strong implementation wraps the
	new CTR_DRBG implementation.  Both interfaces are rekeyed from
	the entropy pool automatically at intervals justifiable from best
	current cryptographic practice.

	In some quick tests, cprng_fast() is about the same speed as
	the old arc4randbytes(), and cprng_strong() is about 20% faster
	than rnd_extract_data().  Performance is expected to improve.

	The AES code in src/crypto/rijndael is no longer an optional
	kernel component, as it is required by cprng_strong, which is
	not an optional kernel component.

	The entropy pool output is subjected to the rngtest tests at
	startup time; if it fails, the system will reboot.  There is
	approximately a 3/10000 chance of a false positive from these
	tests.  Entropy pool _input_ from hardware random numbers is
	subjected to the rngtest tests at attach time, as well as the
	FIPS continuous-output test, to detect bad or stuck hardware
	RNGs; if any are detected, they are detached, but the system
	continues to run.

	A problem with rndctl(8) is fixed -- datastructures with
	pointers in arrays are no longer passed to userspace (this
	was not a security problem, but rather a major issue for
	compat32).  A new kernel will require a new rndctl.

	The sysctl kern.arandom() and kern.urandom() nodes are hooked
	up to the new generators, but the /dev/*random pseudodevices
	are not, yet.

	Manual pages for the new kernel interfaces are forthcoming.
2011-11-19 22:51:18 +00:00
jnemeth
be8bba3314 grammar fix 2011-11-19 20:44:58 +00:00
tnozaki
7119b42a87 fix memory leak, pointed by nonaka-san(again^3). 2011-11-19 18:48:39 +00:00
tnozaki
c0a2d6e78c remove useless free(), pointed by nonaka-san(again^2). 2011-11-19 18:43:40 +00:00
tnozaki
25c06e6322 return EINVAL when module validation failed, pointed by nonaka-san(again). 2011-11-19 18:34:21 +00:00
tnozaki
a750734d28 remove unused variable, pointed by nonaka-san, thanks. 2011-11-19 18:20:13 +00:00
tnozaki
b70d1274ae reliability fix, merge libc/regex fix to avoid memory exhaust problem. 2011-11-19 17:45:11 +00:00
mbalmer
d03cf6c291 One more. 2011-11-19 17:40:19 +00:00
mbalmer
dbea318e33 Add a few. 2011-11-19 17:38:58 +00:00
christos
406f0dc39d Apply the better patch in the PR. 2011-11-19 17:34:41 +00:00
mbalmer
f6673607c2 Better wording. 2011-11-19 17:30:09 +00:00
nonaka
b09959eb06 disable kloader(4). 2011-11-19 17:17:41 +00:00
nonaka
f7d403d589 enable kloader(4). 2011-11-19 17:15:58 +00:00
cherry
de4e5fae37 [merging from cherry-xenmp] bring in bouyer@'s changes via:
http://mail-index.netbsd.org/source-changes/2011/10/22/msg028271.html
From the Log:
Log Message:
Various interrupt fixes, mainly:
keep a per-cpu mask of enabled events, and use it to get pending events.
A cpu-specific event (all of them at this time) should not be ever masked
by another CPU, because it may prevent the target CPU from seeing it
(the clock events all fires at once for example).
2011-11-19 17:13:39 +00:00
jakllsch
dc0fd6acd4 Add workaround for infrequently encountered DMA engine limitation. 2011-11-19 17:01:38 +00:00
agc
a5b83a6434 grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)
2011-11-19 16:41:55 +00:00
christos
f0e2d82c74 PR/45633: Christian Biere: Don't access byte after NUL when setting magic. 2011-11-19 16:11:24 +00:00
mlelstv
329d131575 Fix passing of floating point registers. 2011-11-19 13:00:38 +00:00
mlelstv
ea28fb54a5 The compiler is allowed to use intermediate higher precision for float
arithmetic, which may cause differences smaller than float precision
but still much larger than eps = 1e-30.
Forcing intermediate results to volatile variables removes the excess
precision.
2011-11-19 12:46:41 +00:00
jmcneill
8d134405ac fix build when ALTQ is defined 2011-11-19 12:32:54 +00:00