openbsd
7 years ago/etc/mtree/BSD.x11.dist is part of base, not X; so check for
ajacoutot [Fri, 9 Jun 2017 07:32:26 +0000 (07:32 +0000)]
/etc/mtree/BSD.x11.dist is part of base, not X; so check for
/var/sysmerge/xetc.tgz to detect whether we have the x sets installed.

7 years agoreturn failure rather than fatal() for more cases during mux
djm [Fri, 9 Jun 2017 06:47:13 +0000 (06:47 +0000)]
return failure rather than fatal() for more cases during mux
negotiations. Causes the session to fall back to a non-mux connection
if they occur. bz#2707 ok dtucker@

7 years agoin description of public key authentication, mention that the server
djm [Fri, 9 Jun 2017 06:43:01 +0000 (06:43 +0000)]
in description of public key authentication, mention that the server
will send debug messages to the client for some error conditions
after authentication has completed. bz#2709 ok dtucker

7 years agobetter translate libcrypto errors by looking deeper in the accursed
djm [Fri, 9 Jun 2017 06:40:24 +0000 (06:40 +0000)]
better translate libcrypto errors by looking deeper in the accursed
error stack for codes that indicate the wrong passphrase was supplied
for a PEM key. bz#2699 ok dtucker@

7 years agoAdd comments referring to the relevant RFC sections for rekeying
dtucker [Fri, 9 Jun 2017 04:40:04 +0000 (04:40 +0000)]
Add comments referring to the relevant RFC sections for rekeying
behaviour.

7 years agoturns out the case on 802.1 suffixes is significant. fix 802.1Q
dlg [Fri, 9 Jun 2017 01:39:07 +0000 (01:39 +0000)]
turns out the case on 802.1 suffixes is significant. fix 802.1Q

pointed out by jsg@

7 years agoturns out the case of 802.1 suffixes is significant. fix up 802.1X and Q.
dlg [Fri, 9 Jun 2017 01:36:05 +0000 (01:36 +0000)]
turns out the case of 802.1 suffixes is significant. fix up 802.1X and Q.

pointed out by jsg@

7 years agoAdd a missing header file.
aoyama [Thu, 8 Jun 2017 21:30:26 +0000 (21:30 +0000)]
Add a missing header file.

ok deraadt@

7 years agoRemove esym (.data) patching. Thanks to Mark we stopped requiring this
patrick [Thu, 8 Jun 2017 19:40:49 +0000 (19:40 +0000)]
Remove esym (.data) patching.  Thanks to Mark we stopped requiring this
and with the random-order kernel we shouldn't be doing that anyway.

ok kettenis@

7 years agoProperly reinitialize roffce_node between parses,
schwarze [Thu, 8 Jun 2017 19:35:34 +0000 (19:35 +0000)]
Properly reinitialize roffce_node between parses,
or this may crash with use-after-free in makewhatis(8);
reported by jmc@, thanks!

7 years agoremove the timeslot code, it was only for now deleted T1 devices.
tedu [Thu, 8 Jun 2017 19:23:39 +0000 (19:23 +0000)]
remove the timeslot code, it was only for now deleted T1 devices.
ok sthen

7 years agoPass CC and CXX to make depend as well. As soon as we support
patrick [Thu, 8 Jun 2017 18:33:08 +0000 (18:33 +0000)]
Pass CC and CXX to make depend as well.  As soon as we support
dependencies in the clang makefiles we need to make sure to use
a compiler that supports C++11.

7 years agodelete -e and -l, now covered by mandoc; OK jmc@ wiz@
schwarze [Thu, 8 Jun 2017 18:25:16 +0000 (18:25 +0000)]
delete -e and -l, now covered by mandoc; OK jmc@ wiz@

7 years agoImplement w layout specifier (minimum column width).
schwarze [Thu, 8 Jun 2017 18:11:15 +0000 (18:11 +0000)]
Implement w layout specifier (minimum column width).
Improve width calculation of text blocks.
Reduces the groff/mandoc diff in Base+Xenocara by about 800 lines.

7 years agoLink lastcomm regress to build.
bluhm [Thu, 8 Jun 2017 17:33:21 +0000 (17:33 +0000)]
Link lastcomm regress to build.

7 years agoStart with a clean /var/account/acct accounting file and turn on
bluhm [Thu, 8 Jun 2017 17:29:33 +0000 (17:29 +0000)]
Start with a clean /var/account/acct accounting file and turn on
process accounting with accton(8).  Each test executes a command
with a unique name and checks the flags in the lastcomm(1) output.
Run tests with fork, su, core, xsig, pledge, trap accounting.

7 years agoASLR, W^X, and guard pages trigger processor traps that result in
bluhm [Thu, 8 Jun 2017 17:14:02 +0000 (17:14 +0000)]
ASLR, W^X, and guard pages trigger processor traps that result in
SIGILL, SIGBUS, SIGSEGV signals.  Make such memory violations visible
in lastcomm(1).  This also works if a programm tries to hide them
with a signal handler.  Manual kill -SEGV does not generate false
positives.
OK deraadt@

7 years agoupdate permissions info to match recent changes
millert [Thu, 8 Jun 2017 17:13:39 +0000 (17:13 +0000)]
update permissions info to match recent changes

7 years agoAdd logging for when we find a non-file in the at spool that was
millert [Thu, 8 Jun 2017 16:23:39 +0000 (16:23 +0000)]
Add logging for when we find a non-file in the at spool that was
a file when we scanned the at spool earlier.

7 years agoclarify set prio: the second prio given applies to
henning [Thu, 8 Jun 2017 15:39:38 +0000 (15:39 +0000)]
clarify set prio: the second prio given applies to
1) TCP ACKs
2) packets with ToS=lowdelay
and not TCP ACKs that have ToS=lowdelay
confusion discovered during bsdcan pf tutorial

7 years agoStart syslogd with -rr. With different timing the order of messages
bluhm [Thu, 8 Jun 2017 14:38:35 +0000 (14:38 +0000)]
Start syslogd with -rr.  With different timing the order of messages
changed.  Then a "last message repeated" confused the test.

7 years agoNotify userland when a new ND is reachable.
mpi [Thu, 8 Jun 2017 13:28:03 +0000 (13:28 +0000)]
Notify userland when a new ND is reachable.

The same notification is already present in ARP.

From Jan Klemkow, ok bluhm@

7 years agomake the internal a2roffsu() interface more powerful by returning
schwarze [Thu, 8 Jun 2017 12:54:40 +0000 (12:54 +0000)]
make the internal a2roffsu() interface more powerful by returning
a pointer to the end of the parsed data, making it easier to
parse subsequent bytes

7 years agowrec.org is dead. Use working links instead.
tb [Thu, 8 Jun 2017 12:37:14 +0000 (12:37 +0000)]
wrec.org is dead. Use working links instead.
patch from jj, found by "Norrland" on icb. Thanks!

7 years agoWrap startup code with .ent and .end for proper disassembly.
visa [Thu, 8 Jun 2017 12:11:46 +0000 (12:11 +0000)]
Wrap startup code with .ent and .end for proper disassembly.

7 years agoMove loongson/octeon/sgi unmap_startup() under arch/mips64.
visa [Thu, 8 Jun 2017 12:02:52 +0000 (12:02 +0000)]
Move loongson/octeon/sgi unmap_startup() under arch/mips64.

7 years agoSplit early startup code out of locore.S into locore0.S. Adjust link
visa [Thu, 8 Jun 2017 11:47:24 +0000 (11:47 +0000)]
Split early startup code out of locore.S into locore0.S.  Adjust link
run so that this locore0.o is always at the start of the executable.
But randomize the link order of all other .o files in the kernel, so
that their exec/rodata/data/bss segments land all over the place.

Late during kernel boot, smash the startup code with traps so that
it does not point to the other randomly placed code.  It has be smashed,
because sgi runs in the kseg0 or xkphys space.

As a result, the internal layout of every newly build bsd kernel is
different from past kernels.  Internal relative offsets are not known
to an outside attacker.

Ramdisk kernels cannot be compiled like this, because they are gzip'd.
When the internal pointer references change, the compression dictionary
bloats and results in poorer compression.

7 years agoInvoke openssl with -passin file rather than -key in ca_revoke().
jsg [Thu, 8 Jun 2017 11:45:44 +0000 (11:45 +0000)]
Invoke openssl with -passin file rather than -key in ca_revoke().
From Andrei-Marius Radu via sthen@

7 years agoSplit early startup code out of locore.S into locore0.S. Adjust link
visa [Thu, 8 Jun 2017 11:44:00 +0000 (11:44 +0000)]
Split early startup code out of locore.S into locore0.S.  Adjust link
run so that this locore0.o is always at the start of the executable.
But randomize the link order of all other .o files in the kernel, so
that their exec/rodata/data/bss segments land all over the place.

Late during kernel boot, smash the startup code with traps so that
it does not point to the other randomly placed code.  It has be smashed,
because loongson runs in the kseg0 space.

As a result, the internal layout of every newly build bsd kernel is
different from past kernels.  Internal relative offsets are not known
to an outside attacker.

Ramdisk kernels cannot be compiled like this, because they are gzip'd.
When the internal pointer references change, the compression dictionary
bloats and results in poorer compression.

7 years agoAdd size to client descriptions in list, suggested by Greg Hurrell.
nicm [Thu, 8 Jun 2017 07:48:04 +0000 (07:48 +0000)]
Add size to client descriptions in list, suggested by Greg Hurrell.

7 years agoSplit early startup code out of locore.S into locore0.S. Adjust link
deraadt [Thu, 8 Jun 2017 05:35:23 +0000 (05:35 +0000)]
Split early startup code out of locore.S into locore0.S.  Adjust link
run so that this locore0.o is always at the start of the executable.
But randomize the link order of all other .o files in the kernel, so
that their exec/rodata/data/bss segments land all over the place.

I haven't worked on the unmap/smashing of the startup code yet.

7 years agoremove the _rb_color prototype in RBT, it's unused/unimplimented
dlg [Thu, 8 Jun 2017 03:37:25 +0000 (03:37 +0000)]
remove the _rb_color prototype in RBT, it's unused/unimplimented

7 years agomake rb_n2e return a struct rb_entry *, not void *
dlg [Thu, 8 Jun 2017 03:30:52 +0000 (03:30 +0000)]
make rb_n2e return a struct rb_entry *, not void *

maybe this will help prevent misassignment in the future.

7 years agouse unsigned long instead of caddr_t to move between nodes and entries.
dlg [Thu, 8 Jun 2017 03:22:56 +0000 (03:22 +0000)]
use unsigned long instead of caddr_t to move between nodes and entries.

this removes the need for sys/param.h. this code can be built with
only sys/tree.h, which in turn only needs sys/_null.h.

7 years agoadd RBT_SET_LEFT, RBT_SET_RIGHT, and RBT_SET_PARENT
dlg [Thu, 8 Jun 2017 03:12:53 +0000 (03:12 +0000)]
add RBT_SET_LEFT, RBT_SET_RIGHT, and RBT_SET_PARENT

this are provided so an RBT and it's topology can be copied without
having to reinsert the copied nodes into a new tree.

there are two reasons RBT_LEFT/RIGHT/PARENT macros cant be used like
RB_LEFT/RIGHT/PARENT for this. firstly, RBT_LEFT and co are functions that
return a pointer value, they dont provide access to the pointer
itself for use as an lvalue that you can assign to. secondly, RBT
entries dont store pointers to other nodes, they point to the
RBT_ENTRY structures inside other nodes. this means that RBT_SET_LEFT
and co have to get an offset from the node to the RBT_ENTRY and
store that.

7 years agomake the gem tx path MPSAFE.
dlg [Thu, 8 Jun 2017 01:34:00 +0000 (01:34 +0000)]
make the gem tx path MPSAFE.

this mostly follows the pattern in ifq.h

ok jmatthew@

7 years agoconsistently use lowercase for the 802.1 suffixes.
dlg [Thu, 8 Jun 2017 01:17:01 +0000 (01:17 +0000)]
consistently use lowercase for the 802.1 suffixes.

7 years agoconsistently use lowercase suffixes for 802.1 things.
dlg [Thu, 8 Jun 2017 00:46:42 +0000 (00:46 +0000)]
consistently use lowercase suffixes for 802.1 things.

eg, 802.1x, 802.1q, and 802.1ad

7 years agoPortable mandoc just got a warning about unknown .Lb names
schwarze [Thu, 8 Jun 2017 00:21:23 +0000 (00:21 +0000)]
Portable mandoc just got a warning about unknown .Lb names
which we don't want in OpenBSD, but let's keep the message table
and the manual page in sync.

7 years agoIn cron(8), require that crontab and at files in the spool be owned
millert [Wed, 7 Jun 2017 23:36:43 +0000 (23:36 +0000)]
In cron(8), require that crontab and at files in the spool be owned
by group crontab.  The at(1) command now creates files owned by
group crontab, the crontab(1) command already does this.

Files in the crontab spool with parse errors are now ignored;
crontab(1) will not install a crontab file with parse errors.
The system crontab file (/etc/crontab) is not affected by this.

The required permissions on crontab files have been tightened.
Files in the cron spool must be mode 0600 (as created by crontab(1)).
The system crontab file may be readable/writable by the owner,
readable by group and readable by other.  The system crontab must
be readable by the owner.

7 years agostyle checks related to .Er; inspired by mdoclint(1)
schwarze [Wed, 7 Jun 2017 23:29:31 +0000 (23:29 +0000)]
style checks related to .Er; inspired by mdoclint(1)

7 years agovmctl: change default "vmctl console" (cu) baud rate to 115200. Not
mlarkin [Wed, 7 Jun 2017 23:15:49 +0000 (23:15 +0000)]
vmctl: change default "vmctl console" (cu) baud rate to 115200. Not
strictly needed but matches the previous baudrate diff committed earlier
to vmd.

ok deraadt, phessler

7 years agouse the same formatting for vlan as the rest of the page; ok dlg
jmc [Wed, 7 Jun 2017 21:47:07 +0000 (21:47 +0000)]
use the same formatting for vlan as the rest of the page; ok dlg

7 years agoRemove "new sentence, new line" detection, covered by mandoc.
schwarze [Wed, 7 Jun 2017 21:05:19 +0000 (21:05 +0000)]
Remove "new sentence, new line" detection, covered by mandoc.
OK jmc@ wiz@

7 years agoAlso catch "new sentence, new line" if there are three blanks
schwarze [Wed, 7 Jun 2017 20:58:36 +0000 (20:58 +0000)]
Also catch "new sentence, new line" if there are three blanks
between the sentences.  Thomas Klausner says he has seen some
of these, and i don't see any false positives.

7 years agoAdd an acct(5) flag for pledge violations. Then lastcomm(1) shows
bluhm [Wed, 7 Jun 2017 20:53:59 +0000 (20:53 +0000)]
Add an acct(5) flag for pledge violations.  Then lastcomm(1) shows
when something went wrong.  This allows to monitor whether the
system is under attack and that the attack has been prevented by
OpenBSD pledge(2).
OK deraadt@ millert@ jmc@

7 years agoMake "new sentence, new line" detection stricter:
schwarze [Wed, 7 Jun 2017 20:30:13 +0000 (20:30 +0000)]
Make "new sentence, new line" detection stricter:
Also catch cases where the new sentence starts with a one-letter word
and the input line is broken right after that word.
Suggested by Thomas Klausner <wiz @ NetBSD>.

It's merely a three-bit diff, changing one byte from 0x34 to 0x33,
so what can possibly go wrong...

7 years agoTo test IPv6 fragements with extension header, the pf pass rules
bluhm [Wed, 7 Jun 2017 20:09:07 +0000 (20:09 +0000)]
To test IPv6 fragements with extension header, the pf pass rules
need an allow-opts.  Otherwise pf blocks packets with option header.

7 years agoPrepare the terminal driver for filling multiple columns in parallel,
schwarze [Wed, 7 Jun 2017 20:01:07 +0000 (20:01 +0000)]
Prepare the terminal driver for filling multiple columns in parallel,
second step: make the per-column byte pointer persistent across
term_flushln() calls, such that a subsequent call can continue at
the point where the previous call left.  If more than one column
is in use, return from term_flushln() when the column is full,
rather than breaking the output line.

No functional change, because nothing sets up multiple columns yet.

7 years agoWhen running at jobs, open the at spool and use the directory fd
millert [Wed, 7 Jun 2017 17:59:36 +0000 (17:59 +0000)]
When running at jobs, open the at spool and use the directory fd
with openat(), fstatat() and unlinkat().  This is similar to how
we run cron jobs and eliminates the need for run_job() to find the
basename of the at file.  OK deraadt@

7 years agoPrepare the terminal driver for filling multiple columns in parallel,
schwarze [Wed, 7 Jun 2017 17:38:08 +0000 (17:38 +0000)]
Prepare the terminal driver for filling multiple columns in parallel,
first step: split column data out of the terminal state struct into
a new column state struct and use an array of such column state
structs.  No functional change.

7 years agoFix clang warning about tautological compare: an unsigned long can't
naddy [Wed, 7 Jun 2017 16:47:29 +0000 (16:47 +0000)]
Fix clang warning about tautological compare: an unsigned long can't
be negative.  ok deraadt@

7 years agomake sure there are no duplicate object files linked when building syspatches
robert [Wed, 7 Jun 2017 16:01:07 +0000 (16:01 +0000)]
make sure there are no duplicate object files linked when building syspatches

7 years agoAcquire submit queue mutex only once per xbf_complete_cmd invocation
mikeb [Wed, 7 Jun 2017 15:49:21 +0000 (15:49 +0000)]
Acquire submit queue mutex only once per xbf_complete_cmd invocation
and remove some leftover assertions.

7 years agoReturn 1 if name matches not 0, also fix some spaces.
nicm [Wed, 7 Jun 2017 15:27:46 +0000 (15:27 +0000)]
Return 1 if name matches not 0, also fix some spaces.

7 years agovmd: Implement simulated baudrate support in the ns8250 module. The
mlarkin [Wed, 7 Jun 2017 14:53:28 +0000 (14:53 +0000)]
vmd: Implement simulated baudrate support in the ns8250 module. The
previous version was allowing an output rate that is "too fast", and linux
guests would give up after 512 characters TXed ("too much work for irq4").

This diff calculates the approximate rate we can sustain at the current
programmed baud rate and limits the output to that rate by inserting a
HZ delay after a specified number of characters have been transmitted.
This fixes the linux guest console issue.

Note that the console now outputs at more or less the selected baud rate,
instead of nearly instantaneously as before - if you selected 9600 in
your guest VMs before, you might want to change that to 115200 now for a
better console experience.

krw@ "seems like a good idea to me"

7 years agovmd: properly advertise 640k base memory, not 636k. That was a holdover
mlarkin [Wed, 7 Jun 2017 14:41:53 +0000 (14:41 +0000)]
vmd: properly advertise 640k base memory, not 636k. That was a holdover
from before we had seabios support (to fake a hole where the EBDA would
be), and seabios always assumes 640k low memory is available. Fixes a
problem where FreeDOS guests whose seabios placed the virtio ring too
close to 640k would crash vmd. tested on a variety of guest OS, with
and without seabios. no regressions seen.

7 years agoAdd simple searching (C-s and n) to the various choose modes: by name
nicm [Wed, 7 Jun 2017 14:37:30 +0000 (14:37 +0000)]
Add simple searching (C-s and n) to the various choose modes: by name
for client and tree, and by name and content for buffer.

7 years agoAssert that the KERNEL_LOCK() is held when messing with routing,
mpi [Wed, 7 Jun 2017 13:41:02 +0000 (13:41 +0000)]
Assert that the KERNEL_LOCK() is held when messing with routing,
pfkey and unix sockets.

ok claudio@

7 years agoAssert that the calling CPU is holding the KERNEL_LOCK() in malloc(9)
mpi [Wed, 7 Jun 2017 13:30:36 +0000 (13:30 +0000)]
Assert that the calling CPU is holding the KERNEL_LOCK() in malloc(9)
and free(9).

The exception is at early boot when only one CPU is running since we
grab the KERNL_LOCK() relatively late in main().

ok kettenis@

7 years agoGrab the KERNEL_LOCK() around rtm*() functions. Routing sockets globals
mpi [Wed, 7 Jun 2017 13:28:02 +0000 (13:28 +0000)]
Grab the KERNEL_LOCK() around rtm*() functions.  Routing sockets globals
aren't protected by the NET_LOCK().

While here change lock assertions in rt_{set,put}gwroute(), the NET_LOCK()
is enough.

Tested by Hrvoje Popovski.

ok jmatthew@, claudio@

7 years agoreword "listen on socket" somewhat; ok gilles
jmc [Wed, 7 Jun 2017 13:25:18 +0000 (13:25 +0000)]
reword "listen on socket" somewhat; ok gilles

7 years agoupdate the VLAN doco.
dlg [Wed, 7 Jun 2017 09:46:32 +0000 (09:46 +0000)]
update the VLAN doco.

the parameters are parent and vnetid, not vlandev and vlan. svlan(4) is
also a thing.

ok jmc@

7 years agoX is not restricted to just the + operator;
jmc [Wed, 7 Jun 2017 09:41:57 +0000 (09:41 +0000)]
X is not restricted to just the + operator;

diff from klemens nanni
confirmed by otto

7 years agohtpasswd: use crypt_newhash instead of the bcrypt API
awolk [Wed, 7 Jun 2017 09:11:52 +0000 (09:11 +0000)]
htpasswd: use crypt_newhash instead of the bcrypt API

man bcrypt states:
     These functions are deprecated in favor of crypt_checkpass(3) and
     crypt_newhash(3).

hence with this change we move htpasswd to the new API, while here
also change the rounds from a hardcoded 8 to automatic selection based
on system performance.

OK florian@

7 years agoThe \h escape sequence provides another method for moving backwards,
schwarze [Wed, 7 Jun 2017 02:13:52 +0000 (02:13 +0000)]
The \h escape sequence provides another method for moving backwards,
and after that, previously written output gets overwritten, but
overwriting with blanks does *not* erase previously written content.
Yes, manual pages exist that are crazy enough to rely on that...

7 years agounbreak after sshv1 purge
djm [Wed, 7 Jun 2017 01:48:15 +0000 (01:48 +0000)]
unbreak after sshv1 purge

7 years agoImplement the roff(7) .rn (rename macro or string) request.
schwarze [Wed, 7 Jun 2017 00:50:30 +0000 (00:50 +0000)]
Implement the roff(7) .rn (rename macro or string) request.
Renaming a user-defined macro is very simple: just copy
the definition to the new name and delete the old name.
Renaming high-level macros is a bit tricky: use a dedicated
key-value-table, with non-standard names as keys and standard
names as values.  When a macro is found that is not user-defined,
look it up in the "renamed" table and translate it back to the
standard name before passing it on to the high-level parsers.

7 years agoSet the weak variant of hysteresis as default.
bru [Tue, 6 Jun 2017 21:53:07 +0000 (21:53 +0000)]
Set the weak variant of hysteresis as default.

7 years agoRewrite the driver to handle 64kb transfers
mikeb [Tue, 6 Jun 2017 21:12:01 +0000 (21:12 +0000)]
Rewrite the driver to handle 64kb transfers

Although several codepaths in the kernel such as coredump
and buffercache read-ahead feature assume that underlying
hardware is capable of handling 64kb transfers without any
issues, xbf was setup to rely on a single descriptor per
transfer which limited the maximum size of an individual
transfer to 11 4k segments amounting to 44k bytes.

To avoid overbooking, a metadata object is allocated for
each transfer to keep track of associated descriptors
limiting the maximum amount of outstanding transfers to
half the ring size.

The issue was reported by Dan Cross <crossd at gmail.com>,
thanks!

7 years agoDon't patch(1) as the 'build' user; it has no right over the src tree.
ajacoutot [Tue, 6 Jun 2017 20:34:07 +0000 (20:34 +0000)]
Don't patch(1) as the 'build' user; it has no right over the src tree.
That bug was hidden because patch(1) returns '0' on that particular case.
To be fixed...

ok robert@

7 years agoCall xbf_intr for polled transfers that can't sleep
mikeb [Tue, 6 Jun 2017 20:33:28 +0000 (20:33 +0000)]
Call xbf_intr for polled transfers that can't sleep

7 years agoAdd support for tap gestures.
bru [Tue, 6 Jun 2017 19:47:22 +0000 (19:47 +0000)]
Add support for tap gestures.

7 years agoProvide sufficient info in error messages to identify
krw [Tue, 6 Jun 2017 19:01:27 +0000 (19:01 +0000)]
Provide sufficient info in error messages to identify
softraid volume and backing disk when i/o errors occur.

Original issue reported by Paul de Weerd.

Suggestions from jsing@.

ok deraadt@ mikeb@

7 years agoContinue and pass keys through if they are repeated keys, so that the
nicm [Tue, 6 Jun 2017 15:49:35 +0000 (15:49 +0000)]
Continue and pass keys through if they are repeated keys, so that the
first key after a repeated key doesn't get lost.

7 years agoDo not pass a state into commands when fired on individual items in tree
nicm [Tue, 6 Jun 2017 15:07:35 +0000 (15:07 +0000)]
Do not pass a state into commands when fired on individual items in tree
mode, rely on the %% target substitution in the command for the chosen
pane and leave the default target as the current pane (where the mode
is). Otherwise, joinp and similar end up with -t and -s the
same. Reported by Jacob Niehus in GitHub issue 960.

7 years agoMinimal implementation of the roff(7) .ce request (center a number
schwarze [Tue, 6 Jun 2017 15:00:56 +0000 (15:00 +0000)]
Minimal implementation of the roff(7) .ce request (center a number
of input lines without filling).
Contrary to groff, high-level macros abort .ce mode for now.

7 years agoDelete input event when evbuffer_read() fails to avoid just spinning
nicm [Tue, 6 Jun 2017 14:53:28 +0000 (14:53 +0000)]
Delete input event when evbuffer_read() fails to avoid just spinning
around a dead file descriptor. Seems to fix a problem reported by Greg
Hurrell in GitHub issue 941.

7 years agoRemove code that is not needed right now.
visa [Tue, 6 Jun 2017 14:39:48 +0000 (14:39 +0000)]
Remove code that is not needed right now.

7 years agoImplement startup smashing in C. The code should be moved
visa [Tue, 6 Jun 2017 14:35:53 +0000 (14:35 +0000)]
Implement startup smashing in C. The code should be moved
under arch/mips64 once loongson and sgi have gap.o.

Discussed with deraadt@

7 years agostart slaacd as early as possible, right after pf and sysctl.conf are
florian [Tue, 6 Jun 2017 13:59:37 +0000 (13:59 +0000)]
start slaacd as early as possible, right after pf and sysctl.conf are
setup.
Input & OK deraadt@

7 years agoWe are going to start slaacd(8) much earlier, before /var is even
florian [Tue, 6 Jun 2017 13:57:23 +0000 (13:57 +0000)]
We are going to start slaacd(8) much earlier, before /var is even
mounted. Move control socket to /dev for now.
Input & OK deraadt@

7 years agoUpdate stubs to work with radix tree.
mpi [Tue, 6 Jun 2017 13:19:29 +0000 (13:19 +0000)]
Update stubs to work with radix tree.

7 years agoUpdate panic strings, pipex no longer use rn_inithead0().
mpi [Tue, 6 Jun 2017 13:07:22 +0000 (13:07 +0000)]
Update panic strings, pipex no longer use rn_inithead0().

7 years agoDo not rely on <net/rtable.h> beeing included by other headers.
mpi [Tue, 6 Jun 2017 11:51:13 +0000 (11:51 +0000)]
Do not rely on <net/rtable.h> beeing included by other headers.

Fix build without PF, PIPEX nor IPSEC.

7 years agoFix build without PF.
mpi [Tue, 6 Jun 2017 11:39:55 +0000 (11:39 +0000)]
Fix build without PF.

7 years agomention -fwrapv being on by default
jsg [Tue, 6 Jun 2017 09:42:09 +0000 (09:42 +0000)]
mention -fwrapv being on by default

7 years agoEnable -fwrapv by default with clang to treat signed integer overflows
jsg [Tue, 6 Jun 2017 09:40:24 +0000 (09:40 +0000)]
Enable -fwrapv by default with clang to treat signed integer overflows
as defined.  This is done to prevent dangerous optimisations which could
remove security critical overflow checks.

Base gcc has -fno-strict-overflow by default, with clang this is
identical to -fwrapv.

Prompted by naddy@ discovering a hang with a clang compiled i386 kernel
that was resolved with -fwrapv.

ok kettenis@ pascal@

7 years agoFix compression output stats broken in rev 1.201. Patch originally by
dtucker [Tue, 6 Jun 2017 09:12:17 +0000 (09:12 +0000)]
Fix compression output stats broken in rev 1.201.  Patch originally by
Russell Coker via Debian bug #797964 and Christoph Biedl.  ok djm@

7 years agoregen
tb [Tue, 6 Jun 2017 08:12:01 +0000 (08:12 +0000)]
regen

7 years agoMention that the special files are created in the current working
tb [Tue, 6 Jun 2017 08:11:23 +0000 (08:11 +0000)]
Mention that the special files are created in the current working
directory. Suggested by Scott Cheloha.

discussed with jmc

7 years agoTest insertion of unmatched meta sequence.
anton [Tue, 6 Jun 2017 08:05:01 +0000 (08:05 +0000)]
Test insertion of unmatched meta sequence.

7 years agomake vnetid and parent commands available in SMALL ifconfigs.
dlg [Tue, 6 Jun 2017 04:52:40 +0000 (04:52 +0000)]
make vnetid and parent commands available in SMALL ifconfigs.

the code behind the commands has been built on SMALL forever, this just
moves it available in the cmd table. the binary doesnt change size.

7 years agocorrect the depend list of a target introduced in rev 1.9
jsg [Tue, 6 Jun 2017 02:35:40 +0000 (02:35 +0000)]
correct the depend list of a target introduced in rev 1.9
from deraadt@

7 years agoRegen.
kevlo [Tue, 6 Jun 2017 01:02:18 +0000 (01:02 +0000)]
Regen.

7 years agoSort DLINK section and add USB device ID of D-Link DWA-131 rev E1.
kevlo [Tue, 6 Jun 2017 00:52:02 +0000 (00:52 +0000)]
Sort DLINK section and add USB device ID of D-Link DWA-131 rev E1.

ok stsp@

7 years agoShow usage of sysmerge and MAKEDEV instead of just mentioning them.
tb [Mon, 5 Jun 2017 22:27:58 +0000 (22:27 +0000)]
Show usage of sysmerge and MAKEDEV instead of just mentioning them.
From Scott Cheloha, thanks.

ok jmc and positive feedback from several

7 years ago- let's add PF_LOCK()
sashan [Mon, 5 Jun 2017 22:18:28 +0000 (22:18 +0000)]
- let's add PF_LOCK()
  to enable PF_LOCK(), you must add 'option WITH_PF_LOCK' to your kernel
  configuration. The code does not do much currently it's just the very
  small step towards MP.

O.K. henning@, mikeb@, mpi@

7 years agoinitial docs for COMPILER_WRAPPER and COMPILER_LINKS
sthen [Mon, 5 Jun 2017 21:54:07 +0000 (21:54 +0000)]
initial docs for COMPILER_WRAPPER and COMPILER_LINKS

7 years agoSplit early startup code out of locore.S into locore0.S. Adjust link
deraadt [Mon, 5 Jun 2017 18:59:06 +0000 (18:59 +0000)]
Split early startup code out of locore.S into locore0.S.  Adjust link
run so that this locore0.o is always at the start of the executable.
But randomize the link order of all other .o files in the kernel, so
that their exec/rodata/data/bss segments land all over the place.

The bootstrap code will need smashing because it is mapped by BLTB,
but this is a bit involved so not done yet.

As a result, the internal layout of every newly build bsd kernel is
different from past kernels.  Internal relative offsets are not known
to an outside attacker.  The only known offsets are in the startup code
(which will be gone when it is smashed).

Ramdisk kernels cannot be compiled like this, because they are gzip'd.
When the internal pointer references change, the compression dictionary
bloats and results in poorer compression.