openbsd
7 years agoGenerate randomized MAC addresses earlier to keep them across reboots.
reyk [Tue, 25 Apr 2017 16:38:23 +0000 (16:38 +0000)]
Generate randomized MAC addresses earlier to keep them across reboots.

OK deraadt@

7 years agoDo not update TERM into config file parsing has finished.
nicm [Tue, 25 Apr 2017 15:35:10 +0000 (15:35 +0000)]
Do not update TERM into config file parsing has finished.

7 years agoBlock the initial client if there is one until the configuration file
nicm [Tue, 25 Apr 2017 14:46:23 +0000 (14:46 +0000)]
Block the initial client if there is one until the configuration file
has finished loading.

7 years agosome ip6 setup notes; help/ok bluhm
jmc [Tue, 25 Apr 2017 13:52:08 +0000 (13:52 +0000)]
some ip6 setup notes; help/ok bluhm

7 years agoif-shell doesn't need to queue its error message into a callback, and in
nicm [Tue, 25 Apr 2017 11:49:35 +0000 (11:49 +0000)]
if-shell doesn't need to queue its error message into a callback, and in
fact it can't do so because the item it was working with will have been
freed. Reported by Daniel Hahler.

7 years agospacing
reyk [Tue, 25 Apr 2017 06:44:35 +0000 (06:44 +0000)]
spacing

7 years agoContinue parser unification:
schwarze [Mon, 24 Apr 2017 23:06:09 +0000 (23:06 +0000)]
Continue parser unification:
* Make enum rofft an internal interface as enum roff_tok in "roff.h".
* Represent mdoc and man macros in enum roff_tok.
* Make TOKEN_NONE a proper enum value and use it throughout.
* Put the prologue macros first in the macro tables.
* Unify mdoc_macroname[] and man_macroname[] into roff_name[].

7 years ago'rtsol' has been removed from hostname.if(5) recently.
rpe [Mon, 24 Apr 2017 20:50:42 +0000 (20:50 +0000)]
'rtsol' has been removed from hostname.if(5) recently.

OK jmc@

7 years agoReplace 'rtsol' with 'autoconf' to reflect the change in the installer.
rpe [Mon, 24 Apr 2017 20:44:24 +0000 (20:44 +0000)]
Replace 'rtsol' with 'autoconf' to reflect the change in the installer.

7 years agoPrint bgp administrative shutdown messages (draft-ietf-idr-shutdown)
benno [Mon, 24 Apr 2017 20:35:35 +0000 (20:35 +0000)]
Print bgp administrative shutdown messages (draft-ietf-idr-shutdown)
From Job Snijders <job -AT instituut -DOT- net>, thanks!

ok canacar@, deraadt@

7 years agoIntroduce a new function parse_hn_line() that replaces the existing
rpe [Mon, 24 Apr 2017 20:31:48 +0000 (20:31 +0000)]
Introduce a new function parse_hn_line() that replaces the existing
hostname.if(5) parsing code in ifstart().
Add a -n option to netstart to only print the interface configuration
commands instead of executing them.
Add a HN_DIR variable, that points to the directory of the hostname.if
files (default /etc) that allows for future regression tests.

- add new parse_hn_line() function
- change ifstart()
  - rename $if to $_if
  - don't ifconfig or ifconfig create if -n option is used
  - replace hostname.if(5) parsing code with new parse_hn_line()
  - just print configuration commands if -n option is used
- autoconf now happens in ifstart(), remove ifv6autoconf()
- introduce HN_DIR variable for the hostname.if file location
- add handling of the -n option to only print config commands
- ensure -n is only used if interfaces are specified as parameters

Discussed with and positive feedback from many
'commit' deraadt@
OK sthen@

7 years agoIntroduce a new function parse_hn_line() that replaces the existing
rpe [Mon, 24 Apr 2017 20:27:59 +0000 (20:27 +0000)]
Introduce a new function parse_hn_line() that replaces the existing
hostname.if(5) parsing code in ifstart().

- change v6_config()
  - replace rtsol with autoconf in "IPv6 addres for <if>" question
  - write 'inet6 autoconf" to hostname.if file instead of rtsol
- add parse_hn_line() function with installer specific changes
  - skip shell command and bridge config lines
  - skip inet6 config (incl. dest lines) if there's no inet6 support
  - skip dhcp config if there's no dhclient
- change ifstart() to use parse_hn_line()

Discussed with and positive feedback from many
'commit' deraadt@
conditional OK sthen@ (untested)

7 years agoAdd support for Cortex-A12. Even though ARM rebranded these as Cortex-A17
kettenis [Mon, 24 Apr 2017 18:15:16 +0000 (18:15 +0000)]
Add support for Cortex-A12.  Even though ARM rebranded these as Cortex-A17
they have a different ID from "real" Cortex-A17 cores.

ok phessler@, patrick@

7 years agoa little more consistent text for previous; ok krw
jmc [Mon, 24 Apr 2017 18:05:52 +0000 (18:05 +0000)]
a little more consistent text for previous; ok krw

7 years agoAdd 'echo-client-id' statment, so that RFC 6842 behaviour can be
krw [Mon, 24 Apr 2017 14:58:36 +0000 (14:58 +0000)]
Add 'echo-client-id' statment, so that RFC 6842 behaviour can be
turned off for those clients and networks that find it impossible to
move past RFC 2131. Modelled on the same statement in recent ISC
versions, though we default to 'on' (a.k.a. RFC 6842) rather that
'off' (a.k.a. RFC 2131).

Problems reported by Bastien Durel (Xerox Phaser 6022 printer) and
Bryan Vyhmeister (Hon Hai Precision router) via misc@. Thanks!

7 years agoProcess fdt before iobus devices. Needed later when interrupt and
visa [Mon, 24 Apr 2017 14:10:19 +0000 (14:10 +0000)]
Process fdt before iobus devices. Needed later when interrupt and
MDIO controller drivers are attached using fdt.

7 years agoupdate for the llvm libs; help/ok kettenis
jmc [Mon, 24 Apr 2017 13:58:39 +0000 (13:58 +0000)]
update for the llvm libs; help/ok kettenis

7 years agoAdd an fdt blob for octeon systems whose firmware does not provide
visa [Mon, 24 Apr 2017 13:54:28 +0000 (13:54 +0000)]
Add an fdt blob for octeon systems whose firmware does not provide
a device-tree. It will be needed later when more device drivers
are attached using fdt.

OK kettenis@

7 years agoSince rev 1.1 ix has attempted to require a 64 bit BAR, the test for
jsg [Mon, 24 Apr 2017 13:20:46 +0000 (13:20 +0000)]
Since rev 1.1 ix has attempted to require a 64 bit BAR, the test for
this was wrong and was corrected at the end of last year in rev 1.140.
Before then a 64 bit BAR was not enforced as the test was wrong.

It turns out there exist 82598 parts which have a 32 bit BAR so change
the test to only require a memory BAR and not a 64 bit memory BAR.

Problem reported by Robert Blacquiere. ok mikeb@

7 years agoDocument support for 3168 and 8265 devices in iwm(4).
stsp [Mon, 24 Apr 2017 09:53:43 +0000 (09:53 +0000)]
Document support for 3168 and 8265 devices in iwm(4).

7 years agoDocument monitor mode support in iwm(4).
stsp [Mon, 24 Apr 2017 09:50:04 +0000 (09:50 +0000)]
Document monitor mode support in iwm(4).

7 years agoImplement monitor mode support for iwm(4).
stsp [Mon, 24 Apr 2017 09:48:42 +0000 (09:48 +0000)]
Implement monitor mode support for iwm(4).

The magic commands to capture raw 802.11 frames on e.g. channel 1 are:
ifconfig iwm0 mediaopt monitor chan 1
tcpdump -n -i iwm0 -y IEEE802_11_RADIO -s 4096 -w /tmp/iwm.pcap
ifconfig iwm0 -mediaopt monitor -chan

7 years agoImplement support for multiple packets per receive DMA buffer in iwm(4).
stsp [Mon, 24 Apr 2017 09:31:31 +0000 (09:31 +0000)]
Implement support for multiple packets per receive DMA buffer in iwm(4).

We can now clear SINGLE_FRAME_MSK in the receive configuration register.
Linux has not set this bit in years, and Dragonfly stopped setting it
in commit b5eb43f0280bbcfd26af51cf5a4b8e8ff3590b67.
This is a prerequisite for monitor mode since the firmware seems to ignore
the SINGLE_FRAME_MSK bit while running in monitor mode and sends us garbage.

Tested on 7260, 7265, and 8260 devices.

7 years agoStop dumping registers on "normal" segmentation faults. Do print the contents
kettenis [Mon, 24 Apr 2017 08:09:13 +0000 (08:09 +0000)]
Stop dumping registers on "normal" segmentation faults.  Do print the contents
of the esr_el1 register for unhandled userland exceptions (and continue to
dump the registers in that case).

Handle breakpoint traps and make sure we call refreshcreds() on userland traps.

ok jsg@

7 years agoDon't overflow the allocated DHCP response buffer.
reyk [Mon, 24 Apr 2017 07:14:27 +0000 (07:14 +0000)]
Don't overflow the allocated DHCP response buffer.

When copying the DHCP/BOOTP response into the allocated buffer, use
the calculated response length instead of the maximum size of a DHCP
packet.  The response length was verified correctly but the very last
step missed to use it.

Found by Caspar Schutijser and malloc.conf(5) "S"

OK deraadt@

7 years agoFix configuration of ASN1_DN IDs.
reyk [Mon, 24 Apr 2017 07:07:25 +0000 (07:07 +0000)]
Fix configuration of ASN1_DN IDs.

Public key authentication uses public key files that are stored in the
/etc/iked/pubkeys/ directory where the IKE IDs are encoded as filenames.
This does not simply work with ASN1_DNs where the IDs include slashes
and other special characters. Instead of breaking and failing when an
ASN1_DN is configured, simply skip the public key lookup but allow
to use it with certificates or PSKs.

Reported and fix tested by Igor V. Gubenko - Thanks.

7 years agoFix typos. From Michael W. Bombardieri <mb at ii.net>. Thanks!
ratchov [Mon, 24 Apr 2017 06:47:41 +0000 (06:47 +0000)]
Fix typos. From Michael W. Bombardieri <mb at ii.net>. Thanks!

7 years agoPrint usage on stderr as do other programs. From Michael
ratchov [Mon, 24 Apr 2017 06:45:56 +0000 (06:45 +0000)]
Print usage on stderr as do other programs. From Michael
Bombardieri <mb at ii.net>, thanks.

7 years agoHandle unequal numbers of Tx and Rx streams in MiRA.
stsp [Sun, 23 Apr 2017 21:04:55 +0000 (21:04 +0000)]
Handle unequal numbers of Tx and Rx streams in MiRA.
Problem reported by Colton Lewis on misc@
ok tb@

7 years agoOnly use ED for clear screen if at the bottom, same as earlier fix to
nicm [Sun, 23 Apr 2017 18:13:24 +0000 (18:13 +0000)]
Only use ED for clear screen if at the bottom, same as earlier fix to
clear end of screen.

7 years agoSome of the LOG_NOTICE messages from PF were seen in normal operations
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@

7 years agooops, this was meant to be committed with the pfctl.8 change:
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;

7 years agotrim the documentation for -k: make it more consistent,
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

7 years agoRearrange text a bit to make it clear what "discarded" means; ok jmc@ 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@

7 years agosync
deraadt [Sat, 22 Apr 2017 17:47:21 +0000 (17:47 +0000)]
sync

7 years agoRecognize Loongson 3A2000/3B2000 processors.
visa [Sat, 22 Apr 2017 15:43:35 +0000 (15:43 +0000)]
Recognize Loongson 3A2000/3B2000 processors.

7 years agoFix an early boot failure on Loongson 3A2000.
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

7 years agoThe gnome module supports cmake now.
ajacoutot [Sat, 22 Apr 2017 14:00:30 +0000 (14:00 +0000)]
The gnome module supports cmake now.

7 years agodo not leave temp files after the diffing is done
robert [Sat, 22 Apr 2017 13:42:05 +0000 (13:42 +0000)]
do not leave temp files after the diffing is done

7 years agoAdd a small shell script to be used by syspatch to diff the fake root
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.

7 years agorework the syspatch makefile and do complete builds for each errata
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

7 years agoMemory leak from David CARLIER.
nicm [Sat, 22 Apr 2017 12:55:06 +0000 (12:55 +0000)]
Memory leak from David CARLIER.

7 years agoReindent with tabs and add missing braces.
visa [Sat, 22 Apr 2017 12:34:44 +0000 (12:34 +0000)]
Reindent with tabs and add missing braces.

7 years agoDo not need getopt.h.
nicm [Sat, 22 Apr 2017 12:08:41 +0000 (12:08 +0000)]
Do not need getopt.h.

7 years agoXr mutex(9) and rwlock(9)
visa [Sat, 22 Apr 2017 11:12:04 +0000 (11:12 +0000)]
Xr mutex(9) and rwlock(9)

7 years agoShuffle bits into their proper files.
visa [Sat, 22 Apr 2017 11:05:04 +0000 (11:05 +0000)]
Shuffle bits into their proper files.

Prompted by jmc@

7 years agoCan't collect UTF-8 characters of more than one byte at the moment.
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.

7 years agonew -A should use the session name.
nicm [Sat, 22 Apr 2017 10:26:44 +0000 (10:26 +0000)]
new -A should use the session name.

7 years agoGet rid of the extra layer of flags and cmd_prepare() and just store the
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.

7 years agoFor small allocations (chunk) freezero only validates the given
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.

7 years agoMouse bindings and hooks set up an initial current state when running a
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.

7 years agoWe need to collect UTF-8 characters so that width != 1 characters are
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.

7 years agoFix if-shell without a client (so in the config file). Reported by Theo
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.

7 years agoTypo in example.
nicm [Sat, 22 Apr 2017 06:15:22 +0000 (06:15 +0000)]
Typo in example.

7 years agoMemory leaks, from David CARLIER.
nicm [Sat, 22 Apr 2017 06:13:30 +0000 (06:13 +0000)]
Memory leaks, from David CARLIER.

7 years agoManual page for witness(4). Adapted from FreeBSD.
visa [Sat, 22 Apr 2017 04:00:21 +0000 (04:00 +0000)]
Manual page for witness(4). Adapted from FreeBSD.

7 years agoAdd "key" modifier for -k to make pfctl can kill a state by specifying
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

7 years agoSpeed up DIOCKILLSTATES by using the RB tree index if all fields used
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

7 years agoLog error properly when no current state, and some other minor tweaks.
nicm [Fri, 21 Apr 2017 22:23:24 +0000 (22:23 +0000)]
Log error properly when no current state, and some other minor tweaks.

7 years agoMake sure cmd_find_from_* clear the state if they fail.
nicm [Fri, 21 Apr 2017 22:00:06 +0000 (22:00 +0000)]
Make sure cmd_find_from_* clear the state if they fail.

7 years agoRename a variable.
nicm [Fri, 21 Apr 2017 21:02:26 +0000 (21:02 +0000)]
Rename a variable.

7 years agoClear shared state if not filling it in.
nicm [Fri, 21 Apr 2017 20:34:05 +0000 (20:34 +0000)]
Clear shared state if not filling it in.

7 years agoMake the cmd_find_* functions more obvious when looking for a client,
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.

7 years agoKey needs to be initialized to zero now it has flags in it.
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.

7 years agoCast the result of the __swapXX macros to the proper type.
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@

7 years agoStyle nits and an unused struct.
nicm [Fri, 21 Apr 2017 18:18:17 +0000 (18:18 +0000)]
Style nits and an unused struct.

7 years agoMake id parameter of iwm_send_cmd_pdu() a uint32_t so that it matches
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.

7 years agoAdd cmd_find_from_winlink_pane and use it in a couple of places, and
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.

7 years agoFix nic lock usage around iwm_disable_rx_dma().
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.

7 years agoFix nic lock usages around iwm_{read,write}_prph().
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.

7 years agoIt is annoying that the copy mode key table (or any other key table)
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.

7 years agoMore unnecessary arguments now winlink points back to session.
nicm [Fri, 21 Apr 2017 14:09:44 +0000 (14:09 +0000)]
More unnecessary arguments now winlink points back to session.

7 years agoHistory needs to be loaded after config parsing is done - now that
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.

7 years agoStore state shared between multiple commands in the queue in a shared
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.

7 years agoRepair AgentX support.
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.

7 years agoFix uninitialized variable that coult result in a crash.
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.

7 years agoDo not run the config file in the context of the first client, instead
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.

7 years agoFail if vm.conf exists but cannot be opened, ignore if it doesn't exist.
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.

7 years agoUse ether_crc32_le() instead of a custom version.
mpi [Fri, 21 Apr 2017 09:42:53 +0000 (09:42 +0000)]
Use ether_crc32_le() instead of a custom version.

From Hiltjo Posthuma.

7 years agoAdd global configuration option "local prefix" to change prefix for -L.
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@

7 years agovmd(8) pci emulation fix required for upcoming option rom support.
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

7 years agocontrol_char() for ASCII needs to include both genuine control
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

7 years agoadd previous to NAME;
jmc [Thu, 20 Apr 2017 19:30:42 +0000 (19:30 +0000)]
add previous to NAME;

7 years agosync
deraadt [Thu, 20 Apr 2017 18:30:33 +0000 (18:30 +0000)]
sync

7 years agoUse fdforkpty() instead of our own unwrapped versions.
nicm [Thu, 20 Apr 2017 17:49:26 +0000 (17:49 +0000)]
Use fdforkpty() instead of our own unwrapped versions.

7 years agoAdd getptmfd(), fdopenpty(), fdforkpty() functions. These allow programs
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

7 years agoFix previous.
visa [Thu, 20 Apr 2017 17:16:32 +0000 (17:16 +0000)]
Fix previous.

7 years agosync
deraadt [Thu, 20 Apr 2017 16:30:37 +0000 (16:30 +0000)]
sync

7 years agoGet TCB address using the RDHWR instruction instead of __get_tcb().
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@

7 years agoMake TCB address available to userspace via the UserLocal register.
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@

7 years agoonly 32 bits of the pledgecode were passed up via ktrace
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

7 years agoOnly set up a current target for mouse key bindings. Fixes:
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.)

7 years agoDrop unnecessary headers. This fixes kernel build on platforms
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>.

7 years agoregen
jsg [Thu, 20 Apr 2017 14:44:51 +0000 (14:44 +0000)]
regen

7 years agoRemove an incorrect Bay Trail I2C entry that masked a valid Bay Trail
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.

7 years agoAdd option to compile witness(4).
visa [Thu, 20 Apr 2017 14:23:53 +0000 (14:23 +0000)]
Add option to compile witness(4).

7 years agoTweak lock inits to make the system runnable with 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.

7 years agoHook up mutex(9) to witness(4).
visa [Thu, 20 Apr 2017 13:57:29 +0000 (13:57 +0000)]
Hook up mutex(9) to witness(4).

7 years agoHook up rwlock(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

7 years agoHook up mplock to witness(4) on amd64 and i386.
visa [Thu, 20 Apr 2017 13:20:17 +0000 (13:20 +0000)]
Hook up mplock to witness(4) on amd64 and i386.