openbsd
6 years agopass kex->hostkey_alg and kex->hostkey_nid from pre-auth to post-auth
djm [Mon, 18 Dec 2017 23:13:42 +0000 (23:13 +0000)]
pass kex->hostkey_alg and kex->hostkey_nid from pre-auth to post-auth
unpriviledged child processes; ok markus@

6 years agoChange the question at the end of installs and upgrades to present a choice
rpe [Mon, 18 Dec 2017 22:48:28 +0000 (22:48 +0000)]
Change the question at the end of installs and upgrades to present a choice
between exiting to the shell or to reboot the latter being the default.
(On sparc64 the second choice is to halt the system which leaves it at the
OpenBoot PROM prompt)

While there add a newline after the CONGRATULATIONS message.

OK tb@
positive feedback naddy@ deraadt@ giovanni@

6 years agoDo not try to put more in command message than will fit when sending
nicm [Mon, 18 Dec 2017 22:13:36 +0000 (22:13 +0000)]
Do not try to put more in command message than will fit when sending
(the server will treat as a fatal error). GitHub issue 1200.

6 years agoalways initialize the hce_launch_checks event timer.
benno [Mon, 18 Dec 2017 21:45:57 +0000 (21:45 +0000)]
always initialize the hce_launch_checks event timer.
Fixes a crash when poll is run without any checks.
Found and fixed by Hiltjo Posthuma (hiltjo -AT- codemadness -DOT- org).
ok claudio@

6 years agoDisplay $MODE (install/upgrade) in the prompt before we know the hostname.
tb [Mon, 18 Dec 2017 21:33:26 +0000 (21:33 +0000)]
Display $MODE (install/upgrade) in the prompt before we know the hostname.

suggested by deraadt
ok rpe

6 years agoSync cross references related to libutil; ok jmc@
anton [Mon, 18 Dec 2017 20:37:58 +0000 (20:37 +0000)]
Sync cross references related to libutil; ok jmc@

6 years agoGet rid of a todo by stop declaring variable texec as static and instead zeroing
anton [Mon, 18 Dec 2017 20:30:14 +0000 (20:30 +0000)]
Get rid of a todo by stop declaring variable texec as static and instead zeroing
it out prior to continuing down the recursive call chain.

Initial diff from Michael W. Bombardieri, later tweaked; ok tb@

6 years agoProperly implement the rsb attribute and actually use it.
kettenis [Mon, 18 Dec 2017 20:23:16 +0000 (20:23 +0000)]
Properly implement the rsb attribute and actually use it.

6 years agoAdd sensors for the AXP809.
kettenis [Mon, 18 Dec 2017 20:21:06 +0000 (20:21 +0000)]
Add sensors for the AXP809.

6 years agoGenerate SIGBUS/BUS_ADRALN when we see a PC Alignment Exception from userland.
kettenis [Mon, 18 Dec 2017 20:03:48 +0000 (20:03 +0000)]
Generate SIGBUS/BUS_ADRALN when we see a PC Alignment Exception from userland.

ok patrick@

6 years agoUse axppmic as a dependency instead of axppmic_rsb.
kettenis [Mon, 18 Dec 2017 19:40:12 +0000 (19:40 +0000)]
Use axppmic as a dependency instead of axppmic_rsb.

6 years agoAdd tests for the environment related commands in csh. While here, print a
anton [Mon, 18 Dec 2017 19:19:08 +0000 (19:19 +0000)]
Add tests for the environment related commands in csh. While here, print a
descriptive header before each test, inspired by the many others in regress.

6 years agoNo need to declare variable name as static in dounsetenv(). Also, drop a
anton [Mon, 18 Dec 2017 19:12:24 +0000 (19:12 +0000)]
No need to declare variable name as static in dounsetenv(). Also, drop a
redundant call to free() since name is always freed upon return.

From Michael W. Bombardieri, with some tweaks by myself.

6 years agoAdd another pair of home/end key bindings; from Lari Rasku.
anton [Mon, 18 Dec 2017 19:04:53 +0000 (19:04 +0000)]
Add another pair of home/end key bindings; from Lari Rasku.

ok jca@

6 years agoRead RAM size for chips with SOCRAM like the BCM4334 on one of my
patrick [Mon, 18 Dec 2017 18:42:33 +0000 (18:42 +0000)]
Read RAM size for chips with SOCRAM like the BCM4334 on one of my
Intel machines.

6 years agoRead RAM size for chips with SOCRAM like the BCM4334 on one of my
patrick [Mon, 18 Dec 2017 18:40:50 +0000 (18:40 +0000)]
Read RAM size for chips with SOCRAM like the BCM4334 on one of my
Intel machines.

6 years agoAdd helper function for uri handing in scp where a missing path
millert [Mon, 18 Dec 2017 17:28:54 +0000 (17:28 +0000)]
Add helper function for uri handing in scp where a missing path
simply means ".".  Also fix exit code and add warnings when an
invalid uri is encountered.  OK otto@

6 years agoWhen setting KTRACE in the environment, client and server write
bluhm [Mon, 18 Dec 2017 17:01:27 +0000 (17:01 +0000)]
When setting KTRACE in the environment, client and server write
ktrace files.  This simplifies debugging as system calls can be
inspected with kdump.

6 years agoPass the BSSID to the join command so that we connect to the AP that
patrick [Mon, 18 Dec 2017 16:44:49 +0000 (16:44 +0000)]
Pass the BSSID to the join command so that we connect to the AP that
we chose instead of any AP the firmware chooses based on the SSID.

6 years agoPass scan type directly to the scan command instead of using the global
patrick [Mon, 18 Dec 2017 16:33:37 +0000 (16:33 +0000)]
Pass scan type directly to the scan command instead of using the global
variable.

6 years agoAdd call to fuse_remove_signal_handlers(3) in fuse_teardown(3) to do the
helg [Mon, 18 Dec 2017 14:20:23 +0000 (14:20 +0000)]
Add call to fuse_remove_signal_handlers(3) in fuse_teardown(3) to do the
opposite of fuse_setup(3).

ok mpi@

6 years agoStop inserting and paying attention to 'interface <if>;'
krw [Mon, 18 Dec 2017 14:17:58 +0000 (14:17 +0000)]
Stop inserting and paying attention to 'interface <if>;'
inside 'lease {}' declarations. We don't keep leases from
multiple interfaces in dhclient.leases.<if> files.

One less thing to parse and keep in memory. More rope for
those wanting to do unspeakable things with their lease files.

6 years agoAdd sizes for free() in libsa for amd64 and i386.
fcambus [Mon, 18 Dec 2017 12:53:33 +0000 (12:53 +0000)]
Add sizes for free() in libsa for amd64 and i386.

OK tom@, deraadt@

6 years agoRemove unused variable from Thomas Adam.
nicm [Mon, 18 Dec 2017 12:39:34 +0000 (12:39 +0000)]
Remove unused variable from Thomas Adam.

6 years agoRefactor libfuse option processing to better support options in the
helg [Mon, 18 Dec 2017 11:41:41 +0000 (11:41 +0000)]
Refactor libfuse option processing to better support options in the
future. Immediate benefits are that gid, uid and umask are now
supported and max_read is now honoured for all file systems. Mounting
read_only is now possible but requires more thorough testing.

ok mpi@

6 years agoEnable RSB attachment for axppmic(4).
kettenis [Mon, 18 Dec 2017 10:51:24 +0000 (10:51 +0000)]
Enable RSB attachment for axppmic(4).

6 years agoAdd i2c interface code to the new axppmic(4) code and add support for the
kettenis [Mon, 18 Dec 2017 10:50:13 +0000 (10:50 +0000)]
Add i2c interface code to the new axppmic(4) code and add support for the
AXP152 and AXP209 here as well.  The AXP209 is extended to support
regulators and sensors.  The ACIN and VBUS indicators are now exported as
sensors.  Retire the old AXP152/AXP209 support code.

6 years agoMap framebuffer into userland as non-cachable (but normal) memory. We still
kettenis [Mon, 18 Dec 2017 10:13:45 +0000 (10:13 +0000)]
Map framebuffer into userland as non-cachable (but normal) memory.  We still
map the framebuffer as device memory in the kernel.  Using mismatched
memory attributes like this is discouraged (and we should probably fix this
at some point) but this particular case is well-defined and the potential
side-effects should not matter for thus use-case.

ok patrick@

6 years agoRevert support for multiple threads to enter kqueue_scan() in parallel.
mpi [Mon, 18 Dec 2017 10:10:53 +0000 (10:10 +0000)]
Revert support for multiple threads to enter kqueue_scan() in parallel.

It is not clear if this change is responsible for the lockups experienced
by dhill@ and jcs@ but since we're no longer grabbing the socket lock in
kqueue(2) filters there's no need for this change.

6 years agoRevert grabbing the socket lock in kqueue(2) filters.
mpi [Mon, 18 Dec 2017 10:07:55 +0000 (10:07 +0000)]
Revert grabbing the socket lock in kqueue(2) filters.

This change exposed or created a situation where a CPU started to be
irresponsive while holding the KERNEL_LOCK().  These led to lockups and
even with MP_LOCKDEBUG it was not clear what happened to this CPU.

These situations have been experience by dhill@ with dcrwallet and jcs@
with syncthing.  Both applications are written in Go and do kevent(2)
& networking across multiple threads.

6 years agoMake rw_exit() always succeed after a panic.
mpi [Mon, 18 Dec 2017 10:05:43 +0000 (10:05 +0000)]
Make rw_exit() always succeed after a panic.

Prevents a deadlock in if_downall() when rw_enter() succeed without
really grabbing the lock.

Reported by and ok phessler@

6 years agoSize for free(9).
mpi [Mon, 18 Dec 2017 09:40:17 +0000 (09:40 +0000)]
Size for free(9).

From <kshe59 at zoho.eu>

6 years agoAdd support for enabling registered regulators. Make sure that we leave
kettenis [Mon, 18 Dec 2017 09:13:47 +0000 (09:13 +0000)]
Add support for enabling registered regulators.  Make sure that we leave
regulators with a "regulator-always-on" property alone.

ok patrick@

6 years agoReclaim browser screen real estate in bgplg
job [Mon, 18 Dec 2017 09:12:49 +0000 (09:12 +0000)]
Reclaim browser screen real estate in bgplg

Removing versioning information too.

OK deraadt@

6 years agoTighten /usr/local and /usr/X11R6 so that 8G disks still fit in our default
ajacoutot [Mon, 18 Dec 2017 09:09:53 +0000 (09:09 +0000)]
Tighten /usr/local and /usr/X11R6 so that 8G disks still fit in our default
partitioning scheme.

ok florian@ benno@

6 years agolet's not try to document the number of items in a list...
jmc [Mon, 18 Dec 2017 07:15:15 +0000 (07:15 +0000)]
let's not try to document the number of items in a list...

6 years agoAdd the CLOCK_BOOTTIME clockid for use with clock_gettime(2)
cheloha [Mon, 18 Dec 2017 05:51:53 +0000 (05:51 +0000)]
Add the CLOCK_BOOTTIME clockid for use with clock_gettime(2)
and put it to use in userspace in lieu of the kern.boottime
sysctl.

Its absolute value is the time that has elapsed since the
system booted, i.e., the system uptime.

Use in top(1), w(1), and snmpd(8) eliminates a race with
settimeofday(2), adjtime(2), etc. inherent to deriving the
system uptime via the kern.boottime sysctl.

Product of a great deal of discussion/revision with jca@, tb@,
and guenther@.

ok tb@ jca@ guenther@ dlg@ mlarkin@ tom@

6 years agopass negotiated signing algorithm though to sshkey_verify() and
djm [Mon, 18 Dec 2017 02:25:15 +0000 (02:25 +0000)]
pass negotiated signing algorithm though to sshkey_verify() and
check that the negotiated algorithm matches the type in the
signature (only matters for RSA SHA1/SHA2 sigs). ok markus@

6 years agosshkey_sigtype() function to return the type of a signature;
djm [Mon, 18 Dec 2017 02:22:29 +0000 (02:22 +0000)]
sshkey_sigtype() function to return the type of a signature;
ok markus@

6 years agoSupport setting the Cortex-A7 cores to active/passive mode and
patrick [Mon, 18 Dec 2017 00:08:28 +0000 (00:08 +0000)]
Support setting the Cortex-A7 cores to active/passive mode and
fix up the code for the Cortex-R4 which works the same.

6 years agosync
deraadt [Sun, 17 Dec 2017 20:14:40 +0000 (20:14 +0000)]
sync

6 years agovmm(4): pass EFER properly from vmd(8), needed to support vmctl(8)'s "-b"
mlarkin [Sun, 17 Dec 2017 19:16:02 +0000 (19:16 +0000)]
vmm(4): pass EFER properly from vmd(8), needed to support vmctl(8)'s "-b"
option which had been broken due to recent commits on AMD (SVM/RVI)

ok pd@

6 years agoAdd community/large-community commands and retain parameter input in form
job [Sun, 17 Dec 2017 18:41:17 +0000 (18:41 +0000)]
Add community/large-community commands and retain parameter input in form

OK deraadt@

6 years agoAdd a new question "Escape to shell before reboot? [no]" at the end of
rpe [Sun, 17 Dec 2017 18:29:56 +0000 (18:29 +0000)]
Add a new question "Escape to shell before reboot? [no]" at the end of
the install and upgrade process.

"no" or [enter] reboots the system
"yes" leaves the install or upgrade at the shell prompt

On selected architectures, sparc64 being the only so far, the system
is halted instead of rebooted.

autoinstall(8) is NOT affected by this new question as it reboots the
system automatically already.

Suggested by and OK deraadt@, tb@ phessler@
Feedback on sparc64 by stsp@
Positive feedback pea@ landry@

6 years agoMake axppmic(4) attach to a Reduced Serial Bus, and support the AXP806
kettenis [Sun, 17 Dec 2017 18:25:25 +0000 (18:25 +0000)]
Make axppmic(4) attach to a Reduced Serial Bus, and support the AXP806
and AXP809 PMICs.  Disabled for now.

6 years agoallow '-' in usernames
rpe [Sun, 17 Dec 2017 17:03:52 +0000 (17:03 +0000)]
allow '-' in usernames

requested and OK aja
OK halex@

6 years agoAdd 32K output klock support.
kettenis [Sun, 17 Dec 2017 15:29:29 +0000 (15:29 +0000)]
Add 32K output klock support.

6 years agoLet the Insert key toggle overwrite mode. This matches GNU Emacs behavior.
bcallah [Sun, 17 Dec 2017 14:37:57 +0000 (14:37 +0000)]
Let the Insert key toggle overwrite mode. This matches GNU Emacs behavior.
Diff from Lari Rasku <lari.rasku AT elisanet DOT fi>
ok florian@

6 years agoFurther simplifY lease parsing. Fold add_lease() into read_lease_db(),
krw [Sun, 17 Dec 2017 14:24:04 +0000 (14:24 +0000)]
Further simplifY lease parsing. Fold add_lease() into read_lease_db(),
and move all lease parsing into parse_lease().

6 years agodwxe(4)
kettenis [Sun, 17 Dec 2017 13:54:08 +0000 (13:54 +0000)]
dwxe(4)

6 years agoAdd magic to make USB PYs work on Allwinner H3/H5/A64.
kettenis [Sun, 17 Dec 2017 13:23:03 +0000 (13:23 +0000)]
Add magic to make USB PYs work on Allwinner H3/H5/A64.

6 years agoAdd wsdisplay options needed for X and VT switching.
kettenis [Sun, 17 Dec 2017 12:57:32 +0000 (12:57 +0000)]
Add wsdisplay options needed for X and VT switching.

ok patrick@

6 years agoPass Cortex-R4 reset vector to activation function.
patrick [Sun, 17 Dec 2017 10:26:21 +0000 (10:26 +0000)]
Pass Cortex-R4 reset vector to activation function.

6 years agoUse proper BN functions for error reporting; from kshe
otto [Sun, 17 Dec 2017 08:21:10 +0000 (08:21 +0000)]
Use proper BN functions for error reporting; from kshe

6 years agoRead RAM base address and size so we know where to put the firmware.
patrick [Sat, 16 Dec 2017 23:45:16 +0000 (23:45 +0000)]
Read RAM base address and size so we know where to put the firmware.

6 years agoImplement setting the chip into active mode, as needed for setting up
patrick [Sat, 16 Dec 2017 23:39:58 +0000 (23:39 +0000)]
Implement setting the chip into active mode, as needed for setting up
the PCIe-based BCM43602's firmware in the PCI attachment driver.

6 years agoSupport setting the Cortex-R4, as found on a BCM43602, to passive mode.
patrick [Sat, 16 Dec 2017 23:32:56 +0000 (23:32 +0000)]
Support setting the Cortex-R4, as found on a BCM43602, to passive mode.

6 years agoAdd some more Chip IDs to bwfm(4).
patrick [Sat, 16 Dec 2017 23:29:48 +0000 (23:29 +0000)]
Add some more Chip IDs to bwfm(4).

6 years agoEnforce voltage limits from the device tree. Enforcing the limits also
kettenis [Sat, 16 Dec 2017 21:12:03 +0000 (21:12 +0000)]
Enforce voltage limits from the device tree.  Enforcing the limits also
happens when regulators are registered.  As a consequence they will be
properly initialized even when the firmware doesn't do that.

ok patrick@

6 years agoAdd support for 1-byte reads and writes.
kettenis [Sat, 16 Dec 2017 21:09:38 +0000 (21:09 +0000)]
Add support for 1-byte reads and writes.

6 years agoWith leases no longer in dhclient.conf, rename a bunch of
krw [Sat, 16 Dec 2017 20:47:53 +0000 (20:47 +0000)]
With leases no longer in dhclient.conf, rename a bunch of
functions and fields to more obvious names reflecting this
separation.

6 years agoMove __cxa_thread_atexit* to its own .c file to avoid pulling the code
guenther [Sat, 16 Dec 2017 20:06:55 +0000 (20:06 +0000)]
Move __cxa_thread_atexit* to its own .c file to avoid pulling the code
(w/ _dlctl reference) into static executables.  It's all Mark's code so
put his preferred copyright on it.

ok kettenis@

6 years agosync
deraadt [Sat, 16 Dec 2017 19:45:52 +0000 (19:45 +0000)]
sync

6 years agotweak previous;
jmc [Sat, 16 Dec 2017 18:28:16 +0000 (18:28 +0000)]
tweak previous;

6 years agoEnable sxirsb(4).
kettenis [Sat, 16 Dec 2017 14:15:56 +0000 (14:15 +0000)]
Enable sxirsb(4).

6 years agoUpdate with changes from FreeBSD via NetBSD. From Sevan Janiyan.
millert [Sat, 16 Dec 2017 13:01:22 +0000 (13:01 +0000)]
Update with changes from FreeBSD via NetBSD.  From Sevan Janiyan.

6 years agohookup execpromise
florian [Sat, 16 Dec 2017 11:01:34 +0000 (11:01 +0000)]
hookup execpromise

6 years agoexecpromise regress
florian [Sat, 16 Dec 2017 11:00:49 +0000 (11:00 +0000)]
execpromise regress

6 years agoPassing NULL to free() is fine; from Michael W. Bombardieri.
anton [Sat, 16 Dec 2017 10:27:21 +0000 (10:27 +0000)]
Passing NULL to free() is fine; from Michael W. Bombardieri.

6 years agoacrtc(4), sxirsb(4)
kettenis [Sat, 16 Dec 2017 10:23:07 +0000 (10:23 +0000)]
acrtc(4), sxirsb(4)

6 years agoAdd a driver for the RSB controller found on various Allwinner SoCs.
kettenis [Sat, 16 Dec 2017 10:22:13 +0000 (10:22 +0000)]
Add a driver for the RSB controller found on various Allwinner SoCs.
Add a driver for the RTC part of the AC100 chip.
Together this turns my Cubieboard4 into a real computer by giving it
a proper clock.

ok patrick@

6 years agoDon't use _libc_ prefix when referencing "builtin" symbols with clang.
kettenis [Sat, 16 Dec 2017 09:25:43 +0000 (09:25 +0000)]
Don't use _libc_ prefix when referencing "builtin" symbols with clang.

Slightly tweaked diff from guenther@

6 years agooops - previous should have been a list item;
jmc [Fri, 15 Dec 2017 20:51:28 +0000 (20:51 +0000)]
oops - previous should have been a list item;

6 years agotypo; from alexander kuleshov
jmc [Fri, 15 Dec 2017 18:08:47 +0000 (18:08 +0000)]
typo; from alexander kuleshov

6 years agosync
jca [Fri, 15 Dec 2017 16:42:21 +0000 (16:42 +0000)]
sync

6 years agoExport only symbols to what's declared in fuse.h/fuse_opt.h
jca [Fri, 15 Dec 2017 16:40:33 +0000 (16:40 +0000)]
Export only symbols to what's declared in fuse.h/fuse_opt.h

While here, use guenther's magic recipe to avoid the PLT when calling
exported symbols from within the library.

ok kettenis@ for v1, ok guenther@ helg@

6 years agoreplace a hardcoded jot with ${JOT}
tb [Fri, 15 Dec 2017 15:24:15 +0000 (15:24 +0000)]
replace a hardcoded jot with ${JOT}

6 years agoThe pledge(2) regress tests fail since the second parameter has
bluhm [Fri, 15 Dec 2017 14:45:51 +0000 (14:45 +0000)]
The pledge(2) regress tests fail since the second parameter has
been converted from paths to execpromises.  Remove the test fragments
for the non-existing paths feature.
OK semarie@ florian@

6 years agoUse the canonical idiom to check strlcat(3). An unchecked strlcat call
tb [Fri, 15 Dec 2017 14:20:52 +0000 (14:20 +0000)]
Use the canonical idiom to check strlcat(3). An unchecked strlcat call
led to unexpected output: compare 'jot -w $(printf %1020s)%d%' 1 1'
with 'jot -w $(printf %1019s)%d%' 1 1'.

found by & ok martijn

6 years agoInstead of pointlessly falling through other cases and ending up doing
tb [Fri, 15 Dec 2017 13:04:11 +0000 (13:04 +0000)]
Instead of pointlessly falling through other cases and ending up doing
goto fmt_broken, do it explicitly. Makes following the code path through
the switch a bit easier.

Prompted by a request by martijn

6 years agoenable the 'wDn' test now that jot has been fixed.
tb [Fri, 15 Dec 2017 12:19:01 +0000 (12:19 +0000)]
enable the 'wDn' test now that jot has been fixed.

6 years agoMake sure the double is cast to a long if the format string is %D, %O, %U.
tb [Fri, 15 Dec 2017 12:17:49 +0000 (12:17 +0000)]
Make sure the double is cast to a long if the format string is %D, %O, %U.
Fixes output of e.g. 'jot -w %D 11 -5'.

ok martijn

6 years agoFix formatting of libfuse version info.
helg [Fri, 15 Dec 2017 12:08:22 +0000 (12:08 +0000)]
Fix formatting of libfuse version info.

ok mpi@

6 years agoAdd a few more Allwinner A80 clocks.
kettenis [Fri, 15 Dec 2017 09:15:36 +0000 (09:15 +0000)]
Add a few more Allwinner A80 clocks.

6 years agoput where im up to into the tree so jmatthew@ can look at it.
dlg [Fri, 15 Dec 2017 05:56:08 +0000 (05:56 +0000)]
put where im up to into the tree so jmatthew@ can look at it.

6 years agoifq_barrier should be callable by any nic, not just MPSAFE ones.
dlg [Fri, 15 Dec 2017 01:40:39 +0000 (01:40 +0000)]
ifq_barrier should be callable by any nic, not just MPSAFE ones.

if (when) tx mitigation goes in again, all nics will have deferred
work that will need a barrier to ensure isn't running anymore.

found by bluhm@ when tx mit was in.

6 years agoadd ifiqueues for mp safety and nics with multiple rx rings.
dlg [Fri, 15 Dec 2017 01:37:30 +0000 (01:37 +0000)]
add ifiqueues for mp safety and nics with multiple rx rings.

currently there is a single mbuf_queue per interface, which all
rings on a nic shove packets onto. while the list inside this queue
is protected by a mutex, the counters around it (ie, ipackets,
ibytes, idrops) are not. this means updates can be lost, and reading
the statistics is also inconsistent. having a single queue means
that busy rx rings can dominate and then starve the others.

ifiqueue structs are like ifqueue structs. they provide per ring
queues, and independent counters for each ring. when ifdata is read
for userland, these counters are aggregated. having a queue per
ring now allows for per ring backpressure to be applied. MCLGETI
will have it's day again.

right now we assume every interface wants an input queue and
unconditionally provide one. individual interfaces can opt into
more.

im not completely happy about the shape of this atm, but shuffling
it around more makes the diff bigger.

ok visa@

6 years agomake sched_barrier use cond_wait/cond_signal.
dlg [Thu, 14 Dec 2017 23:21:04 +0000 (23:21 +0000)]
make sched_barrier use cond_wait/cond_signal.

previously the code was using a percpu flag to manage the sleeps/wakeups,
which means multiple threads waiting for a barrier on a cpu could
race. moving to a cond struct on the stack fixes this.

while here, get rid of the sbar taskq and just use systqmp instead.
the barrier tasks are short, so there's no real downside.

ok mpi@

6 years agoset Location header for 307 and 308 status codes
benno [Thu, 14 Dec 2017 21:19:47 +0000 (21:19 +0000)]
set Location header for 307 and 308 status codes
ok sthen@ phessler@

6 years agoReplace ED25519's private SHA-512 implementation with a call to the
naddy [Thu, 14 Dec 2017 21:07:39 +0000 (21:07 +0000)]
Replace ED25519's private SHA-512 implementation with a call to the
regular digest code.  This speeds up compilation considerably.
ok markus@

6 years agoDon't bother using DETACH_FORCE for the softraid luns at reboot
deraadt [Thu, 14 Dec 2017 20:23:13 +0000 (20:23 +0000)]
Don't bother using DETACH_FORCE for the softraid luns at reboot
time; the aggressive mountpoint destruction seems to hit insane
use-after-frees when we are already far on the way down.

6 years agoGive vflush_vnode() a hint about vnodes we don't need to account as "busy".
deraadt [Thu, 14 Dec 2017 20:20:38 +0000 (20:20 +0000)]
Give vflush_vnode() a hint about vnodes we don't need to account as "busy".
Change mountpoint to RDONLY a little later.  Seems to improve the
rw->ro transition a bit.

6 years agoMake roaming after a background scan work while tcpbench -u is running
stsp [Thu, 14 Dec 2017 20:12:32 +0000 (20:12 +0000)]
Make roaming after a background scan work while tcpbench -u is running
over iwn(4), in the same way as this was done for iwm(4).

I forgot about making iwn(4) heed the IEEE80211_F_TX_MGMT_ONLY flag which
is used to disable queueing of new data frames during an AP switch.

Found due to a problem report by naddy@
ok phessler@ tb@

6 years agoSimplify and unify timespec variables used in those event loops
jca [Thu, 14 Dec 2017 18:56:22 +0000 (18:56 +0000)]
Simplify and unify timespec variables used in those event loops

ok millert@

6 years agoMy previous commit broke the ramdisk build; fix it
stsp [Thu, 14 Dec 2017 18:52:17 +0000 (18:52 +0000)]
My previous commit broke the ramdisk build; fix it

6 years agowhen -h is passed don't print any header, as is common practise in other systems...
jasper [Thu, 14 Dec 2017 18:03:03 +0000 (18:03 +0000)]
when -h is passed don't print any header, as is common practise in other systems too.
adjust uptime.1 while here as pointed out by martijn@

ok tb@ jca@ martijn@

6 years agosync
deraadt [Thu, 14 Dec 2017 17:48:47 +0000 (17:48 +0000)]
sync

6 years agoIf switching RW->RO, then stop deferring timestamp writes...and possibly
guenther [Thu, 14 Dec 2017 17:25:39 +0000 (17:25 +0000)]
If switching RW->RO, then stop deferring timestamp writes...and possibly
other pending inode attribute changes.  We appear to be missing UFS_UPDATE()
calls in some paths with the result that bsd.rd remounting the newly
created /mnt to RO would lose the GID changes on device inodes there.
This only affected devices, as they're the only inodes where timestamp
writes are delayed.

ok deraadt@

6 years agoAdd Symbols.map to explicitly define the ABIs, hiding linker defined symbols.
guenther [Thu, 14 Dec 2017 17:06:33 +0000 (17:06 +0000)]
Add Symbols.map to explicitly define the ABIs, hiding linker defined symbols.
Use hidden aliases for internal invocations of exported symbols to avoid PLT.

ok deraadt@ kettenis@ jca@

6 years agosync
deraadt [Thu, 14 Dec 2017 16:57:59 +0000 (16:57 +0000)]
sync