openbsd
7 years agopass better arguments to mkdep.
espie [Sun, 4 Jun 2017 12:25:19 +0000 (12:25 +0000)]
pass better arguments to mkdep.
- some std= parameters are actually critical, -std=c++11 makes a huge
difference for clang.
- explicitly ask mkdep to run the C++ compiler for C++ code, as again,
some compilers will see the difference.

(this should allow us to repair make depend under src/gnu/usr.bin/clang)

okay kettenis@

7 years agoAdd a timeout to prevent the sequences which wait for a specific
nicm [Sun, 4 Jun 2017 09:22:34 +0000 (09:22 +0000)]
Add a timeout to prevent the sequences which wait for a specific
terminator (OSC, APC and DCS) waiting forever, which helps to avoid
garbage (cat /dev/random) locking up panes completely. This (and the
last commit) prompted by a discussion with theo.

7 years agoRemove unused variable.
nicm [Sun, 4 Jun 2017 09:02:57 +0000 (09:02 +0000)]
Remove unused variable.

7 years agoBe more strict about escape sequences that rename windows or set titles:
nicm [Sun, 4 Jun 2017 09:02:36 +0000 (09:02 +0000)]
Be more strict about escape sequences that rename windows or set titles:
ignore any that not valid UTF-8 outright, and for good measure pass the
result through our UTF-8-aware vis(3).

7 years agoSupport SIGUSR2 to stop and start logging for an existing server. Also
nicm [Sun, 4 Jun 2017 08:25:57 +0000 (08:25 +0000)]
Support SIGUSR2 to stop and start logging for an existing server. Also
we currently only have two log levels so just use -v and -vv rather than
-v and -vvvv, and clarify the man page entry for -v.

7 years agoTypo/style; plus man page escaping from jmc.
nicm [Sun, 4 Jun 2017 08:02:20 +0000 (08:02 +0000)]
Typo/style; plus man page escaping from jmc.

7 years agoRe-arrange struct bus_dmamap members
sf [Sun, 4 Jun 2017 06:21:37 +0000 (06:21 +0000)]
Re-arrange struct bus_dmamap members

This reduces holes/padding and makes the struct smaller by 8 bytes.

ok kettenis@

7 years agoupdate link to Ken Kato's vmware backdoor protocol documentation
jmatthew [Sun, 4 Jun 2017 05:04:24 +0000 (05:04 +0000)]
update link to Ken Kato's vmware backdoor protocol documentation
from Seth Jackson

7 years agouse htolem32 and lemtoh32 instead of htole32 and letoh32.
dlg [Sun, 4 Jun 2017 04:29:23 +0000 (04:29 +0000)]
use htolem32 and lemtoh32 instead of htole32 and letoh32.

saves about half a k on sparc64.

7 years agoPure preprocessor implementation of the roff(7) .ec and .eo requests
schwarze [Sun, 4 Jun 2017 00:08:56 +0000 (00:08 +0000)]
Pure preprocessor implementation of the roff(7) .ec and .eo requests
(escape character control), touching nothing after the preprocessing
stage and keeping even the state variable local to the preprocessor.
Since the escape character is also used for line continuation, this
requires pulling the implementation of line continuation from the
input reader to the preprocessor, which also considerably shortens
the code required for that.

When the escape character is changed, simply let the preprocessor
replace bare by escaped backslashes and instances of the non-standard
escape character with bare backslashes - that's all we need.

Oh, and if anybody dares to use these requests in OpenBSD manuals,
sending a medium-sized pack of axe-murderes after them might be a
worthwhile part of the punishment, but probably insuffient on its own.

7 years agoconfig -e mode should match our other policies which ensure og-rwx /bsd.
deraadt [Sat, 3 Jun 2017 23:31:37 +0000 (23:31 +0000)]
config -e mode should match our other policies which ensure og-rwx /bsd.
pointed out by brynet

7 years agoWe have been running a small awk program before installing the relinked libc.
deraadt [Sat, 3 Jun 2017 22:59:09 +0000 (22:59 +0000)]
We have been running a small awk program before installing the relinked libc.
Perform the same kind of test for relinked libcrypto, using an openssl
sequence (proposed by sthen)

7 years agoImmediately after mounting / read-write, chmod og-rwx the kernel. Remote
deraadt [Sat, 3 Jun 2017 22:33:36 +0000 (22:33 +0000)]
Immediately after mounting / read-write, chmod og-rwx the kernel.  Remote
prying eyes were already been hindered at determining kernel addresses, now
local prying eyes are also hindered.
ok tb rpe

7 years agoAfter installing, chmod og-rwx {/bsd bsd.mp bsd.sp bsd.rd }
deraadt [Sat, 3 Jun 2017 22:27:41 +0000 (22:27 +0000)]
After installing, chmod og-rwx {/bsd bsd.mp bsd.sp bsd.rd }
(Should we make them kmem readable?  Let's ignore that for now and see
if any issues surface).
ok tb rpe

7 years agokernels in compile dirs are readonly, and the bsd.rd we created has
deraadt [Sat, 3 Jun 2017 22:25:19 +0000 (22:25 +0000)]
kernels in compile dirs are readonly, and the bsd.rd we created has
tracked that permission.  Make the copy in $RELEASEDIR a+r

7 years agokernels in compile dirs are og-rwx, so need to make them readable in
deraadt [Sat, 3 Jun 2017 22:23:47 +0000 (22:23 +0000)]
kernels in compile dirs are og-rwx, so need to make them readable in
$RELEASEDIR
ok tb rpe

7 years agoCreate gap.S and gap.o with umask 077. Create lorder and bsd* with umask 007.
deraadt [Sat, 3 Jun 2017 22:21:33 +0000 (22:21 +0000)]
Create gap.S and gap.o with umask 077.  Create lorder and bsd* with umask 007.
Prying eyes cannot look at the kernels in the compile directory.
ok tb rpe, kernel developers seem unimpacted

7 years ago".section .bss" is portable to more platforms than plain ".bss"
deraadt [Sat, 3 Jun 2017 22:11:27 +0000 (22:11 +0000)]
".section .bss" is portable to more platforms than plain ".bss"

7 years agouse .balign instead of .align, it is portable to more architectures
deraadt [Sat, 3 Jun 2017 22:08:02 +0000 (22:08 +0000)]
use .balign instead of .align, it is portable to more architectures
discussed with patrick

7 years agoMake set-clipboard a three-state option so tmux itself can ignore the
nicm [Sat, 3 Jun 2017 17:43:01 +0000 (17:43 +0000)]
Make set-clipboard a three-state option so tmux itself can ignore the
sequencess.

7 years agoignore blank lines in man(7) next line scope;
schwarze [Sat, 3 Jun 2017 15:54:09 +0000 (15:54 +0000)]
ignore blank lines in man(7) next line scope;
strange groff edge case behaviour found in multimedia/mjpegtools

7 years agoAdd a few sizes to free().
tb [Sat, 3 Jun 2017 15:44:03 +0000 (15:44 +0000)]
Add a few sizes to free().

Input, help & ok stsp

7 years agodelete -n option, now covered by mandoc; OK jmc@
schwarze [Sat, 3 Jun 2017 12:23:13 +0000 (12:23 +0000)]
delete -n option, now covered by mandoc; OK jmc@

7 years agoenable -Wstyle by default in -Tlint; OK jmc@
schwarze [Sat, 3 Jun 2017 12:16:19 +0000 (12:16 +0000)]
enable -Wstyle by default in -Tlint; OK jmc@

7 years agoAdd missing NET_LOCK().
mpi [Sat, 3 Jun 2017 11:58:54 +0000 (11:58 +0000)]
Add missing NET_LOCK().

Found by jmc@

7 years agoExplicitly zero out the wepseed for TKIP and WEP.
tb [Sat, 3 Jun 2017 11:58:10 +0000 (11:58 +0000)]
Explicitly zero out the wepseed for TKIP and WEP.

ok stsp

7 years agosync
florian [Sat, 3 Jun 2017 10:01:04 +0000 (10:01 +0000)]
sync

7 years agoMove slaacd to /sbin
florian [Sat, 3 Jun 2017 10:00:29 +0000 (10:00 +0000)]
Move slaacd to /sbin
jca points out that all the other interface configuration tools live
there (like ifconfig or dhclient). Furthermore it starts so early in
the boot process that /usr might not be mounted yet if it's a nfs
filesystem.
sthen and deraadt agree

7 years agovioblk/virtio: Re-arrange some struct members
sf [Sat, 3 Jun 2017 08:50:38 +0000 (08:50 +0000)]
vioblk/virtio: Re-arrange some struct members

This reduces holes/padding and makes the structs smaller.

7 years agoForeground colours with the bright attribute set need to use the bright
nicm [Sat, 3 Jun 2017 07:15:23 +0000 (07:15 +0000)]
Foreground colours with the bright attribute set need to use the bright
entries in the palette. GitHub issue 954.

7 years agoAvoid printing garbage when aborting a program that tries to use a
tb [Sat, 3 Jun 2017 04:34:41 +0000 (04:34 +0000)]
Avoid printing garbage when aborting a program that tries to use a
prohibited sysctl.

ok deraadt

7 years agouse proper name for LPI
halex [Sat, 3 Jun 2017 00:22:34 +0000 (00:22 +0000)]
use proper name for LPI

7 years agofix spelling in a handful of the Swedish entries
halex [Sat, 3 Jun 2017 00:10:19 +0000 (00:10 +0000)]
fix spelling in a handful of the Swedish entries

7 years agoPerform grant table page allocation outside of the table mutex
mikeb [Fri, 2 Jun 2017 20:25:50 +0000 (20:25 +0000)]
Perform grant table page allocation outside of the table mutex

witness(4) has found that km_alloc will trigger an rw_enter via uvm_map
and vm_map_lock.  While rw_enter is called with RW_SLEEPFAIL, there's
also an msleep in there, so it's easier to avoid getting in the middle
of that.

7 years agoUse += instead of = for extra flag. Prompted by miod@
otto [Fri, 2 Jun 2017 20:03:54 +0000 (20:03 +0000)]
Use += instead of = for extra flag. Prompted by miod@

7 years agoFix an infinite loop in fortune(6).
fcambus [Fri, 2 Jun 2017 20:02:39 +0000 (20:02 +0000)]
Fix an infinite loop in fortune(6).

When invoking fortune with the -l option (to get long dictums only),
the program gets stuck in an infinite loop because fortlen() doesn't
return the fortune length correctly.

OK mestre@, tb@, deraadt@, schwarze@

7 years agoPartial implementation of \h (horizontal line drawing function).
schwarze [Fri, 2 Jun 2017 19:21:03 +0000 (19:21 +0000)]
Partial implementation of \h (horizontal line drawing function).
A full implementation would require access to output device properties
and state variables (both only available after the main parser has
finalized the parse tree) before numerical expansions in the roff
preprocessor (i.e., before the main parser is even started).

Not trying to pull that stunt right now because the static-width
implementation committed here is sufficient for tcl-style manual pages
and already more complicated than i would have suspected.

7 years agoregen
kettenis [Fri, 2 Jun 2017 16:04:36 +0000 (16:04 +0000)]
regen

7 years agoIntel HD Graphics 510.
kettenis [Fri, 2 Jun 2017 16:04:11 +0000 (16:04 +0000)]
Intel HD Graphics 510.

7 years agoScale the missed beacon counter threshold to the AP's beacon interval.
stsp [Fri, 2 Jun 2017 15:31:26 +0000 (15:31 +0000)]
Scale the missed beacon counter threshold to the AP's beacon interval.

This should make fading APs time out consistently regardless of what the
beacon interval is set to (range is 1 to 2^16 TU, though in practice 100 TU
seems to be a common value).

Print the beacon interval and missed beacon counter threshold to dmesg
if the DEBUG flag was set on the wireless interface with ifconfig(8).
This should help with diagnosing any issues that pop up.

Requested and diff eye-balled by kettenis@
help & ok tb@ phessler@

7 years agoRemove a bogus run_read() call about getting MAC version.
kevlo [Fri, 2 Jun 2017 15:09:13 +0000 (15:09 +0000)]
Remove a bogus run_read() call about getting MAC version.
ok stsp@

7 years agotypo; meant to say locore0.S
deraadt [Fri, 2 Jun 2017 12:57:45 +0000 (12:57 +0000)]
typo; meant to say locore0.S

7 years agoadd about 15 missing character escape sequences found in groff_char(7);
schwarze [Fri, 2 Jun 2017 12:41:28 +0000 (12:41 +0000)]
add about 15 missing character escape sequences found in groff_char(7);
triggered by multimedia/mkvtoolnix mkvmerge(1) using \(S2

7 years agoWhen iwm(4) firmware reports missed beacons, send a probe request only
stsp [Fri, 2 Jun 2017 11:18:37 +0000 (11:18 +0000)]
When iwm(4) firmware reports missed beacons, send a probe request only
if ic_mgt_timer indicates that we're not already waiting for a response.
Fixes a flood of probe requests sent out while the interrupt kept firing.

Also, byteswap the missed beacon counter value when reading it.

ok mpi@

7 years agoWhen iwn(4) firmware reports missed beacons, send a probe request only
stsp [Fri, 2 Jun 2017 11:18:16 +0000 (11:18 +0000)]
When iwn(4) firmware reports missed beacons, send a probe request only
if ic_mgt_timer indicates that we're not already waiting for a response.
Fixes a flood of probe requests sent out while the interrupt kept firing.

Also, read the missed beacon counter value after DMA sync.

ok mpi@

7 years agoAttach the xhci(4) FDT driver to the generic-xhci compatible as well.
patrick [Fri, 2 Jun 2017 11:06:08 +0000 (11:06 +0000)]
Attach the xhci(4) FDT driver to the generic-xhci compatible as well.

7 years agoSynonym -Wno-cpp for -Wno-#warnings. That one is not a headache for
espie [Fri, 2 Jun 2017 10:52:26 +0000 (10:52 +0000)]
Synonym -Wno-cpp for -Wno-#warnings. That one is not a headache for
scripting.
(got it into upstream, it's just a backport)
okay kettenis@, patrick@

7 years agohandle 64bit dva in the tx path as well as the rx path.
dlg [Fri, 2 Jun 2017 10:47:30 +0000 (10:47 +0000)]
handle 64bit dva in the tx path as well as the rx path.

7 years agorationalise the long list of manual CDIAGFLAGS that we add; most of
djm [Fri, 2 Jun 2017 06:06:10 +0000 (06:06 +0000)]
rationalise the long list of manual CDIAGFLAGS that we add; most of
these were redundant to -Wall -Wextra

7 years agoonly update the tx descriptors high address if it changes.
dlg [Fri, 2 Jun 2017 01:47:36 +0000 (01:47 +0000)]
only update the tx descriptors high address if it changes.

this should effectively double (or restore?) the number of packets that
can be fit on the tx ring.

tested on an od1000.

7 years agobe less tricky about when ifq_free is handled.
dlg [Fri, 2 Jun 2017 00:07:12 +0000 (00:07 +0000)]
be less tricky about when ifq_free is handled.

instead of assuming start routines only run inside the ifq serialiser,
only rely on the serialisation provided by the ifq mtx which is
explicitly used during ifq_deq ops.

ie, free the mbufs in ifq_free at the end of ifq_deq ops instead
of in the ifq_serialiser loop. ifq deq ops arent necessarily called
within the serialiser.

this should fix panics caused by fq codel on top of bce (which calls
bce_start from it's tx completion path instead of ifq_restart).

ok mikeb@

7 years agoreorder ops in sk_start to avoid possibly rolling back ifq_deq.
dlg [Thu, 1 Jun 2017 23:22:14 +0000 (23:22 +0000)]
reorder ops in sk_start to avoid possibly rolling back ifq_deq.

instead of checking for space after beggining to deq a packet, check
for space before committing to handling a packet. this means we
can use ifq_dequeue instead of ifq_deq_begin/commit/rollback.

this is a port of src/sys/dev/pci/if_sk.c r1.187, but tweaked to
account for msk using twice the tx ring descriptors thanks to its
annoying support for 64bit addresses.

tested on an od1000
ok jmatthew@ sthen@

7 years agoreorder ops in sk_start to avoid possibly rolling back ifq_deq.
dlg [Thu, 1 Jun 2017 23:17:01 +0000 (23:17 +0000)]
reorder ops in sk_start to avoid possibly rolling back ifq_deq.

instead of checking for space after beggining to deq a packet, check
for space before committing to handling a packet. this means we
can use ifq_dequeue instead of ifq_deq_begin/commit/rollback.

ok mikeb@

7 years agoPass the correct dma tag to the load buffer function. Passing t only
patrick [Thu, 1 Jun 2017 21:19:07 +0000 (21:19 +0000)]
Pass the correct dma tag to the load buffer function.  Passing t only
passes the tag where the pointer to the simplebus_dmamap_load_buffer()
wrapper is stored in.  We want to call the load buffer function that
was passed from our parent device, so we have to pass the parent's tag.
Otherwise we end up in a recursive and neverending loop.

This only occurs when a simplebus attaches to a simplebus, which we
apparently didn't have so far.

7 years agoThe fact is simple: Subshells have the same PPID as the current shell.
tb [Thu, 1 Jun 2017 20:37:38 +0000 (20:37 +0000)]
The fact is simple: Subshells have the same PPID as the current shell.
What is not so simple is squinting hard enough to conclude that POSIX
actually says that. I'm still not sure how to do that.
Problem with the shell manual pointed out by "Choose a display name".

ok otto, halex, jmc

7 years agoRevert 1.16 ("add a workaround for the rebound portjacking hijinks"),
sthen [Thu, 1 Jun 2017 20:18:44 +0000 (20:18 +0000)]
Revert 1.16 ("add a workaround for the rebound portjacking hijinks"),
it breaks at least nslookup, host, dig +tcp.

7 years agoMinimal implementation of the \h (horizontal motion) escape sequence.
schwarze [Thu, 1 Jun 2017 19:05:15 +0000 (19:05 +0000)]
Minimal implementation of the \h (horizontal motion) escape sequence.
Good enough to cope with the average DocBook insanity.

7 years agoSTYLE message about full stop at the end of .Nd; inspired by mdoclint(1)
schwarze [Thu, 1 Jun 2017 15:24:41 +0000 (15:24 +0000)]
STYLE message about full stop at the end of .Nd; inspired by mdoclint(1)

7 years agoExpand $eapid in iked tags, allowing PF rules to be written based on EAP
sthen [Thu, 1 Jun 2017 15:23:43 +0000 (15:23 +0000)]
Expand $eapid in iked tags, allowing PF rules to be written based on EAP
identity (username). OK mikeb@

7 years agoDelete -f. What matters is covered by mandoc.
schwarze [Thu, 1 Jun 2017 14:55:24 +0000 (14:55 +0000)]
Delete -f.  What matters is covered by mandoc.
OK jmc@ wiz@

7 years agoReturn time_uptime as value for when pf was enabled instead of
patrick [Thu, 1 Jun 2017 14:38:28 +0000 (14:38 +0000)]
Return time_uptime as value for when pf was enabled instead of
time_second.  Since time_second changes depending on the wall-
clock time, time_second is not a reliable source for the status.
We can even end up with a negative time delta.  Thus, use the
monotonically growing time_uptime and export it to userland.

ok bluhm@ mikeb@

7 years agomention /var/db/acpi; diff from Jan Stary <hans at stare dot cz>;
schwarze [Thu, 1 Jun 2017 12:26:14 +0000 (12:26 +0000)]
mention /var/db/acpi; diff from Jan Stary <hans at stare dot cz>;
OK deraadt@

7 years agoRemove branch prediction hint from conditional branch instruction.
naddy [Thu, 1 Jun 2017 12:14:48 +0000 (12:14 +0000)]
Remove branch prediction hint from conditional branch instruction.
These hints are not recognized by clang's builtin assembler.
From the corresponding amd64 change.  ok visa@ kettenis@

7 years agoDon't panic when we cannot locate a handle for the Serial IO protocol.
patrick [Thu, 1 Jun 2017 11:32:15 +0000 (11:32 +0000)]
Don't panic when we cannot locate a handle for the Serial IO protocol.
Fixes reports on tech and in private.

ok yasuoka@ stsp@

7 years agoSync with amd64 and allow building the i386 bootstrap with clang:
naddy [Thu, 1 Jun 2017 11:18:53 +0000 (11:18 +0000)]
Sync with amd64 and allow building the i386 bootstrap with clang:
* build with -ffreestanding
* skip the integrated assembler for assym.h
* use as(1) to build biosboot.S and the various versions of srt0.S
ok kettenis@

7 years agoRe-enabled futex based condvar & mutexes, they are not the cause of
mpi [Thu, 1 Jun 2017 10:59:23 +0000 (10:59 +0000)]
Re-enabled futex based condvar & mutexes, they are not the cause of
vmd(8)'s regression.

7 years agocrtbegin and crtend files need to be in comp, to support relink of
deraadt [Thu, 1 Jun 2017 10:43:33 +0000 (10:43 +0000)]
crtbegin and crtend files need to be in comp, to support relink of
libraries other than crt0
noticed by mikeb, solution from kettenis

7 years agoDefering some processing to the soft-interrupt handler introduced a
mpi [Thu, 1 Jun 2017 09:47:55 +0000 (09:47 +0000)]
Defering some processing to the soft-interrupt handler introduced a
race.  Revert for now.

Issue found by claudio@.

7 years agoNew condvar introduced a regression with vmd(8), revert until it is found.
mpi [Thu, 1 Jun 2017 08:46:34 +0000 (08:46 +0000)]
New condvar introduced a regression with vmd(8), revert until it is found.

Reported by Gregor Best.

7 years agoIf CVS_LOCK_REPO is set only attempt to unlock the repo if we're local.
joris [Thu, 1 Jun 2017 08:38:56 +0000 (08:38 +0000)]
If CVS_LOCK_REPO is set only attempt to unlock the repo if we're local.

Otherwise we end up calling cvs_repository_unlock() with garbage from the
stack if we're dealing with a remote cvsroot.

7 years agoDon't look at file_type until after cvs_remote_classify_file() was called.
joris [Thu, 1 Jun 2017 08:17:27 +0000 (08:17 +0000)]
Don't look at file_type until after cvs_remote_classify_file() was called.
The file status may be unknown until after that call.

7 years agoStop looking at current_cvsroot->cr_method to figure out if we're remote or not.
joris [Thu, 1 Jun 2017 08:08:24 +0000 (08:08 +0000)]
Stop looking at current_cvsroot->cr_method to figure out if we're remote or not.

Instead use cvsroot_is_local() and cvsroot_is_remote().

7 years agoupdate currency exchange rates;
jmc [Thu, 1 Jun 2017 07:58:56 +0000 (07:58 +0000)]
update currency exchange rates;

7 years agono need to bzero allocated space now that we use use recallocarray;
djm [Thu, 1 Jun 2017 06:59:21 +0000 (06:59 +0000)]
no need to bzero allocated space now that we use use recallocarray;
ok deraadt@

7 years agounconditionally zero init size of buffer; ok markus@ deraadt@
djm [Thu, 1 Jun 2017 06:58:25 +0000 (06:58 +0000)]
unconditionally zero init size of buffer; ok markus@ deraadt@

7 years agosome warnings spotted by clang; ok markus@
djm [Thu, 1 Jun 2017 06:16:43 +0000 (06:16 +0000)]
some warnings spotted by clang; ok markus@

7 years agofix casts re constness
djm [Thu, 1 Jun 2017 04:51:58 +0000 (04:51 +0000)]
fix casts re constness

7 years agoNo slaacd.conf(5) is currently planned. Remove Xr to nonexistent manual.
tb [Wed, 31 May 2017 20:43:49 +0000 (20:43 +0000)]
No slaacd.conf(5) is currently planned. Remove Xr to nonexistent manual.

ok florian

7 years agoLet the 's' command delete the right number of bytes when UTF-8
schwarze [Wed, 31 May 2017 20:18:43 +0000 (20:18 +0000)]
Let the 's' command delete the right number of bytes when UTF-8
characters are involved; similar to what anton@ previously did for 'r';
OK tb@ anton@;
also tested by Walter Alejandro Iglesias <wai at roquesor dot com>.

7 years agoToo vs To. Found by Denis Fondras openbsd (at) ledeuns (dot) net
claudio [Wed, 31 May 2017 20:01:51 +0000 (20:01 +0000)]
Too vs To. Found by Denis Fondras openbsd (at) ledeuns (dot) net

7 years agolate game space battles require tty pledge to clear screen, etc.
tedu [Wed, 31 May 2017 19:51:27 +0000 (19:51 +0000)]
late game space battles require tty pledge to clear screen, etc.
from tomr

7 years agoUse ferror() to check for getline() failure. From Scott Cheloha.
millert [Wed, 31 May 2017 19:41:30 +0000 (19:41 +0000)]
Use ferror() to check for getline() failure.  From Scott Cheloha.
OK jung@

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

As a result, the internal layout of every newly build bsd kernel is
different from past kernels.  Internal relative offsets are not known
to an outside attacker.  The only known offsets are in the startup code,
which has been unmapped.

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

ok kettenis mlarkin visa, also thanks to tedu for getting me back to this

7 years agoabout ten different improvements; OK tedu@ espie@ bentley@
schwarze [Wed, 31 May 2017 17:58:56 +0000 (17:58 +0000)]
about ten different improvements; OK tedu@ espie@ bentley@

7 years agoStyle and spacing nits.
nicm [Wed, 31 May 2017 17:56:48 +0000 (17:56 +0000)]
Style and spacing nits.

7 years agouse the standard OpenBSD license for new manual pages
schwarze [Wed, 31 May 2017 17:16:48 +0000 (17:16 +0000)]
use the standard OpenBSD license for new manual pages
rather than some 2-clause variant of the ancient BSD license;
OK benno@ tedu@

7 years agoDo not use CVS_LOCK_REPO for committing.
joris [Wed, 31 May 2017 16:48:16 +0000 (16:48 +0000)]
Do not use CVS_LOCK_REPO for committing.

This flag tells our file recursion code that for each directory entered
we should lock it. Commit however locks all relevant directories on its
own when it is about to make changes and should not depend on the file
recursion code to do so.

7 years agosync
tb [Wed, 31 May 2017 16:44:52 +0000 (16:44 +0000)]
sync

7 years agoShut up a warning.
nicm [Wed, 31 May 2017 16:44:33 +0000 (16:44 +0000)]
Shut up a warning.

7 years agoPlug memleak in rcs_translate_tag() that was causing havoc on large repos.
joris [Wed, 31 May 2017 16:31:55 +0000 (16:31 +0000)]
Plug memleak in rcs_translate_tag() that was causing havoc on large repos.

7 years agoWhen unlocking a directory only unlock the given one rather then all repo_locks.
joris [Wed, 31 May 2017 16:18:20 +0000 (16:18 +0000)]
When unlocking a directory only unlock the given one rather then all repo_locks.

7 years agofix indentation
joris [Wed, 31 May 2017 16:14:37 +0000 (16:14 +0000)]
fix indentation

7 years agoFix opencvs tag so it does not attempt to to local operations in a remote setup.
joris [Wed, 31 May 2017 16:13:25 +0000 (16:13 +0000)]
Fix opencvs tag so it does not attempt to to local operations in a remote setup.

While here make sure the "up-to-date" check (-c) works as one expects.

7 years agoImplement support for missed beacon notifications in iwn(4).
stsp [Wed, 31 May 2017 16:12:39 +0000 (16:12 +0000)]
Implement support for missed beacon notifications in iwn(4).
Works with WIFIonICE.
ok phessler@

7 years agoremove -X, it was just migrated to mandoc -Wstyle; OK wiz@
schwarze [Wed, 31 May 2017 15:35:22 +0000 (15:35 +0000)]
remove -X, it was just migrated to mandoc -Wstyle; OK wiz@

7 years agoSTYLE message about missing use of Ox/Nx/Fx/Dx; OK jmc@ wiz@
schwarze [Wed, 31 May 2017 15:30:12 +0000 (15:30 +0000)]
STYLE message about missing use of Ox/Nx/Fx/Dx; OK jmc@ wiz@

7 years agotime.h here too.
nicm [Wed, 31 May 2017 15:27:57 +0000 (15:27 +0000)]
time.h here too.

7 years agoNeed time.h.
nicm [Wed, 31 May 2017 15:26:41 +0000 (15:26 +0000)]
Need time.h.

7 years agoAdd support for EV_RECEIPT and EV_DISPATCH flags
mikeb [Wed, 31 May 2017 14:52:05 +0000 (14:52 +0000)]
Add support for EV_RECEIPT and EV_DISPATCH flags

From FreeBSD via Jan Schreiber <jes at posteo ! de>, thanks!
OK tedu, bluhm

7 years agoanother place to use ieee80211_min_basic_rate() to select the minimum tx rate
phessler [Wed, 31 May 2017 13:22:16 +0000 (13:22 +0000)]
another place to use ieee80211_min_basic_rate() to select the minimum tx rate

OK stsp@