Age | Commit message (Collapse) | Author |
|
ok deraadt
|
|
we do this to prevent people from opening a device that sounds good, but
doesn't have the properties they really need.
ok deraadt
|
|
sysctl.h was reliant on this particular include, and many drivers included
sysctl.h unnecessarily. remove sysctl.h or add proc.h as needed.
ok deraadt
|
|
supported it doesn't do any harm), so put the KNOTE() in selwakeup() itself and
remove it from any occurences where both are used, except one for kqueue itself
and one in sys_pipe.c (where the selwakeup is under a PIPE_SEL flag).
Based on a diff from tedu.
ok deraadt
|
|
should be impossible given the multi-order delta logic
ok deraadt@
|
|
equivalent C code into a rol instruction anyway (confirmed with
objdump -d); "nuke it" weingart@
|
|
|
|
worked on with djm
|
|
This lets early arc4random() calls to return at least non-uniqe values
on different machines. The dmesg will have different MAC addresses,
etc. Also ignore the entropy count in arc4_stir, and just take what's
there. sizeof(struct timeval) should be sizof(struct timespec)
This was forgotten when we switched to nanotime.
With help from mickey.
OK djm@, deraadt@
|
|
userspace - mitigates an effective DoS since generating these can hog
the CPU at splhigh()
feedback & ok tedu@ deraadt@
|
|
arandom code, just like minor 4. in fact, make them act exactly
the same.
|
|
Really just the low-hanging fruit of (hopefully) forthcoming timeout
conversions.
ok art@, krw@
|
|
POOL_TAP5 is always 1 so unifdef it
no binary change
|
|
arranged. They are now layed out in four sections:
1. Master entropy pool maintenance (add_entropy_words & extract entropy)
2. Entropy crediting (add_*_randomness backend)
3. Exported kernel API: arc4random() and friends
4. /dev/*random char devices
|
|
Jinmei_Tatuya AT isc.org via jakob@
empirically verified for entire domain of upper_bound
|
|
ok deraadt@
|
|
(2^30,2^31). Nothing in the tree yet requests random numbers bounded
by this range.
report jakob!deraadt; ok deraadt@
|
|
in the range 0 <= x < upper_bound
Please use this new API instead of "arc4random() % upper_bound", as it
avoids the "modulo bias" that favours small results when upper_bound is
not a power of two.
feedback deraadt@ mcbride@; ok deraadt@
|
|
ok tedu@ djm@
|
|
|
|
spl swizzling so we go to splhigh and back once per request instead of
once per byte.
Service large requests for arc4random_bytes using an independently keyed
generator rather than hogging the main one (at splhigh).
feedback from henric@; ok deraadt@
|
|
ok krw@
|
|
ok miod@
|
|
|
|
|
|
|
|
the amount requested from the pool's entropy estimate; ok mickey@ deraadt@
|
|
debugger-visible. 'makes sense' mickey@
|
|
|
|
|
|
OK mickey@
|
|
bigger; asked by art@
|
|
|
|
of from the stack. Keeps us from running out of kernel stack during
stack-heavy networking load. The bug manifests as a panic during
bootup with an fpu-related assertion failure on i386.
Fix from Christopher Pascoe; commit requested by deraadt@
|
|
This moves md5.c out of libkern and into sys/crypto where it belongs (as
requested by markus@). Note that md5.c is still mandatory (dev/rnd.c uses it).
Verified with IPsec + hmac-md5 and tcp md5sig. OK henning@ and hshoexer@
|
|
<sven_dehmlow@gmx.de>
|
|
|
|
paniced anyway elsewhere)
|
|
|
|
|
|
now call the poll backend. With this change we implement greater
poll(2) functionality instead of emulating it via the select backend.
Adapted from NetBSD and including some changes from FreeBSD.
Tested by many, deraadt@ OK
|
|
argument. old cred only calls user suser_ucred. this will allow future
work to more flexibly implement the idea of a root process. looks like
something i saw in freebsd, but a little different.
use of suser_ucred vs suser in file system code should be looked at again,
for the moment semantics remain unchanged.
review and input from art@ testing and further review miod@
|
|
there by multiple pathways, where it worked
until read from userland in big buffers and some luck.
does not cause a memory trashing, but rather may
mess up the arc4 state such that it will not generate
one particular value until a stir. sigh.
was reported by multiple people over some time.
|
|
|
|
|
|
Throw away the first N words of output, as suggested in the
paper "Weaknesses in the Key Scheduling Algorithm of RC4"
by Fluher, Mantin, and Shamir. (N = 256 in our case.)
|
|
|
|
|
|
later pt out by camield@
|
|
|