sthen [Sun, 23 Apr 2017 11:37:11 +0000 (11:37 +0000)]
Some of the LOG_NOTICE messages from PF were seen in normal operations
with certain rulesets and excessively noisy; move them to LOG_INFO (which was
previously unused). ok benno@
jmc [Sun, 23 Apr 2017 07:41:25 +0000 (07:41 +0000)]
oops, this was meant to be committed with the pfctl.8 change:
sync usage() with SYNOPSIS;
jmc [Sun, 23 Apr 2017 07:40:34 +0000 (07:40 +0000)]
trim the documentation for -k: make it more consistent,
and do not try to do all the documenting in SYNOPSIS/usage();
ok deraadt
otto [Sun, 23 Apr 2017 06:36:36 +0000 (06:36 +0000)]
Rearrange text a bit to make it clear what "discarded" means; ok jmc@ deraadt@
deraadt [Sat, 22 Apr 2017 17:47:21 +0000 (17:47 +0000)]
sync
visa [Sat, 22 Apr 2017 15:43:35 +0000 (15:43 +0000)]
Recognize Loongson 3A2000/3B2000 processors.
visa [Sat, 22 Apr 2017 15:37:39 +0000 (15:37 +0000)]
Fix an early boot failure on Loongson 3A2000.
Reported and patch tested by wen heping
ajacoutot [Sat, 22 Apr 2017 14:00:30 +0000 (14:00 +0000)]
The gnome module supports cmake now.
robert [Sat, 22 Apr 2017 13:42:05 +0000 (13:42 +0000)]
do not leave temp files after the diffing is done
robert [Sat, 22 Apr 2017 13:41:02 +0000 (13:41 +0000)]
Add a small shell script to be used by syspatch to diff the fake root
directories for changes due to the fact that we have to do some "magic"
to figure out if things have really changed.
robert [Sat, 22 Apr 2017 13:39:00 +0000 (13:39 +0000)]
rework the syspatch makefile and do complete builds for each errata
and diff those instead of doing partial builds of affected directories
nicm [Sat, 22 Apr 2017 12:55:06 +0000 (12:55 +0000)]
Memory leak from David CARLIER.
visa [Sat, 22 Apr 2017 12:34:44 +0000 (12:34 +0000)]
Reindent with tabs and add missing braces.
nicm [Sat, 22 Apr 2017 12:08:41 +0000 (12:08 +0000)]
Do not need getopt.h.
visa [Sat, 22 Apr 2017 11:12:04 +0000 (11:12 +0000)]
Xr mutex(9) and rwlock(9)
visa [Sat, 22 Apr 2017 11:05:04 +0000 (11:05 +0000)]
Shuffle bits into their proper files.
Prompted by jmc@
nicm [Sat, 22 Apr 2017 10:30:56 +0000 (10:30 +0000)]
Can't collect UTF-8 characters of more than one byte at the moment.
nicm [Sat, 22 Apr 2017 10:26:44 +0000 (10:26 +0000)]
new -A should use the session name.
nicm [Sat, 22 Apr 2017 10:22:39 +0000 (10:22 +0000)]
Get rid of the extra layer of flags and cmd_prepare() and just store the
CMD_FIND_* flags in the cmd_entry and call it for the command. Commands
with special requirements call it themselves and update the target for
hooks to use.
otto [Sat, 22 Apr 2017 09:12:49 +0000 (09:12 +0000)]
For small allocations (chunk) freezero only validates the given
size if canaries are enabled. In that case we have the exact requested
size of the allocation. But we can at least check the given size
against the chunk size if C is not enabled. Plus add some braces
so my brain doesn't have to scan for dangling else problems when I
see this code.
nicm [Sat, 22 Apr 2017 08:56:24 +0000 (08:56 +0000)]
Mouse bindings and hooks set up an initial current state when running a
command. This is used for the session, window and pane for all commands
in the command sequence if there is no -t or -s.
However, using it for all commands in the command sequence means that if
the active pane or current session is changed, subsequent commands still
use the previous state. So make commands which explicitly change the
current state (such as neww and selectp) update it themselves for later
commands. Commands which may invalidate the state (like killp) are
already OK because an invalid state will be ignored.
Also fill in the current state for all key bindings rather than just the
mouse, so that any omissions are easier to spot.
nicm [Sat, 22 Apr 2017 08:33:28 +0000 (08:33 +0000)]
We need to collect UTF-8 characters so that width != 1 characters are
correctly flushed.
nicm [Sat, 22 Apr 2017 06:27:15 +0000 (06:27 +0000)]
Fix if-shell without a client (so in the config file). Reported by Theo
Buehler.
nicm [Sat, 22 Apr 2017 06:15:22 +0000 (06:15 +0000)]
Typo in example.
nicm [Sat, 22 Apr 2017 06:13:30 +0000 (06:13 +0000)]
Memory leaks, from David CARLIER.
visa [Sat, 22 Apr 2017 04:00:21 +0000 (04:00 +0000)]
Manual page for witness(4). Adapted from FreeBSD.
yasuoka [Fri, 21 Apr 2017 23:22:49 +0000 (23:22 +0000)]
Add "key" modifier for -k to make pfctl can kill a state by specifying
the key of the state.
ok sasha
yasuoka [Fri, 21 Apr 2017 23:21:02 +0000 (23:21 +0000)]
Speed up DIOCKILLSTATES by using the RB tree index if all fields used
by the tree of given state key are filled.
ok sasha
nicm [Fri, 21 Apr 2017 22:23:24 +0000 (22:23 +0000)]
Log error properly when no current state, and some other minor tweaks.
nicm [Fri, 21 Apr 2017 22:00:06 +0000 (22:00 +0000)]
Make sure cmd_find_from_* clear the state if they fail.
nicm [Fri, 21 Apr 2017 21:02:26 +0000 (21:02 +0000)]
Rename a variable.
nicm [Fri, 21 Apr 2017 20:34:05 +0000 (20:34 +0000)]
Clear shared state if not filling it in.
nicm [Fri, 21 Apr 2017 20:26:34 +0000 (20:26 +0000)]
Make the cmd_find_* functions more obvious when looking for a client,
rather than having it inside other functions. Should be no change to the
way targets are resolved just yet.
nicm [Fri, 21 Apr 2017 19:33:07 +0000 (19:33 +0000)]
Key needs to be initialized to zero now it has flags in it.
millert [Fri, 21 Apr 2017 19:04:22 +0000 (19:04 +0000)]
Cast the result of the __swapXX macros to the proper type.
The ternary operator was causing the result to be promoted to
int for __swap16. Fixes warning with clang. OK guenther@
nicm [Fri, 21 Apr 2017 18:18:17 +0000 (18:18 +0000)]
Style nits and an unused struct.
stsp [Fri, 21 Apr 2017 17:54:02 +0000 (17:54 +0000)]
Make id parameter of iwm_send_cmd_pdu() a uint32_t so that it matches
the size of the corresponding id field in struct iwm_host_cmd.
Patch by Imre Vadasz.
nicm [Fri, 21 Apr 2017 17:22:20 +0000 (17:22 +0000)]
Add cmd_find_from_winlink_pane and use it in a couple of places, and
make functions that can't fail void.
stsp [Fri, 21 Apr 2017 16:40:11 +0000 (16:40 +0000)]
Fix nic lock usage around iwm_disable_rx_dma().
iwm_disable_rx_dma() was unintentionally releasing the nic lock too early.
Patch by Imre Vadasz.
stsp [Fri, 21 Apr 2017 16:39:52 +0000 (16:39 +0000)]
Fix nic lock usages around iwm_{read,write}_prph().
The iwm_{read,write}_prph() calls don't grab the nic lock themselves
so make sure to acquire it where necessary.
The iwm_{set,clear}_bits_prph() on the other hand acquire/release the
nic lock themselves. Since the nic lock doesn't do recursive locking
we need to be careful to avoid accidentally releasing the nic lock
too early that way.
Patch by Imre Vadasz.
nicm [Fri, 21 Apr 2017 16:04:18 +0000 (16:04 +0000)]
It is annoying that the copy mode key table (or any other key table)
will suppress root key table bindings. So change to always check the
root table if no binding is found in the current table (whether it be
the prefix table from pressing the prefix or the copy mode table from a
pane).
A root key binding can be blocked by binding the key to a command that
does nothing (like send-keys with no arguments).
Problem reported by Thomas Sattler.
nicm [Fri, 21 Apr 2017 14:09:44 +0000 (14:09 +0000)]
More unnecessary arguments now winlink points back to session.
nicm [Fri, 21 Apr 2017 14:04:54 +0000 (14:04 +0000)]
History needs to be loaded after config parsing is done - now that
commands are queued, that's in cfg_done not after start_cfg finishes.
nicm [Fri, 21 Apr 2017 14:01:19 +0000 (14:01 +0000)]
Store state shared between multiple commands in the queue in a shared
structure.
jca [Fri, 21 Apr 2017 13:50:23 +0000 (13:50 +0000)]
Repair AgentX support.
which I broke when adding support for multiple listen address. SNMP
data should be sent to the client using the appropriate socket, which we
now store when we receive the query.
Reported & fix tested by Rivo Nurges.
jca [Fri, 21 Apr 2017 13:46:15 +0000 (13:46 +0000)]
Fix uninitialized variable that coult result in a crash.
Fix from Rivo Nurges.
nicm [Fri, 21 Apr 2017 13:15:43 +0000 (13:15 +0000)]
Do not run the config file in the context of the first client, instead
use no client like we did before. This means commands like new-session
won't try to attach if they are in the config file.
reyk [Fri, 21 Apr 2017 11:02:10 +0000 (11:02 +0000)]
Fail if vm.conf exists but cannot be opened, ignore if it doesn't exist.
This fixes 'vmd -nf /etv/vm.conf' if the file is not readable.
mpi [Fri, 21 Apr 2017 09:42:53 +0000 (09:42 +0000)]
Use ether_crc32_le() instead of a custom version.
From Hiltjo Posthuma.
reyk [Fri, 21 Apr 2017 07:03:26 +0000 (07:03 +0000)]
Add global configuration option "local prefix" to change prefix for -L.
The default prefix is 100.64.0.0/10 from RFC6598.
Requested by sthen@ chris@
OK mlarkin@
mlarkin [Fri, 21 Apr 2017 04:18:47 +0000 (04:18 +0000)]
vmd(8) pci emulation fix required for upcoming option rom support.
This will be used in the future to support an sgabios option rom, to
do VGA text mode console redirection.
ok reyk
nicm [Thu, 20 Apr 2017 21:23:16 +0000 (21:23 +0000)]
control_char() for ASCII needs to include both genuine control
characters and top-bit-set nonprintable characters (so both iscntrl()
and !isprint()), fixes behaviour broken in r1.15/r1.16, noticed by
deraadt@.
ok deraadt tedu
jmc [Thu, 20 Apr 2017 19:30:42 +0000 (19:30 +0000)]
add previous to NAME;
deraadt [Thu, 20 Apr 2017 18:30:33 +0000 (18:30 +0000)]
sync
nicm [Thu, 20 Apr 2017 17:49:26 +0000 (17:49 +0000)]
Use fdforkpty() instead of our own unwrapped versions.
nicm [Thu, 20 Apr 2017 17:48:30 +0000 (17:48 +0000)]
Add getptmfd(), fdopenpty(), fdforkpty() functions. These allow programs
to separate the open(/dev/ptm) from the ioctl(PTMGET) for privilege
separation or pledge().
Based on a diff from reyk@.
ok deraadt millert
visa [Thu, 20 Apr 2017 17:16:32 +0000 (17:16 +0000)]
Fix previous.
deraadt [Thu, 20 Apr 2017 16:30:37 +0000 (16:30 +0000)]
sync
visa [Thu, 20 Apr 2017 16:07:52 +0000 (16:07 +0000)]
Get TCB address using the RDHWR instruction instead of __get_tcb().
This gives fast access to the address on systems that implement
the UserLocal register. TCB caching is still used when running
in the single-threaded mode in order not to penalize old systems.
The kernel counterpart of this change must be in place before
using this diff!
With guenther@
visa [Thu, 20 Apr 2017 15:42:26 +0000 (15:42 +0000)]
Make TCB address available to userspace via the UserLocal register.
This lets programs get the address without a system call on OCTEON II
and later.
Add UserLocal load emulation for systems that do not implement
the RDHWR instruction or the UserLocal register.
OK guenther@
deraadt [Thu, 20 Apr 2017 15:21:51 +0000 (15:21 +0000)]
only 32 bits of the pledgecode were passed up via ktrace
from Anton Lindqvist
ok semarie
nicm [Thu, 20 Apr 2017 15:16:20 +0000 (15:16 +0000)]
Only set up a current target for mouse key bindings. Fixes:
bind q select-pane -U \; resize-pane -Z
(There is still some possible weirdness with the way we do current
targets, it should probably be done in a different way at some point.)
visa [Thu, 20 Apr 2017 15:06:47 +0000 (15:06 +0000)]
Drop unnecessary headers. This fixes kernel build on platforms
without <machine/mplock.h>.
jsg [Thu, 20 Apr 2017 14:44:51 +0000 (14:44 +0000)]
regen
jsg [Thu, 20 Apr 2017 14:43:59 +0000 (14:43 +0000)]
Remove an incorrect Bay Trail I2C entry that masked a valid Bay Trail
PCIE entry as it used the same product id.
Add another PLX/Avago/"Broadcom" PCIE bridge seen in the wild while here.
visa [Thu, 20 Apr 2017 14:23:53 +0000 (14:23 +0000)]
Add option to compile witness(4).
visa [Thu, 20 Apr 2017 14:13:00 +0000 (14:13 +0000)]
Tweak lock inits to make the system runnable with witness(4)
on amd64 and i386.
visa [Thu, 20 Apr 2017 13:57:29 +0000 (13:57 +0000)]
Hook up mutex(9) to witness(4).
visa [Thu, 20 Apr 2017 13:33:00 +0000 (13:33 +0000)]
Hook up rwlock(9) to witness(4).
Loosely based on a diff from Christian Ludwig
visa [Thu, 20 Apr 2017 13:20:17 +0000 (13:20 +0000)]
Hook up mplock to witness(4) on amd64 and i386.
visa [Thu, 20 Apr 2017 12:59:36 +0000 (12:59 +0000)]
Add a port of witness(4) lock validation tool from FreeBSD.
Go-ahead from kettenis@, guenther@, deraadt@
visa [Thu, 20 Apr 2017 12:41:43 +0000 (12:41 +0000)]
Add routines for saving stack traces and printing saved traces
on amd64 and i386.
With guenther@
kettenis [Thu, 20 Apr 2017 10:32:23 +0000 (10:32 +0000)]
Install clflushoptintrin.h and move pkuintrin.h such that the list is
properly sorted.
pointed out by espie@
kettenis [Thu, 20 Apr 2017 10:03:40 +0000 (10:03 +0000)]
Use register names without the % prefix in the global register variable
declarations since clang doesn't register the %-prefixed ones.
nicm [Thu, 20 Apr 2017 09:43:45 +0000 (09:43 +0000)]
Now that struct winlink has a session pointer, can remove some arguments.
nicm [Thu, 20 Apr 2017 09:39:07 +0000 (09:39 +0000)]
There is no real need for window_printable_flags to allocate, make it
return a buffer from the stack.
nicm [Thu, 20 Apr 2017 09:20:22 +0000 (09:20 +0000)]
If a #() command doesn't exit, use its most recent line of output (it
must be a full line). Don't let it redraw the status line more than once
a second.
Requested by someone about 10 years ago...
dlg [Thu, 20 Apr 2017 03:04:11 +0000 (03:04 +0000)]
use strtonum instead of strtoll to parse the argument to -j
ok deraadt@ benno@
deraadt [Wed, 19 Apr 2017 22:37:52 +0000 (22:37 +0000)]
sync
dhill [Wed, 19 Apr 2017 17:26:45 +0000 (17:26 +0000)]
Add sizes to free()
ok deraadt@ visa@
dhill [Wed, 19 Apr 2017 17:26:13 +0000 (17:26 +0000)]
Add size to free()
ok deraadt@ visa@
nicm [Wed, 19 Apr 2017 16:59:54 +0000 (16:59 +0000)]
load_cfg returns < 0 on error, not != 0. Problem reported by Kaushal Modi.
bluhm [Wed, 19 Apr 2017 16:06:38 +0000 (16:06 +0000)]
SA group has been renamed to bundle. Adapt test.
bluhm [Wed, 19 Apr 2017 15:59:38 +0000 (15:59 +0000)]
Rename all SA groups to bundles consistently. The first kernel
commit in 2000 that introduced the features already called them SA
bundles. The word group is taken by Diffie-Hellman, reusing it
causes confusion.
OK hshoexer@
bluhm [Wed, 19 Apr 2017 15:44:45 +0000 (15:44 +0000)]
icmp6_rip6_input() was mostly duplicated code from rip6_input().
Merge these functions together and remove icmp6_rip6_input().
OK mpi@
reyk [Wed, 19 Apr 2017 15:38:32 +0000 (15:38 +0000)]
Add support for dynamic "NAT" interfaces (-L/local interface).
When a local interface is configured, vmd configures a /31 address on
the tap(4) interface of the host and provides another IP in the same
subnet via DHCP (BOOTP) to the VM. vmd runs an internal BOOTP server
that replies with IP, gateway, and DNS addresses to the VM. The
built-in server only ever responds to the VM on the inside and cannot
leak its DHCP responses to the outside.
Thanks to Uwe Werler, Josh Grosse, and some others for testing!
OK deraadt@
bluhm [Wed, 19 Apr 2017 15:21:54 +0000 (15:21 +0000)]
Use the rt_rmx defines that hide the struct rt_kmetrics indirection.
No binary change.
OK mpi@
nicm [Wed, 19 Apr 2017 15:20:55 +0000 (15:20 +0000)]
Update to terminfo.src 2017-04-01.
nicm [Wed, 19 Apr 2017 14:00:28 +0000 (14:00 +0000)]
Add a suspend helper function, and do not allow detaching or suspending
while already doing so.
nicm [Wed, 19 Apr 2017 12:44:29 +0000 (12:44 +0000)]
Style nits and a missing cast.
bluhm [Wed, 19 Apr 2017 12:44:05 +0000 (12:44 +0000)]
Make the test pass when an obj directory exists.
jmc [Wed, 19 Apr 2017 10:48:57 +0000 (10:48 +0000)]
better example; from hiltjo posthuma
ok sthen
jmc [Wed, 19 Apr 2017 09:32:46 +0000 (09:32 +0000)]
spelling fixes from michael w. bombardieri
nicm [Wed, 19 Apr 2017 06:52:27 +0000 (06:52 +0000)]
When the data we have buffered to write to a terminal grows beyond a
reasonable amount (currently width * height * 8 bytes), discard all
output to the terminal and start trying to redraw periodically
instead. Continue with this until the amount of data we are trying to
write falls to a low level again.
This helps to prevent tmux sitting on a huge buffer of data when there
are processes with fast output running inside tmux but the outside
terminal is slow.
A new client_discarded format holds the amount of data that has been
discarded due to this mechanism.
The three variables (when to start this, when to stop, and how often to
redraw) are basically "works for me" at the moment, this is going in to
see how it goes and if it causes problems for anyone else.
natano [Wed, 19 Apr 2017 05:36:12 +0000 (05:36 +0000)]
Switch base tools from /dev/bpf0 to /dev/bpf. Now that /dev/bpf has been
around for two releases, it should be safe to do so.
ok bluhm deraadt sthen tb yasuoka
tb [Wed, 19 Apr 2017 05:33:53 +0000 (05:33 +0000)]
Bump numbers for /usr/obj allocation with *big* compilers.
ok otto
otto [Wed, 19 Apr 2017 05:27:00 +0000 (05:27 +0000)]
enlarge obj to satisfy new world order that has *big* compilers and
remove condition for static linking; ok tb@
schwarze [Wed, 19 Apr 2017 00:59:32 +0000 (00:59 +0000)]
More thoroughly reject direct access to unintended files, such that
URIs like http://man.openbsd.org/OpenBSD-current/mandoc.db and
http://man.openbsd.org/OpenBSD-current/man1/ do not cause display
of garbage.
schwarze [Tue, 18 Apr 2017 23:06:50 +0000 (23:06 +0000)]
Simplify patching of motd(5), also making it agree better with the
documentation if the first line of the file is blank.
Quirk reported by Anthony Coulter <bsd at anthonycoulter dot name>.
OK rpe@
nicm [Tue, 18 Apr 2017 21:41:42 +0000 (21:41 +0000)]
Revert use of DECSLRM on iTerm2, it doesn't help as much as we throught,
and there are some question marks about it's support.