openbsd
7 years agothrow strip into base, until we consider a solution for the
deraadt [Tue, 27 Jun 2017 06:12:51 +0000 (06:12 +0000)]
throw strip into base, until we consider a solution for the
linkkit bsd.gdb strip gongshow

7 years agothe illegal instruction is 0x00000000
deraadt [Tue, 27 Jun 2017 04:22:13 +0000 (04:22 +0000)]
the illegal instruction is 0x00000000

7 years agoremove some old cruft.
tedu [Tue, 27 Jun 2017 03:42:00 +0000 (03:42 +0000)]
remove some old cruft.

7 years agoMinor cleanup; when polling delay before calling the interrupt handler
mikeb [Mon, 26 Jun 2017 20:12:14 +0000 (20:12 +0000)]
Minor cleanup; when polling delay before calling the interrupt handler

7 years agocatch up with the recent eqn(7) improvements
schwarze [Mon, 26 Jun 2017 20:11:23 +0000 (20:11 +0000)]
catch up with the recent eqn(7) improvements

7 years agoComplete rewrite of the lexer in a single function with four operation
schwarze [Mon, 26 Jun 2017 19:53:00 +0000 (19:53 +0000)]
Complete rewrite of the lexer in a single function with four operation
modes instead of four functions, resulting in considerable
simplification, fifty lines less of code, fifteen fewer automatic
variables, and several bug fixes, for example:

1. The delim control statement consumes exactly two bytes of input,
requires no whitespace after these two bytes, and does not treat
quotes in any special way.
2. If the argument of left, right, gfont, gsize, or size is defined
as an alias, only the first word of the value is used as the
delimiter, font name, or font size.
3. If a back, fwd, down, or up keyword is followed by another keyword
instead of the required number, GNU eqn does nothing useful, but
typically errors out.  So no need to have special handling (with
an ugly goto!) for it in mandoc.

Also getting rid of one pointless static buffer and twelve redundant
calls to strlcpy(3).

7 years agoConvert ip_input() to a pr_input style function. Goal is to process
bluhm [Mon, 26 Jun 2017 19:06:12 +0000 (19:06 +0000)]
Convert ip_input() to a pr_input style function.  Goal is to process
IPsec packets without additional enqueueing.
OK mpi@

7 years agoRework the deferred interrupt loop
mikeb [Mon, 26 Jun 2017 18:42:23 +0000 (18:42 +0000)]
Rework the deferred interrupt loop

By performing a task_add an interrupt handler can rely on the
taskq_thread to invoke it again with an additional benefit of
being able to sched_pause when required. In the long run more
than 99.8% of calls do not require an additional iteration.

7 years agoFragments for a single connection (a combination of proto,src,dst,af)
bluhm [Mon, 26 Jun 2017 18:33:24 +0000 (18:33 +0000)]
Fragments for a single connection (a combination of proto,src,dst,af)
may easily reuse the fragment id as it is only 16 bit for IPv4.  To
avoid that pf reassembles them into the wrong packet, throw away
stale fragments.  With the default timeout this happens after 12,000
newer fragements have been seen.
from markus@; OK sashan@

7 years agoAdd a MDKERNEL variable that contains the name of the boot kernel.
rpe [Mon, 26 Jun 2017 18:31:57 +0000 (18:31 +0000)]
Add a MDKERNEL variable that contains the name of the boot kernel.
This will be used by the installer in an upcoming change.

OK deraadt@

7 years agoRANDOM1 was subject to rather bad modulus bias. Improve the situation a bit
tb [Mon, 26 Jun 2017 17:00:49 +0000 (17:00 +0000)]
RANDOM1 was subject to rather bad modulus bias. Improve the situation a bit
by implementing an arc4random_uniform(3) clone with beloved jot(1) and
using it.

discussed with and ok deraadt

7 years agoArrange a phandle for the "ciu" node.
visa [Mon, 26 Jun 2017 16:54:31 +0000 (16:54 +0000)]
Arrange a phandle for the "ciu" node.

7 years agonote.ABI-tag and .MIPS.options are not needed anymore when
deraadt [Mon, 26 Jun 2017 16:14:24 +0000 (16:14 +0000)]
note.ABI-tag and .MIPS.options are not needed anymore when
we use gapdummy.o

7 years agoWhen pinging an IPv6 link-local address, the reflected packet had
bluhm [Mon, 26 Jun 2017 14:12:35 +0000 (14:12 +0000)]
When pinging an IPv6 link-local address, the reflected packet had
::1 as source address.  It should be the link-local address of the
attached interface.  The rtalloc() in icmp6_reflect() did not find
the correct local address.  The IPv6 routing table does not use
sin6_scope_id, but the embedded scope.  So do not recover the scope.
bug report Harald Dunkel; OK mpi@

7 years agowhen splitting a composite word,
schwarze [Mon, 26 Jun 2017 11:04:26 +0000 (11:04 +0000)]
when splitting a composite word,
do not forget to close the inserted list box

7 years agodon't print the WELLKNOWN string for unknown well-known communities
phessler [Mon, 26 Jun 2017 10:09:13 +0000 (10:09 +0000)]
don't print the WELLKNOWN string for unknown well-known communities

from Job Snijders
ok phessler@ benno@

7 years agolet admins set an unknown well-known community
phessler [Mon, 26 Jun 2017 10:08:06 +0000 (10:08 +0000)]
let admins set an unknown well-known community

from Job Snijders
ok phessler@ benno@

7 years agoadd support for the "graceful shutdown" well-known community as described
phessler [Mon, 26 Jun 2017 10:05:57 +0000 (10:05 +0000)]
add support for the "graceful shutdown" well-known community as described
in draft-ietf-grow-bgp-gshut

from Job Snijders
ok phessler@ benno@

7 years agoallow setting localpref to 0
phessler [Mon, 26 Jun 2017 10:04:21 +0000 (10:04 +0000)]
allow setting localpref to 0

from Job Snijders
ok phessler@ benno@

7 years agoAssert that the corresponding socket is locked when manipulating socket
mpi [Mon, 26 Jun 2017 09:32:31 +0000 (09:32 +0000)]
Assert that the corresponding socket is locked when manipulating socket
buffers.

This is one step towards unlocking TCP input path.  Note that all the
functions asserting for the socket lock are not necessarilly MP-safe.
All the fields of 'struct socket' aren't protected.

Introduce a new kernel-only kqueue hint, NOTE_SUBMIT, to be able to
tell when a filter needs to lock the underlying data structures.  Logic
and name taken from NetBSD.

Tested by Hrvoje Popovski.

ok claudio@, bluhm@, mikeb@

7 years agoAllow updating the destination address of an existing TDB. Since the
patrick [Mon, 26 Jun 2017 09:17:55 +0000 (09:17 +0000)]
Allow updating the destination address of an existing TDB.  Since the
destination address is used as an index when looking for a TDB, we need
to supply the new destination address in a different member.  For this,
re-use the proxy address, that so far no one else has been using.  It
would make sense to rename this member in the future.

ok claudio@

7 years agoSplit a part of tdb_delete() into tdb_unlink() so that we can remove
patrick [Mon, 26 Jun 2017 09:08:00 +0000 (09:08 +0000)]
Split a part of tdb_delete() into tdb_unlink() so that we can remove
a TDB from the hash table without actually free()ing it.  That way we
can modify the TDB and then put it back in using puttdb().

ok claudio@

7 years agoFactor a variable assignment in audiopoll().
ratchov [Mon, 26 Jun 2017 07:02:16 +0000 (07:02 +0000)]
Factor a variable assignment in audiopoll().
From Michael Bombardieri, thanks.

7 years agoMake ifconfig(8) default to prefixlen 128 when setting an IPv6 destination
stsp [Sun, 25 Jun 2017 22:22:06 +0000 (22:22 +0000)]
Make ifconfig(8) default to prefixlen 128 when setting an IPv6 destination
address on a point-to-point interface. Makes it easier to configure IPv6 on
interfaces such as gif(4). Specifying 'prefixlen 128' is no longer required.
This is consistent with IPv4 where a netmask is not required either.
ok mpi@ bluhm@ benno@

7 years agoLink acme-client, ldapd, switchd regress to build.
bluhm [Sun, 25 Jun 2017 22:07:55 +0000 (22:07 +0000)]
Link acme-client, ldapd, switchd regress to build.

7 years agoDo not run .END cleanup during clean, cleandir, obj in ldapd regress.
bluhm [Sun, 25 Jun 2017 22:06:06 +0000 (22:06 +0000)]
Do not run .END cleanup during clean, cleandir, obj in ldapd regress.

7 years agoClean all files created during switchd regress.
bluhm [Sun, 25 Jun 2017 21:59:59 +0000 (21:59 +0000)]
Clean all files created during switchd regress.

7 years agoConvert the acme-client test to use a config file acme-client.conf.
bluhm [Sun, 25 Jun 2017 21:33:23 +0000 (21:33 +0000)]
Convert the acme-client test to use a config file acme-client.conf.
Restructure the Makefile, put httpd.conf in separate config file.
Skip test if domain name for letsencrypt.org is not set.
discussed with benno@

7 years agoCatch typos in .Sh names; suggested by jmc@.
schwarze [Sun, 25 Jun 2017 17:42:37 +0000 (17:42 +0000)]
Catch typos in .Sh names; suggested by jmc@.

I'm using a very simple, linear time / zero space fuzzy string
matching heuristic rather than a full Levenshtein metric, to keep
the code both simple and fast.

7 years agoNo need to NUL-terminate the line buffer since it's handled by x_e_getu8() by
anton [Sun, 25 Jun 2017 17:28:39 +0000 (17:28 +0000)]
No need to NUL-terminate the line buffer since it's handled by x_e_getu8() by
now.

ok schwarze@

7 years agolld's linker-script parser has to be fixed to accept ; after LONG()
deraadt [Sun, 25 Jun 2017 17:14:24 +0000 (17:14 +0000)]
lld's linker-script parser has to be fixed to accept ; after LONG()
directives.  binutils requires it, and binutils is the authoritative
parser in this regard.  This means arm64 +lld remains broken (but all
the other architectures work)

7 years agotest new MT macro
schwarze [Sun, 25 Jun 2017 14:09:14 +0000 (14:09 +0000)]
test new MT macro

7 years agodull dependency for copying makegap.sh to obj, so that installs
deraadt [Sun, 25 Jun 2017 14:02:21 +0000 (14:02 +0000)]
dull dependency for copying makegap.sh to obj, so that installs
without src and comp work.  That is what we've designed for, but since
we always have src and comp on our systems it is so easy to slide...
problem first noted by rpe.

7 years agocope with changes in BASE messages
schwarze [Sun, 25 Jun 2017 12:48:56 +0000 (12:48 +0000)]
cope with changes in BASE messages

7 years agoadd some empty targets that were missing
schwarze [Sun, 25 Jun 2017 12:48:04 +0000 (12:48 +0000)]
add some empty targets that were missing

7 years agoDon't output partial UTF-8 characters in ksh emacs mode. Instead, try to read a
anton [Sun, 25 Jun 2017 08:51:52 +0000 (08:51 +0000)]
Don't output partial UTF-8 characters in ksh emacs mode. Instead, try to read a
complete UTF-8 character first. Fixes an issue while running ksh in tmux where
UTF-8 characters inserted in columns other than the last one are discarded.

With help from nicm@ and schwarze@ who also wrote the UTF-8 validation, thanks!

ok schwarze@

7 years agoCapture SIGINT and print out all received output so far. Useful when debugging
anton [Sun, 25 Jun 2017 08:31:44 +0000 (08:31 +0000)]
Capture SIGINT and print out all received output so far. Useful when debugging
broken tests.

7 years agoAdd support for the MT and ME mailto macros, used for example in wg(8).
bentley [Sun, 25 Jun 2017 07:23:53 +0000 (07:23 +0000)]
Add support for the MT and ME mailto macros, used for example in wg(8).

feedback and ok schwarze@

7 years agoldd is more strict wrt semicolons, they can only appear after an
otto [Sun, 25 Jun 2017 06:54:26 +0000 (06:54 +0000)]
ldd is more strict wrt semicolons, they can only appear after an
expression line. Removing the extra semicolons makes both ld and
ldd accept the link script generated, although ldd produces a wrong
object file on arm64; ok kettenis@ deraadt@

7 years agopriv_add_address() is no longer invoked to signal the deletion of the
krw [Sun, 25 Jun 2017 00:44:49 +0000 (00:44 +0000)]
priv_add_address() is no longer invoked to signal the deletion of the
active address. So no need to check for the magic INADDR_ANY address.

7 years agoOops. Revert unintentional/premature functional change. Deleting the
krw [Sun, 25 Jun 2017 00:38:38 +0000 (00:38 +0000)]
Oops. Revert unintentional/premature functional change. Deleting the
address configured by dhclient should cause exit, not restart. There
is no need to invoke sendhup(). Just exit and let the privileged child
follow.

7 years agoTweak handling of HUP and new LLADDR. Just use expose and use sighup()
krw [Sat, 24 Jun 2017 23:32:57 +0000 (23:32 +0000)]
Tweak handling of HUP and new LLADDR. Just use expose and use sighup()
function. Don't exit dispatch() loop on SIGHUP, wait for privileged
child to execvp() dhclient. Eliminate struct imsg_hup since its
contents were not being used except in priv_cleanup(). And
'active_addr' works just as well there.

Cleaner and eliminates some extraneous log entries.

7 years agodelete useless .Ns macro that jmc@ found with mdoclint(1)
schwarze [Sat, 24 Jun 2017 21:08:28 +0000 (21:08 +0000)]
delete useless .Ns macro that jmc@ found with mdoclint(1)

7 years agoTo avoid packet loss due to reuse of the 16 bit IPv4 fragment id,
bluhm [Sat, 24 Jun 2017 20:32:39 +0000 (20:32 +0000)]
To avoid packet loss due to reuse of the 16 bit IPv4 fragment id,
we need suitable data structures.  Organize the pf fragments with
two red-black trees.  One is holding the address and protocol
information and the other has only the fragment id.  This will allow
to drop fragemts for specific connections more aggressively.  `
from markus@; OK sashan@

7 years agodocument message "unknown architecture"
schwarze [Sat, 24 Jun 2017 19:05:36 +0000 (19:05 +0000)]
document message "unknown architecture"

7 years agooperating system dependent message about unknown architecture;
schwarze [Sat, 24 Jun 2017 18:58:09 +0000 (18:58 +0000)]
operating system dependent message about unknown architecture;
inspired by mdoclint

7 years agodelete old, undocumented, obsolete section names that nobody uses
schwarze [Sat, 24 Jun 2017 17:36:50 +0000 (17:36 +0000)]
delete old, undocumented, obsolete section names that nobody uses

7 years agoFix a check in ADD_SPACE_{GOTO,RET} that potentially allowed for a
martijn [Sat, 24 Jun 2017 16:30:47 +0000 (16:30 +0000)]
Fix a check in ADD_SPACE_{GOTO,RET} that potentially allowed for a
NULL-dereference.

OK tom@

7 years agoobvious removal of -o, now covered by mandoc
schwarze [Sat, 24 Jun 2017 16:10:01 +0000 (16:10 +0000)]
obvious removal of -o, now covered by mandoc

7 years agoin the base system, suggest leaving .Os blank; inspired by mdoclint
schwarze [Sat, 24 Jun 2017 15:59:28 +0000 (15:59 +0000)]
in the base system, suggest leaving .Os blank; inspired by mdoclint

7 years agoSplit -Wstyle into -Wstyle and the even lower -Wbase, and add
schwarze [Sat, 24 Jun 2017 14:38:27 +0000 (14:38 +0000)]
Split -Wstyle into -Wstyle and the even lower -Wbase, and add
-Wopenbsd and -Wnetbsd to check conventions for the base system of
a specific operating system.  Mark operating system specific messages
with "(OpenBSD)" at the end.

Please use just "-Tlint" to check base system manuals (defaulting
to -Wall, which is now -Wbase), but prefer "-Tlint -Wstyle" for the
manuals of portable software projects you maintain that are not
part of OpenBSD base, to avoid bogus recommendations about base
system conventions that do not apply.

Issue originally reported by semarie@, solution using
an idea from tedu@, discussed with jmc@ and jca@.

7 years agoDelete .St -p1003.1-2013.
schwarze [Sat, 24 Jun 2017 13:49:19 +0000 (13:49 +0000)]
Delete .St -p1003.1-2013.
It is an OpenBSD addition that did not get used a single time in
three years, and groff did not pick it up either, so removing it
does not affect any existing manuals anywhere.
Cleanup suggested by jmc@, OK bentley@.

7 years agoUse a local variable rather than a global flag to record
krw [Sat, 24 Jun 2017 10:09:26 +0000 (10:09 +0000)]
Use a local variable rather than a global flag to record
the reception of a IMSG_HUP message and trigger the
desired restart.

Nuke the now pointless IFI_HUP.

7 years agocorrect env var name
djm [Sat, 24 Jun 2017 07:08:57 +0000 (07:08 +0000)]
correct env var name

7 years agospelling;
jmc [Sat, 24 Jun 2017 06:57:04 +0000 (06:57 +0000)]
spelling;

7 years agodon't pass pointer to struct sshcipher between privsep processes,
djm [Sat, 24 Jun 2017 06:38:11 +0000 (06:38 +0000)]
don't pass pointer to struct sshcipher between privsep processes,
just redo the lookup in each using the already-passed cipher name.
bz#2704 based on patch from Brooks Davis; ok markus dtucker

7 years agoregress test for ExposeAuthInfo
djm [Sat, 24 Jun 2017 06:35:24 +0000 (06:35 +0000)]
regress test for ExposeAuthInfo

7 years agorefactor authentication logging
djm [Sat, 24 Jun 2017 06:34:38 +0000 (06:34 +0000)]
refactor authentication logging

optionally record successful auth methods and public credentials
used in a file accessible to user sessions

feedback and ok markus@

7 years agoword fix;
jmc [Sat, 24 Jun 2017 06:28:50 +0000 (06:28 +0000)]
word fix;

7 years agoswitch sshconnect.c from (slightly abused) select() to poll();
djm [Sat, 24 Jun 2017 05:37:44 +0000 (05:37 +0000)]
switch sshconnect.c from (slightly abused) select() to poll();
ok deraadt@ a while back

7 years agouse HostKeyAlias if specified instead of hostname for matching host
djm [Sat, 24 Jun 2017 05:35:05 +0000 (05:35 +0000)]
use HostKeyAlias if specified instead of hostname for matching host
certificate principal names; bz#2728; ok dtucker@

7 years agono need to call log_init to reinitialise logged PID in child sessions,
djm [Sat, 24 Jun 2017 05:24:11 +0000 (05:24 +0000)]
no need to call log_init to reinitialise logged PID in child sessions,
since we haven't called openlog() in log_init() since 1999; ok markus@

7 years agoConsistently treat character escape sequences as operators,
schwarze [Fri, 23 Jun 2017 22:59:27 +0000 (22:59 +0000)]
Consistently treat character escape sequences as operators,
not as letters, even if their names contain letters.

This is certainly not perfect, but code to recognize that \(*a is
not an operator but a letter would need a huge table, or Unicode
character property support, which won't happen at this time.

7 years agosplitting a text box sometimes requires wrapping it in a list
schwarze [Fri, 23 Jun 2017 21:04:34 +0000 (21:04 +0000)]
splitting a text box sometimes requires wrapping it in a list

7 years agoMake libiberty test programs compile and run without segfault.
bluhm [Fri, 23 Jun 2017 20:57:51 +0000 (20:57 +0000)]
Make libiberty test programs compile and run without segfault.

7 years agodelete unused "lastline" state variable and some commented out lines;
schwarze [Fri, 23 Jun 2017 19:56:57 +0000 (19:56 +0000)]
delete unused "lastline" state variable and some commented out lines;
no functional change

7 years agoOnce you have forked into two processes, setting a global flag
krw [Fri, 23 Jun 2017 19:51:07 +0000 (19:51 +0000)]
Once you have forked into two processes, setting a global flag
in one process does not mean the other process can see the
change. Nuke the pointless IFI_NEW_LLADDR.

7 years agodelete warning about missing whitespace before trailing punctuation;
schwarze [Fri, 23 Jun 2017 19:16:49 +0000 (19:16 +0000)]
delete warning about missing whitespace before trailing punctuation;
mandoc handles this now, not in exactly the same way, but catching
all the important cases, and with less false positives;
no objection from jmc@

7 years agoEvent interrupt handler should call hv_channel_schedule now
mikeb [Fri, 23 Jun 2017 19:09:21 +0000 (19:09 +0000)]
Event interrupt handler should call hv_channel_schedule now

7 years agodelete -r, RCS id checks are now covered by mandoc,
schwarze [Fri, 23 Jun 2017 19:07:25 +0000 (19:07 +0000)]
delete -r, RCS id checks are now covered by mandoc,
and garbage collect the unused "inliteral" state variable;
ok jmc@

7 years agoRequest deferred interrupt processing
mikeb [Fri, 23 Jun 2017 19:07:13 +0000 (19:07 +0000)]
Request deferred interrupt processing

7 years agoIntroduce deferred interrupt processing capability
mikeb [Fri, 23 Jun 2017 19:05:42 +0000 (19:05 +0000)]
Introduce deferred interrupt processing capability

Hyper-V interrupts seem to be sometimes delivered before the message
becomes available on the channel ring.  This is reproducible on hvs(4)
under load.  This change is modelled on the workaround found in the
Linux driver.

7 years agos/membar_sync/virtio_membar_sync/
mikeb [Fri, 23 Jun 2017 18:54:44 +0000 (18:54 +0000)]
s/membar_sync/virtio_membar_sync/

7 years agoFinish up minor changes in the output and clear the BATCHED channel flag
mikeb [Fri, 23 Jun 2017 18:51:28 +0000 (18:51 +0000)]
Finish up minor changes in the output and clear the BATCHED channel flag

7 years agoOops. Remove extraneous 'return' and some braces from
krw [Fri, 23 Jun 2017 16:18:02 +0000 (16:18 +0000)]
Oops. Remove extraneous 'return' and some braces from
priv_write_resolv_conf() code that was moved into the
dispatch loop.

7 years agoUse a const char * for "/etc/resolv.conf.tail" instead of repeating the
krw [Fri, 23 Jun 2017 16:09:38 +0000 (16:09 +0000)]
Use a const char * for "/etc/resolv.conf.tail" instead of repeating the
text in various forms in different error messages. Also makes the error
messages consistent by always displaying the full path name.

7 years agoTake reyk's imsg resolv.conf improvements of a while ago to their
krw [Fri, 23 Jun 2017 15:40:56 +0000 (15:40 +0000)]
Take reyk's imsg resolv.conf improvements of a while ago to their
logical conclusion.

Nuke _PATH_RESOLV_CONF since the value is only meant to be
known inside priv_write_resolv_conf(). Just use a local const char *.

Bring priv_write_resolv_conf() into line with other priv_ functions
invoked from the dispatch loop. i.e. don't pass it the imsg, just pass
a pointer to the data and a size after ensuring there is data to pass.

7 years agoAdd user-keys option to allow user-defined keys to be set, from Dan
nicm [Fri, 23 Jun 2017 15:36:52 +0000 (15:36 +0000)]
Add user-keys option to allow user-defined keys to be set, from Dan
Aloni.

7 years ago- Fix Tx queues to USB endpoints mapping and merge urtwn_r92c_dma_init()
kevlo [Fri, 23 Jun 2017 14:41:54 +0000 (14:41 +0000)]
- Fix Tx queues to USB endpoints mapping and merge urtwn_r92c_dma_init()
  and urtwn_r88e_dma_init() into one; from FreeBSD r291902.

- Change the way the number of pages for public queue is calculated;
  Based on the vendor driver's _InitQueueReservedPage(), the formula for
  calculation of the number of pages for public priority queue is as follows:

  if the device has 3 endpoints:
  PUBQ = total number of Tx pages - HQ - LQ - NQ

  if the device has 2 endpoints (i.e. has high and normal priority queues):
  PUBQ = total number of Tx pages - HQ - NQ

- Don't write MCS8..MCS15 Tx power if the WNIC is a 1-stream Tx;

- Set R88E_TX_PAGE_COUNT to a correct value;

- Minimal enhancement in urtwn_open_pipes() for upcoming rtl8192eu chipset
  support;

Tested with USB-N10 Nano (rtl8188cu), DWA-131 rev B (rtl8192cu), and
TL-WN725N v2 (rtl8188eu) on amd64.

ok stsp@

7 years agoRemove unused confirm() and datime() functions.
fcambus [Fri, 23 Jun 2017 12:56:25 +0000 (12:56 +0000)]
Remove unused confirm() and datime() functions.

Those functions are unused and have been compiled out since 1998,
it's time to let them go.

OK sthen@, tom@, mestre@

7 years agoAlways include Makefile.dep, conditionally including it based on the
jsg [Fri, 23 Jun 2017 11:54:22 +0000 (11:54 +0000)]
Always include Makefile.dep, conditionally including it based on the
existence of a .depend file can lead to various problems.

The logic before rev 1.15 resulted in Makefile.dep always being
included as DEPENDSFILE was never set so this returns to the old
behaviour.

ok espie@

7 years agoResetting the mbuf header in if_input_local() was stripping off the
bluhm [Fri, 23 Jun 2017 11:18:12 +0000 (11:18 +0000)]
Resetting the mbuf header in if_input_local() was stripping off the
M_LOOP flag.  This broke IPv6 multicast.  Always set M_LOOP when
going through if_input_local() and adjust the flag's comment.
report rzalamena@; OK mpi@

7 years agoUnbreak profiling assembly functions in userland by defining the
mpi [Fri, 23 Jun 2017 09:55:10 +0000 (09:55 +0000)]
Unbreak profiling assembly functions in userland by defining the
correct prologue if compiled with -DPROF.

ok deraadt@

7 years agoWhen using the escape sequence &~ the code path is client_loop() ->
mestre [Fri, 23 Jun 2017 07:24:48 +0000 (07:24 +0000)]
When using the escape sequence &~ the code path is client_loop() ->
client_simple_escape_filter() -> process_escapes() -> fork() and the pledge for
this path lacks the proc promise and therefore aborts the process.
The solution is to just add proc the promise to this specific pledge.

Reported by Gregoire Jadi gjadi ! omecha.info
Insight with tb@, OK jca@

7 years agoi didn't know we had clang-local until reminded by jsg.
tedu [Fri, 23 Jun 2017 06:07:51 +0000 (06:07 +0000)]
i didn't know we had clang-local until reminded by jsg.
mention the disabling of ident strings.

7 years agoImport regenerated moduli.
dtucker [Fri, 23 Jun 2017 03:30:42 +0000 (03:30 +0000)]
Import regenerated moduli.

7 years agoRun the screen twice so we end up with more candidate groups. ok djm@
dtucker [Fri, 23 Jun 2017 03:25:53 +0000 (03:25 +0000)]
Run the screen twice so we end up with more candidate groups.  ok djm@

7 years agoWrite text boxes as <mi>, <mn>, or <mo> as appropriate,
schwarze [Fri, 23 Jun 2017 02:31:39 +0000 (02:31 +0000)]
Write text boxes as <mi>, <mn>, or <mo> as appropriate,
and write fontstyle or fontweight attributes where required.
Missing features reported by bentley@.

7 years agoset the alignment of the per cpu cache structures to CACHELINESIZE.
dlg [Fri, 23 Jun 2017 01:21:55 +0000 (01:21 +0000)]
set the alignment of the per cpu cache structures to CACHELINESIZE.

hardcoding 64 is too optimistic.

7 years agochange the semantic for calculating when to grow the size of a cache list.
dlg [Fri, 23 Jun 2017 01:02:18 +0000 (01:02 +0000)]
change the semantic for calculating when to grow the size of a cache list.

previously it would figure out if there's enough items overall for
all the cpus to have full active an inactive free lists. this
included currently allocated items, which pools wont actually hold
on a free list and cannot predict when they will come back.

instead, see if there's enough items in the idle lists in the depot
that could instead go on all the free lists on the cpus. if there's
enough idle items, then we can grow.

tested by hrvoje popovski and amit kulkarni
ok visa@

7 years agoSimplify font handling:
schwarze [Fri, 23 Jun 2017 00:30:17 +0000 (00:30 +0000)]
Simplify font handling:
1. Inherit the font attribute from the parent box, such that iteration
is no longer required to find the current font.
2. For well-known function name tokens, do not insert an EQN_LISTONE
box into the AST; simply set the font attribute of the text box
itself that contains the name.

Also improve word splitting of unquoted strings in default font mode:
3. Split between numbers and punctuation because both will soon get
different HTML markup.
4. Do not split between letters.  With the newly ubiquitious font
attributes, all formatters will be able to figure out what to do
without putting each letter into a separate box.

7 years agoi386 uses a intentional fallthrough between appended code blocks in .init,
deraadt [Thu, 22 Jun 2017 21:26:54 +0000 (21:26 +0000)]
i386 uses a intentional fallthrough between appended code blocks in .init,
which we cannot TRAPSLED FILL.  This needs to be done a different way.
diagnosis with kettenis

7 years agoDo not interpret an empty path as current working directory "." when
benno [Thu, 22 Jun 2017 20:44:36 +0000 (20:44 +0000)]
Do not interpret an empty path as current working directory "." when
parsing LD_LIBRARY_PATH, and in DT_RPATH and DT_RUNPATH attributes and
in ld.so.hints.

ok deraadt@

7 years agoClose file descriptor on an exit path.
fcambus [Thu, 22 Jun 2017 20:38:32 +0000 (20:38 +0000)]
Close file descriptor on an exit path.

OK gsoares@

7 years agoPerl on 32 bit architectures does not support pack('Q'), replace
bluhm [Thu, 22 Jun 2017 20:17:22 +0000 (20:17 +0000)]
Perl on 32 bit architectures does not support pack('Q'), replace
it with 'NN'.

7 years agoGet the framework from relayd regress to start switchd on demand.
bluhm [Thu, 22 Jun 2017 20:06:14 +0000 (20:06 +0000)]
Get the framework from relayd regress to start switchd on demand.
This allows to run the test without manual setup.

7 years agoDo not skip any crypto tests. Remove useless make code, use defaults
bluhm [Thu, 22 Jun 2017 18:07:30 +0000 (18:07 +0000)]
Do not skip any crypto tests.  Remove useless make code, use defaults
where appropriate.
OK mikeb@

7 years agoMake sure to abort loops when pressing ^C in csh.
anton [Thu, 22 Jun 2017 18:05:31 +0000 (18:05 +0000)]
Make sure to abort loops when pressing ^C in csh.

Regression found by deraadt@

7 years agoUse the tls_password_cb() callback with all PEM_read_bio_*() calls, so that
jsing [Thu, 22 Jun 2017 18:03:57 +0000 (18:03 +0000)]
Use the tls_password_cb() callback with all PEM_read_bio_*() calls, so that
we can prevent libcrypto from going behind our back and trying to read
passwords from standard input (which we may not be permitted to do).

Found by jsg@ with httpd and password protected keys.

7 years agoFix incorrect indentation.
jsing [Thu, 22 Jun 2017 17:58:54 +0000 (17:58 +0000)]
Fix incorrect indentation.