Commit Graph

240992 Commits

Author SHA1 Message Date
roy
72b9424275 Implement a queue for if_link_state_change() calls to fix a race condition
introduced in the prior patch.

The queue has capacity to store 8 link state changes, if it overflows then
the oldest state change is lost, but the oldest DOWN state change is
preserved to ensure any subsequent UP state changes reflect properly.

Because there are only 3 states to queue, the queue itself is implemented
by storing 2-bit numbers in a bigger one.
To increase the size of the queue, just increase the size of the backing
store to a bigger number.
2016-02-19 20:05:43 +00:00
joerg
b0b911ff3e Don't use #pragma weak to implicitly change argument types. 2016-02-19 19:25:59 +00:00
joerg
e9ae0934d6 dmu_objset_rename is an alias for dsl_dataset_rename, but differs in
constness of the first argument. Newer clang checks for this and
prohibits it, so just be consistent by constifying the latter.
2016-02-19 19:25:22 +00:00
macallan
c04b415846 switch powerpc ports to new binutils 2016-02-19 18:47:24 +00:00
pooka
2657abc4e0 add cpu_lock
from freqlabs on irc
2016-02-19 18:38:37 +00:00
christos
3129d5ec3f avoid re-def 2016-02-19 17:05:40 +00:00
christos
2f573a20ed PR/50827: Richard Hansen: Fix default variable assignment with arithmetic,
from kre.
2016-02-19 13:50:37 +00:00
christos
dd7e4e3700 undo accidental commit 2016-02-19 13:49:01 +00:00
christos
64d8e9d299 Add a test for PR/50827 2016-02-19 13:48:28 +00:00
sjg
dcbb4e91e7 Initialize curFile->depending in Parse_SetInput. 2016-02-19 06:19:06 +00:00
riastradh
f818fa6833 Explicitly cast between char and unsigned char here. 2016-02-19 04:18:32 +00:00
riastradh
9628679b27 Need <stdbool.h> for true/false. 2016-02-19 03:53:46 +00:00
riastradh
1a5afb31a5 Various housekeeping.
- Include <ufs/lfs/lfs.h> for union lfs_dinode &c.
- Include <string.h> or <sys/systm.h> for memcpy.
- Avoid signedness mismatch in lfs dino accessor for `rdev'.
- Avoid shadowing global `index'.
2016-02-19 03:43:42 +00:00
sjg
9359338bf8 getBoolean:
We need :U to ensure we get an empty string if knob isn't set.
2016-02-19 00:11:45 +00:00
sjg
230e72b2d8 Delete :@ loop iterator when done with it 2016-02-18 23:33:25 +00:00
macallan
e2007d759e gcc does not pass floating point options to the assembler
by default, because it is afraid that the stricter tests
will break userland code. The new binutils is pickier about
this. Gcc 5.x fixes the issue so for now, set explicitly
the assembler soft-float flags when we build the kernel.
see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64569
2016-02-18 20:50:44 +00:00
sjg
3c092045e1 Adapt to changed Var_Subst() 2016-02-18 20:33:40 +00:00
sjg
8d916cfab5 Add .export-literal to avoid the need for $$ dance when trying to put
unexpanded variables into environment.

Reviewed by: christos
2016-02-18 20:25:08 +00:00
christos
4d0b1055db Collapse the 3 boolean parameter to 1 flags parameter. No functional change. 2016-02-18 18:29:14 +00:00
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