djm [Sun, 21 Dec 2014 22:27:55 +0000 (22:27 +0000)]
Add FingerprintHash option to control algorithm used for key
fingerprints. Default changes from MD5 to SHA256 and format
from hex to base64.
Feedback and ok naddy@ markus@
shadchin [Sun, 21 Dec 2014 18:25:07 +0000 (18:25 +0000)]
WSCONS_EVENT_WSMOUSED_SLEEP and WSCONS_EVENT_WSMOUSED_CLOSE not used anymore.
ok mpi@
shadchin [Sun, 21 Dec 2014 18:23:37 +0000 (18:23 +0000)]
Cleanup - remove event WSCONS_EVENT_WSMOUSED_SLEEP, WSCONS_EVENT_WSMOUSED_CLOSE.
Do not need it now.
ok mpi@
shadchin [Sun, 21 Dec 2014 18:16:07 +0000 (18:16 +0000)]
WSMOUSE_INPUT_WSMOUSED_CLOSE not used anymore.
ok mpi@
mlarkin [Sun, 21 Dec 2014 16:27:07 +0000 (16:27 +0000)]
Prevent writing to the kernel area via the direct map. We do this by padding
the end of the kernel area to 2MB, so that the direct map pages can then
have the W permission removed (X permission was already removed in a previous
diff). This creates a VA hole at the end of bss, so adjust for that since
that's where symbols get loaded by the bootloader (for now, map that region
RO until the boot loader can be updated to place the symbols at "end" instead
of "end of bss").
with help from and ok deraadt@
schwarze [Sun, 21 Dec 2014 14:49:00 +0000 (14:49 +0000)]
Use -m for macro set selection in mandoc(1) mode only, not in man(1)
and apropos(1) mode. While here, put a space character between
options and option arguments in error messages.
Both reported by Alessandro DE LAURENZIS <just22 dot adl at gmail dot com>.
mpi [Sun, 21 Dec 2014 12:04:01 +0000 (12:04 +0000)]
Always clear a port reset feature after setting it, or at least try to.
Otherwise we might leave a port in an unwanted state.
Found while investigating timeout issues on xhci(4).
mpi [Sun, 21 Dec 2014 11:46:53 +0000 (11:46 +0000)]
Various transfer improvements/fixes.
Chain TRBs when submitting bulk or interrupt transfers with a length
bigger than the Maxium Packet Size of the endpoint.
Append a supplementary TRB if a zero length packet is required.
While here, set the flags of each TRB at once. Even if this driver
implementation fills the first TRB of a chain last, be safe and make
sure the hardware wont miss any flag.
Note that with this change, DMA sync operations might not cover the
whole chain, just like for control transfers, if the ring is starting
over.
Previous version of this diff tested by Peter N. M. Hansteen, thanks!
mpi [Sun, 21 Dec 2014 11:20:24 +0000 (11:20 +0000)]
Use a bitmask when dumping TRB flags. No change in !XHCI_DEBUG.
espie [Sun, 21 Dec 2014 09:33:12 +0000 (09:33 +0000)]
fix test-redef2:
- introduce explicit STORAGE classes for the shadow stack entries
- delay freeing definitions if they're in-use, keep them in a simple array.
okay millert@
guenther [Sun, 21 Dec 2014 04:49:00 +0000 (04:49 +0000)]
<sys/endian.h> needs <sys/cdefs.h>
found previously by someone whose email I've lost; rediscovered by miod@
ok millert@ deraadt@
guenther [Sun, 21 Dec 2014 00:54:49 +0000 (00:54 +0000)]
Stop pulling in <arpa/inet.h> or <arpa/nameser.h> when unnecessary.
*Do* pull it in when in_{port,addr}_h is needed and <netinet/in.h> isn't.
ok reyk@
daniel [Sun, 21 Dec 2014 00:23:30 +0000 (00:23 +0000)]
Show the sign for NaN as per POSIX; from Elliott Hughes.
ok martynas@, millert@, doug@
daniel [Sun, 21 Dec 2014 00:17:24 +0000 (00:17 +0000)]
Fix build with -Werror -std=c99 -pedantic.
ok schwarze@
miod [Sat, 20 Dec 2014 18:15:29 +0000 (18:15 +0000)]
Replacing <machine/endian.h> with <sys/endian.h> does not imply removing
<sys/types.h>. kthxbye
krw [Sat, 20 Dec 2014 16:34:27 +0000 (16:34 +0000)]
Replace switch workq with taskq.
Diff from blambert@, double ok@ kettenis.
krw [Sat, 20 Dec 2014 15:54:48 +0000 (15:54 +0000)]
Zap a sneaky trailing blank that was hiding in plain view.
kettenis [Sat, 20 Dec 2014 13:45:15 +0000 (13:45 +0000)]
Zap local variable that shadows another local variable. Fixes a panic caused
by passing random stack garbage as the size to free(9).
From David Imhoff
krw [Sat, 20 Dec 2014 13:37:32 +0000 (13:37 +0000)]
Zap a bunch of leading/trailing whitespace.
reyk [Sat, 20 Dec 2014 11:27:18 +0000 (11:27 +0000)]
Cleanup vmt(4) by changing an ugly if statement for received commands
into a table of callbacks. Additionally, turn printfs into DPRINTFs
to make the driver less chatty by default.
OK deraadt@
tedu [Sat, 20 Dec 2014 06:04:39 +0000 (06:04 +0000)]
openbsd rcisd
guenther [Sat, 20 Dec 2014 05:43:26 +0000 (05:43 +0000)]
$OpenBSD for our rev here
schwarze [Sat, 20 Dec 2014 02:26:42 +0000 (02:26 +0000)]
Fix two issues causing a class of assertion failures found by jsg@ with afl.
1) rew_sub(): Make sure REWIND_MORE is acted upon even when followed by
REWIND_NONE. This prevents .It from ending up inside other children of .Bl.
2) blk_exp_close(): Only allow extension of .Bl when it has at least
one .It. Otherwise, a broken child block could be moved in front of
the .Bl, effectively resulting in a .Bl that ended before it began.
schwarze [Sat, 20 Dec 2014 00:19:54 +0000 (00:19 +0000)]
resolve some code duplication; no functional change
guenther [Fri, 19 Dec 2014 22:44:58 +0000 (22:44 +0000)]
Use <sys/endian.h> instead of <machine/endian.h>
ok dlg@ mpi@ bcook@ millert@ miod@
deraadt [Fri, 19 Dec 2014 22:30:47 +0000 (22:30 +0000)]
sync with libc, using brnz,pt instead, should be better
ok kettenis
bluhm [Fri, 19 Dec 2014 21:41:20 +0000 (21:41 +0000)]
Use a simpler expression to check the ether type in scapy. This
makes the fragment tests work on FreeBSD. From Ilya Bakulin.
tedu [Fri, 19 Dec 2014 20:18:15 +0000 (20:18 +0000)]
no need to kvm the palloc. the pgsize is more correctly accessed via pool.
deraadt [Fri, 19 Dec 2014 19:28:55 +0000 (19:28 +0000)]
Use reallocarray() where suitable
ok millert doug
bluhm [Fri, 19 Dec 2014 18:57:17 +0000 (18:57 +0000)]
Do not report an EDQUOT "Disk quota exceeded" error from the routing
code. Instead generate an ENOBUFS "No buffer space available" error
at the malloc(9) failure in rt_setgate(9) and propagate it.
OK mpi@
tedu [Fri, 19 Dec 2014 17:44:29 +0000 (17:44 +0000)]
multiline string literals aren't really a thing. just smush a few strings
together.
tedu [Fri, 19 Dec 2014 17:25:14 +0000 (17:25 +0000)]
remove ipw. it wasn't included in generic, but nobody complained,
indicating probably nobody has one of these in amd64 capable hardware.
spotted by krw. ok kettenis krw
tedu [Fri, 19 Dec 2014 17:16:57 +0000 (17:16 +0000)]
make the code look more like libc by changing Transform to take the state
ok millert
tedu [Fri, 19 Dec 2014 17:15:16 +0000 (17:15 +0000)]
bcopy to memcpy. ok deraadt millert
tedu [Fri, 19 Dec 2014 17:14:39 +0000 (17:14 +0000)]
unifdef INET in net code as a precursor to removing the pretend option.
long live the one true internet.
ok henning mikeb
schwarze [Fri, 19 Dec 2014 17:10:42 +0000 (17:10 +0000)]
Enforcing an arbitrary, implementation dependent, undocumented limit
by calling assert() when valid user input exceeds it is a bad idea.
Allocate the terminal font stack dynamically instead of crashing
above 10 entries. Issue found by jsg@ with afl.
krw [Fri, 19 Dec 2014 15:46:22 +0000 (15:46 +0000)]
Fix tree breakage due to unused variable after last commit.
krw [Fri, 19 Dec 2014 15:19:47 +0000 (15:19 +0000)]
Change scan and auth+assoc workq entries to taskq entries.
Identical diff originally and independently developed by blambert@.
reyk [Fri, 19 Dec 2014 15:14:48 +0000 (15:14 +0000)]
shuffle function declarations a bit; stylistic changes only.
tedu [Fri, 19 Dec 2014 15:14:04 +0000 (15:14 +0000)]
be like the kernel and only unroll if not small
reyk [Fri, 19 Dec 2014 15:07:33 +0000 (15:07 +0000)]
No need to include sys/types.h when sys/param.h is already included.
While here, sort includes a bit. No functional change.
deraadt [Fri, 19 Dec 2014 14:34:23 +0000 (14:34 +0000)]
sync
deraadt [Fri, 19 Dec 2014 14:30:44 +0000 (14:30 +0000)]
i386 unrolling blows up the media in a big way, due to -Os for
ramdisk libc builds. there has to be a better way without #ifdef's
in gross places, but I don't see it yet.
deraadt [Fri, 19 Dec 2014 14:23:58 +0000 (14:23 +0000)]
oops, forgot rndvar.h
ajacoutot [Fri, 19 Dec 2014 14:23:41 +0000 (14:23 +0000)]
Add rdp/rfb/vnc.
no objection from deraadt@
deraadt [Fri, 19 Dec 2014 14:19:41 +0000 (14:19 +0000)]
place the afterinstall: target correctly for static-only architectures
deraadt [Fri, 19 Dec 2014 14:15:50 +0000 (14:15 +0000)]
oops, forgot rndvar.h
tedu [Fri, 19 Dec 2014 14:12:00 +0000 (14:12 +0000)]
don't print vnodes if we didn't read them
tedu [Fri, 19 Dec 2014 14:08:20 +0000 (14:08 +0000)]
1. -T (totalflag) requires nlist too.
2. If we can't read a vnode, there's no way LIST_NEXT is going to be
meaningful.
3. set numvnodes before looping in case we return early.
getting better, but still not all fixed
krw [Fri, 19 Dec 2014 13:53:08 +0000 (13:53 +0000)]
Use taskq rather than workq to remove unwanted alias.
ok mikeb kettenis (for earlier version)
aoyama [Fri, 19 Dec 2014 13:17:35 +0000 (13:17 +0000)]
Move cbus.c, cbusvar.h, and pcex.c to new 'cbus' directory, to gather
'C-bus' device drivers in it.
More devices on cbus(4) will be added, hopefully :-)
ok miod@
reyk [Fri, 19 Dec 2014 13:04:07 +0000 (13:04 +0000)]
Support source-hash and random with tables and dynifs; not just pools.
This finally allows to use source-hash for dynamic loadbalancing, eg.
"rdr-to <hosts> source-hash", instead of just round-robin and least-states.
An older pre-siphash version of this diff was tested by many people.
OK tedu@ benno@
mcbride [Fri, 19 Dec 2014 12:31:03 +0000 (12:31 +0000)]
Comment is no longer true, remove it.
tedu [Fri, 19 Dec 2014 09:41:40 +0000 (09:41 +0000)]
remove hash.h. no longer needed. ok reyk
reyk [Fri, 19 Dec 2014 09:02:39 +0000 (09:02 +0000)]
Remove an unused sys/hash.h include from db_structinfo.c
(this file is only compiled with "option DDB_STRUCT").
ok guenther@
deraadt [Fri, 19 Dec 2014 07:42:49 +0000 (07:42 +0000)]
lonely bcopy called me by name
deraadt [Fri, 19 Dec 2014 07:23:57 +0000 (07:23 +0000)]
another handful of bcopy -> memcpy because there is no overlap
tedu [Fri, 19 Dec 2014 05:59:21 +0000 (05:59 +0000)]
start retiring the nointr allocator. specify PR_WAITOK as a flag as a
marker for which pools are not interrupt safe. ok dlg
tedu [Fri, 19 Dec 2014 05:48:36 +0000 (05:48 +0000)]
if you really must look inside the pool to decide if you've called
pool_init already, the pr_size field is the least worst field to peek at.
tedu [Fri, 19 Dec 2014 05:36:28 +0000 (05:36 +0000)]
add messages to #error so we know what's what (and so unifdef doesn't poop)
schwarze [Fri, 19 Dec 2014 04:57:11 +0000 (04:57 +0000)]
Rewrite the low-level UTF-8 parser from scratch.
It accepted invalid byte sequences like 0xc080-c1bf, 0xe08080-e09fbf,
0xeda080-edbfbf, and 0xf0808080-
f08fbfbf, produced valid roff Unicode
escape sequences from them, and the algorithm contained strong
defenses against any attempt to fix it.
This cures an assertion failure in the terminal formatter caused
by sneaking in ASCII 0x08 (backspace) by "encoding" it as an (invalid)
multibyte UTF-8 sequence, found by jsg@ with afl.
As a bonus, the new algorithm also reduces the code in the function
by about 20%.
brad [Fri, 19 Dec 2014 04:53:58 +0000 (04:53 +0000)]
Make use of m_defrag() in re_encap().
tedu [Fri, 19 Dec 2014 04:00:00 +0000 (04:00 +0000)]
rename buffer to digest, more clear. ok deraadt
lteo [Fri, 19 Dec 2014 03:58:02 +0000 (03:58 +0000)]
CA.sh and CA.pl are gone
lteo [Fri, 19 Dec 2014 03:14:19 +0000 (03:14 +0000)]
Sync message digest algorithms with the ones actually implemented in
"openssl dgst".
feedback/ok jmc@
tedu [Fri, 19 Dec 2014 02:50:27 +0000 (02:50 +0000)]
convert bcopy/zero to memcpy. ok deraadt djm
dlg [Fri, 19 Dec 2014 02:49:07 +0000 (02:49 +0000)]
timestamp empty pages, and only free them if theyve been idle for at least
a second.
this basically brings back the functionality that was trimmed in r1.53,
except this version uses ticks instead of very slow hardware clock reads.
ok tedu@
dlg [Fri, 19 Dec 2014 02:46:47 +0000 (02:46 +0000)]
the last commit changed LIST_INSERT_HEAD to TAILQ_INSERT_TAIL cos the
latter is cheaper, but i forgot to change the thing that pulls pages off
those lists to match the change in direction. the page lists went from LIFO
to FIFO.
this changes pool_update_curpage to use TAILQ_LAST so we go back to LIFO.
pointed out by and ok tedu@
brad [Fri, 19 Dec 2014 02:32:57 +0000 (02:32 +0000)]
Rearrange mostly vmxnet3_init() to look like other Ethernet drivers.
ok reyk@
tedu [Fri, 19 Dec 2014 02:29:40 +0000 (02:29 +0000)]
sha512 produces enough output, we can simplify extraction by not looping.
ok deraadt djm
dlg [Fri, 19 Dec 2014 02:15:25 +0000 (02:15 +0000)]
replace the page LISTS with page TAILQs. this will let me pull pages from
either end of the lists cheaply.
ok kettenis@ tedu@
tedu [Thu, 18 Dec 2014 23:59:28 +0000 (23:59 +0000)]
remove two useless and unused hash penalty defines
djm [Thu, 18 Dec 2014 23:58:04 +0000 (23:58 +0000)]
don't count partial authentication success as a failure against
MaxAuthTries; ok deraadt@
brad [Thu, 18 Dec 2014 23:26:12 +0000 (23:26 +0000)]
Merge in some commits from upstream..
- Fix that failure to add tcp to tcp base does not leak the socket.
- Fixes for wildcard addition and deletion, speedup for some cases.
- Fix that queries for noname CH TXT are REFUSED instead of nodata.
- Fix #616: retry xfer for zones with no content after command.
- Fix that expired zones stay expired after a server restart.
- RFC 7344: CDS and CDNSKEY (read in).
ok sthen@
jmc [Thu, 18 Dec 2014 21:26:09 +0000 (21:26 +0000)]
an hex -> a hex;
deraadt [Thu, 18 Dec 2014 21:06:24 +0000 (21:06 +0000)]
obvious non-overlap bcopy -> memcpy
tedu [Thu, 18 Dec 2014 21:00:12 +0000 (21:00 +0000)]
convert one hot looking bcopy to memcpy
tedu [Thu, 18 Dec 2014 20:59:21 +0000 (20:59 +0000)]
delete a whole mess of unnecessary caddr_t casts
reyk [Thu, 18 Dec 2014 20:59:04 +0000 (20:59 +0000)]
Update test - the hashkey log message disappeared.
schwarze [Thu, 18 Dec 2014 20:58:00 +0000 (20:58 +0000)]
Don't let .Ta creep into an already-closed list; same as for .It.
Fixes an assertion found by jsg@ with afl.
reyk [Thu, 18 Dec 2014 20:55:01 +0000 (20:55 +0000)]
Update relayd to use siphash instead of sys/hash. The source-hash,
loadbalance and hash modes use a random key by default that can be
forced to be a static key with a new configuration argument.
With input from Max Fillinger.
ok tedu@
jmc [Thu, 18 Dec 2014 20:45:50 +0000 (20:45 +0000)]
update usage() and the list of non-standard (i.e. non-posix) options;
ok schwarze
tedu [Thu, 18 Dec 2014 20:30:58 +0000 (20:30 +0000)]
document power capacity units. from david higgs
then change everything from mu to u, as more traditional.
ok deraadt
tedu [Thu, 18 Dec 2014 20:29:08 +0000 (20:29 +0000)]
only unroll on i386 and amd64 (where confirmed to be much faster).
naddy found sparc64 gets a little slower when unrolled.
ok deraadt
schwarze [Thu, 18 Dec 2014 20:15:31 +0000 (20:15 +0000)]
Only keep leading .Sm inside a list when it immediately precedes
the first .It. Otherwise, move it out together with whatever
follows. Fixing an assertion failure found by jsg@ with afl.
deraadt [Thu, 18 Dec 2014 20:01:33 +0000 (20:01 +0000)]
use suspend_randomness() and resume_randomness()
reyk [Thu, 18 Dec 2014 19:31:37 +0000 (19:31 +0000)]
Wrap more of these long lines.
tedu [Thu, 18 Dec 2014 19:28:44 +0000 (19:28 +0000)]
two more uses of siphash. better hash for ipv4. maybe not needed for rbtree
hint, but still pretty. ok deraadt
tedu [Thu, 18 Dec 2014 19:27:04 +0000 (19:27 +0000)]
simple to use siphash here. ok deraadt
tedu [Thu, 18 Dec 2014 19:26:46 +0000 (19:26 +0000)]
simple to use siphash here. ok deraadt
schwarze [Thu, 18 Dec 2014 19:22:47 +0000 (19:22 +0000)]
When the head of a list item is extended with a partial explicit
macro (for example .Xo) and never closed again, the item ends up
without a body block. This can even happen for list types that
usually don't have heads in the first place. So even in this
case, check for the existence of the body before accessing it.
NULL pointer access found by jsg@ with afl.
deraadt [Thu, 18 Dec 2014 19:22:21 +0000 (19:22 +0000)]
wrap unreasonably long lines
reyk [Thu, 18 Dec 2014 19:18:22 +0000 (19:18 +0000)]
The VM host might send multiple messages at once but vmt(4) only
processed one of time per second. Change the code to process all
queued messages without delay immediately. This fixes two things: a)
the vmt time sensor is available on boot when ntpd -s is loaded and b)
the random seeding on resume (OS_Resume message) is executed almost
immediately and not delayed by about 20 seconds.
ok deraadt@
tedu [Thu, 18 Dec 2014 19:02:56 +0000 (19:02 +0000)]
use siphash for pf_lb. for ipv6, we stretch it out a bit, but good enough.
ok reyk
schwarze [Thu, 18 Dec 2014 17:43:07 +0000 (17:43 +0000)]
Don't let the modulo operator divide by zero.
Found by jsg@ with afl.
deraadt [Thu, 18 Dec 2014 17:02:35 +0000 (17:02 +0000)]
perform cpu setperf at same position in sequence as acpi.c
deraadt [Thu, 18 Dec 2014 17:00:19 +0000 (17:00 +0000)]
suspend & resume RNG subsystem
deraadt [Thu, 18 Dec 2014 16:31:50 +0000 (16:31 +0000)]
suspend and resume the RNG (at what looks like the right spots)
ok reyk djm
deraadt [Thu, 18 Dec 2014 16:30:29 +0000 (16:30 +0000)]
When a VM resume occurs, request information from the VM and enqueue as
entropy - then do a RNG resume.
If the VM signals a boot/reboot/suspend action, push the RNG into suspend.
ok reyk djm
deraadt [Thu, 18 Dec 2014 16:27:30 +0000 (16:27 +0000)]
Create a suspend/resume infrastructure for the RNG. At suspend time,
process all queued entropy and create a brand new pool to prevent
backtracking upon resume. At resume time, process the entropy queue
(since other resume code paths which run earlier can enqueue entropy)
and force all higher to reseed.
ok reyk djm