Commit Graph

240873 Commits

Author SHA1 Message Date
riastradh
f2a2263adb Avoid reading one byte past end of array.
Fixes

   acpiout0: brightness levels: [20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,uvm_fault(0xffffffff8133d200, 0xffff80000c1d8000, 1) -> e
   fatal page fault in supervisor mode
   trap type 6 code 0 rip ffffffff803b63d7 cs 8 rflags 10212 cr2 ffff80000c1d8000 ilevel 8 rsp ffffffff816a1b00
2016-02-18 15:42:44 +00:00
sjg
f24ab88bf9 It's 2016 2016-02-18 06:18:58 +00:00
sjg
f67d104eff Actually FALSE as last arg to Var_Subst makes more sense 2016-02-18 05:40:50 +00:00
sjg
a6c0ebbea8 Add support for .dinclude
Like .sinclude missing file will be ignored.
Like .depend stale dependencies will be ignored.
Allows better implementation of auto depend.

Reviewed by: christos
Requested by: Bryan Drewery at FreeBSD.
2016-02-18 05:02:49 +00:00
sjg
71bb4da1c9 Adapt to new Var_Subst prototype 2016-02-18 05:01:39 +00:00
macallan
677061ce2a Adapt CI20 HWRNG to synchronous on-demand callback.
Omit needless softint/locking dance.
from riastradh@
2016-02-17 20:12:42 +00:00
christos
f91581fb8e PR/50815: David Binderman: Remove dup test 2016-02-17 20:11:17 +00:00
christos
7bafbf922e PR/50818: David Binderman: Delete dead code (copied from if_et.c) 2016-02-17 20:05:45 +00:00
christos
90f8d4262f PR/50817: David Binderman: Delete dead code (copy from if_et.c) 2016-02-17 20:04:39 +00:00
christos
f6aa81a51c PR/50819: David Binderman: Delete dead code. 2016-02-17 20:02:41 +00:00
christos
6e07b6674d PR/50820: David Binderman: Fail when !(edge|pulse) instead of !edge && edge 2016-02-17 20:00:15 +00:00
christos
3b8b3a1c95 PR/50821: David Binderman: remove "i <" i < 2016-02-17 19:57:01 +00:00
christos
f9c7ee08d4 PR/50822: David Binderman: Fix copy length. 2016-02-17 19:54:11 +00:00
christos
be8ee66399 PR/50823: David Binderman: Limit scanf width 2016-02-17 19:52:20 +00:00
christos
d6c5440ef4 PR/50824: David Binderman: Limit scanf width 2016-02-17 19:51:29 +00:00
christos
22383670cc whitespace and header sorting changes (Ingo Schwarze). No functional changes. 2016-02-17 19:47:49 +00:00
riastradh
446ef7b7a7 Don't schedule a softint if we have nothing to do.
Some systems seem to have gotten stuck in a softint processing loop
doing nothing and then trying to do it again.  Might fix gson's
frozen qemu/anita sparc autobuilds -- tested on macallan's real sparc
hardware and confirmed to fix at least some freeze at boot.
2016-02-17 19:44:40 +00:00
plunky
e6e528b81c extend the match function, to match devices from a selection of
manufacturers that use modern Broadcom chips, and which represent
as a vendor-specific device class.
2016-02-17 10:52:55 +00:00
riastradh
d80621961e Need <sys/mutex.h> for mutex(9). 2016-02-17 01:48:36 +00:00
riastradh
9e2ce23efb Caller must have exclusive access to rndsource for rnd_add_data(_sync). 2016-02-17 01:48:04 +00:00
riastradh
e3389acee7 Make hyperentropy rndsource work synchronously, again.
This time for real!  *crosses fingers*
2016-02-17 01:42:25 +00:00
riastradh
7e7551b30d Move entropy_count into the scope where it is used.
Omit now-unused definition.

XXX This code probably shouldn't be under DIAGNOSTIC...  It is
significantly more than just an assertion.
2016-02-17 01:23:32 +00:00
riastradh
25f6b3cbaa Use real atomics, not atomics faked with membars, for rnd_printing. 2016-02-17 01:09:49 +00:00
riastradh
4242e92df8 Omit needless call to rnd_getmore in rnd_extract_data.
The only remaining caller -- rnd_extract -- already does it.
2016-02-17 01:01:42 +00:00
riastradh
3d1bee43d3 Omit call to rnd_getmore from rnd_process_events.
There are three cases to consider here:

1. You have on-demand synchronous rndsources, e.g. RDRAND (and you're
willing to use it).  In that case, you'll just use those whenever you
need to extract entropy.  There's no benefit to requesting more from
them when we're entering data into the pool.

2. You have on-demand asynchronous rndsources.  These should continue
trying to feed data to the entropy pool as long as it needs more, so
there's no benefit to requesting more from them when we're entering
data into the pool.

3. You don't have any on-demand rndsources.  Then rnd_getmore does
nothing, so there's no benefit to calling it.

ok tls
2016-02-17 00:57:36 +00:00
riastradh
0cbde2cd73 Match various Apple USB Bluetooth controllers.
From mlelstv.
2016-02-17 00:49:28 +00:00
riastradh
bb2b89402e regen 2016-02-17 00:48:57 +00:00
riastradh
535089561c Add various USB Bluetooth controllers.
From mlelstv.
2016-02-17 00:46:17 +00:00
riastradh
3945f2f07a Add rnd_add_data_sync for synchronous on-demand rndsource callbacks.
Avoids lock recursion in rndsinks:

rndsink user holds lock
calls rndsink_request
calls rnd_getmore
calls an rndsource callback
calls rnd_add_data
calls rnd_process_events
calls rndsinks_distribute
calls rndsink callback
acquires rndsink user lock.

This can happen only before the rnd_process_events softint is
established, but that's enough to cause a problem and is the main
reason why all our HWRNG drivers are so byzantine (soon to be
fixed!).

ok tls
2016-02-17 00:43:42 +00:00
riastradh
a7a8acd649 Cast uint8_t to uint32_t before shifting left by 24.
Otherwise this is undefined behaviour unless int is 32-bit and the
uint8_t value happens to be <=127.
2016-02-17 00:01:23 +00:00
riastradh
7d9363db07 Need <sys/queue.h> for LIST_ENTRY and <sys/null.h> for NULL. 2016-02-16 23:07:58 +00:00
christos
e84df91e32 More header cleanups from Ingo Schwarze. 2016-02-16 22:53:14 +00:00
christos
bc4f01ce82 - don't set _GNU_SOURCE. We are not supposed to make decisions for others.
- don't special-case wcsdup()
From Ingo Schwarze.
2016-02-16 19:29:51 +00:00
christos
23f3e7075d get rid of bool_t (Ingo Schwarze) 2016-02-16 19:11:25 +00:00
christos
747f681109 more include file cleanup (Ingo Schwarze) 2016-02-16 19:08:41 +00:00
christos
a539b892c3 include errno.h 2016-02-16 15:54:15 +00:00
christos
aefc1e4460 From Ingo Scharze:
Let "el.h" include everything needed for struct editline,
and don't include that stuff multiple times.  That also improves
consistency, also avoids circular inclusions, and also makes it
easier to follow what is going on, even though not quite as nice.
But it seems like the best we can do...
2016-02-16 15:53:48 +00:00
christos
f09cb8c626 cleanup chartype.h includes (Ingo Schwarze) 2016-02-16 14:08:25 +00:00
christos
c807fdff98 one more 2016-02-16 14:07:47 +00:00
christos
40850369f8 cleanup inclusion of histedit.h (Ingo Schwarze) 2016-02-16 14:06:05 +00:00
christos
89cffc1532 include explicitly errno.h since we use it. 2016-02-16 14:04:58 +00:00
christos
67bb823526 No need to include "sys.h" from here; it is included from config.h 2016-02-16 14:04:24 +00:00
bouyer
f35e6799e0 In xennet_xenbus_detach(), remove the event handler early (just after
xennet_stop()) so that we don't get events while slepping (e.g.
in softint_disestablish()) when some structures have already been
freed.
Problem reported and patch tested by Rohan Desai.
2016-02-16 08:41:32 +00:00
skrll
970a1b8e99 Re-enable the TT support that existed previously. 2016-02-16 07:51:13 +00:00
nonaka
732816bd3f Reduced INSTALL kernel size. 2016-02-16 05:14:31 +00:00
ozaki-r
1926a64c9e Remove workaround for GATEWAY
The workaround was introduced because lltable/llentry uses rwlock
but it may be executed in hardware interrupt due to fast forward.
Now we don't run fast forward in hardware interrupt anymore, so
we can remove the workaround.
2016-02-16 01:31:26 +00:00
christos
d8252c8b23 attribute unused 2016-02-15 23:36:30 +00:00
christos
67b10d3e9e OpenBSD term.c rev. 1.7 2002/11/29 20:13:39 deraadt
spelling
2016-02-15 22:53:38 +00:00
christos
f91f480498 OpenBSD readline.c rev. 1.14 2015/02/06 23:21:58 millert
use SIZE_MAX
2016-02-15 22:48:59 +00:00
riastradh
f1c295721b cardbus autoconf uses cardbus_attach_args, not isapnp_attach_args. 2016-02-15 22:37:54 +00:00