openbsd
9 years agoremove the second void * argument on tasks.
dlg [Tue, 27 Jan 2015 03:17:35 +0000 (03:17 +0000)]
remove the second void * argument on tasks.

when workqs were introduced, we provided a second argument so you
could pass a thing and some context to work on it in. there were
very few things that took advantage of the second argument, so when
i introduced pools i suggested removing it. since tasks were meant
to replace workqs, it was requested that we keep the second argument
to make porting from workqs to tasks easier.

now that workqs are gone, i had a look at the use of the second
argument again and found only one good use of it (vdsp(4) on sparc64
if you're interested) and a tiny handful of questionable uses. the
vast majority of tasks only used a single argument. i have since
modified all tasks that used two args to only use one, so now we
can remove the second argument.

so this is a mechanical change. all tasks only passed NULL as their
second argument, so we can just remove it.

ok krw@

9 years agoRemove an unused and confusing assignment that had been commented out for
mlarkin [Tue, 27 Jan 2015 02:15:30 +0000 (02:15 +0000)]
Remove an unused and confusing assignment that had been commented out for
years. No functional change.

9 years agoRemove an unused variable whose functionality was moved to locore long ago.
mlarkin [Tue, 27 Jan 2015 02:09:07 +0000 (02:09 +0000)]
Remove an unused variable whose functionality was moved to locore long ago.

9 years agoRemove an odd comment in the first line of the file
mlarkin [Tue, 27 Jan 2015 01:42:26 +0000 (01:42 +0000)]
Remove an odd comment in the first line of the file

ok deraadt@

9 years agoRevert 1.61 since support for the TX path was also reverted.
brad [Tue, 27 Jan 2015 01:38:53 +0000 (01:38 +0000)]
Revert 1.61 since support for the TX path was also reverted.

9 years agoRewrite receive filter handling and ioctl bits.
brad [Tue, 27 Jan 2015 00:59:39 +0000 (00:59 +0000)]
Rewrite receive filter handling and ioctl bits.

9 years agoRequire EFT shared objects have a PT_PHDR entry to be considered
kurt [Tue, 27 Jan 2015 00:33:21 +0000 (00:33 +0000)]
Require EFT shared objects have a PT_PHDR entry to be considered
a pie binary. The kernel will now reject executing a typical shared
library with EINVAL. This breaks compatibility with initial static pie
binaries and requires a recent user-land prior to upgrading. In
addition, more fine grained errors can be returned from execve(2)
when errors occur while attempting to execute ELF objects.

okay guenther@, kettenis@, deraadt@

9 years agoMove the "stackgap" from the stack into its own page at a random address.
kettenis [Mon, 26 Jan 2015 22:51:37 +0000 (22:51 +0000)]
Move the "stackgap" from the stack into its own page at a random address.
This allows us the unmap the initial part of the stack, such that it can't
be used as a staging area for ROP (or other) attacks.

ok guenther@, tedu@

9 years agoPrint frame buffer resolution at attach time.
miod [Mon, 26 Jan 2015 20:25:38 +0000 (20:25 +0000)]
Print frame buffer resolution at attach time.

9 years agosync
deraadt [Mon, 26 Jan 2015 18:48:16 +0000 (18:48 +0000)]
sync

9 years agoRework tbl(7) layout parsing:
schwarze [Mon, 26 Jan 2015 18:41:45 +0000 (18:41 +0000)]
Rework tbl(7) layout parsing:
* Continue parsing even if part of the input is invalid.
* Do not require whitespace between cell specifications.
* Allow tabs as well as blanks between modifiers.
* Mark the 'm' modifier as unsupported.
* Parse and ignore the 'p' and 'v' modifiers.
* Better warning and error messages.
* Get rid of a static buffer.
Improved functionality but minus 50 lines of code.

9 years agosort previous;
jmc [Mon, 26 Jan 2015 13:55:29 +0000 (13:55 +0000)]
sort previous;

9 years agoPlace the remainder of e_os2.h under #ifndef LIBRESSL_INTERNAL until we can
jsing [Mon, 26 Jan 2015 13:46:23 +0000 (13:46 +0000)]
Place the remainder of e_os2.h under #ifndef LIBRESSL_INTERNAL until we can
hopefully remove it completely - nothing in LibreSSL should be making use
of any of these defines.

9 years agoproperly restore umask
djm [Mon, 26 Jan 2015 13:36:53 +0000 (13:36 +0000)]
properly restore umask

9 years agoAdd AEAD as a "MAC alias" so that it is possible to identify/select ciphers
jsing [Mon, 26 Jan 2015 13:06:39 +0000 (13:06 +0000)]
Add AEAD as a "MAC alias" so that it is possible to identify/select ciphers
that use AEAD instead of a MAC. This allows for TLSv1.2 AEAD ciphers
(effectively the only ciphers that are still considered to be secure) to be
selected using TLSv1.2+AEAD as a cipher string.

ok bcook@ doug@ miod@

9 years agoMore improvements regarding tbl(7) options.
schwarze [Mon, 26 Jan 2015 13:02:53 +0000 (13:02 +0000)]
More improvements regarding tbl(7) options.
* Treat "allbox" as an alias for "box" for now.
* Parse and ignore the GNU tbl "nowarn" option.
* For separation, allow spaces, tabs, and commas only.
* Mark eqn(7) within tbl(7) as unsupported.
* Simplify the option table.
* Improve and sort documentation.

9 years agocorrect description of UpdateHostKeys in ssh_config.5 and
djm [Mon, 26 Jan 2015 12:16:36 +0000 (12:16 +0000)]
correct description of UpdateHostKeys in ssh_config.5 and
add it to -o lists for ssh, scp and sftp;
pointed out by jmc@

9 years agoMerge in a commit from upstream..
brad [Mon, 26 Jan 2015 12:06:40 +0000 (12:06 +0000)]
Merge in a commit from upstream..

- Synthesize CNAMEs with same TTL as DNAME.

ok sthen@

9 years agoCall rtdeletemsg(9) instead of rerolling its code. As a bonus you'll
mpi [Mon, 26 Jan 2015 11:38:37 +0000 (11:38 +0000)]
Call rtdeletemsg(9) instead of rerolling its code.  As a bonus you'll
get userland notification for free.

ok blambert@, bluhm@

9 years agoDo not always try to rtfree(9) route entries inside rtdeletemsg(9).
mpi [Mon, 26 Jan 2015 11:36:38 +0000 (11:36 +0000)]
Do not always try to rtfree(9) route entries inside rtdeletemsg(9).

Instead check the error code returned by this function and let the
caller free the route entry when appropriate.

ok bluhm@

9 years agoSet PCIe max read request size to 2K to help with TX performance.
brad [Mon, 26 Jan 2015 09:58:47 +0000 (09:58 +0000)]
Set PCIe max read request size to 2K to help with TX performance.

From FreeBSD

Tested with 8168C, 8168D and 8168G.

9 years agoregression test for host key rotation
djm [Mon, 26 Jan 2015 06:12:18 +0000 (06:12 +0000)]
regression test for host key rotation

9 years agoadapt to sshkey API tweaks
djm [Mon, 26 Jan 2015 06:11:28 +0000 (06:11 +0000)]
adapt to sshkey API tweaks

9 years agocorrectly match ECDSA subtype (== curve) for offered/recevied
djm [Mon, 26 Jan 2015 06:10:03 +0000 (06:10 +0000)]
correctly match ECDSA subtype (== curve) for offered/recevied
host keys. Fixes connection-killing host key mismatches when
a server offers multiple ECDSA keys with different curve type
(an extremely unlikely configuration).

ok markus, "looks mechanical" deraadt@

9 years agoOops: symlinkat()'s 'atfd' argument is its second, not its first
guenther [Mon, 26 Jan 2015 04:38:23 +0000 (04:38 +0000)]
Oops: symlinkat()'s 'atfd' argument is its second, not its first

9 years agoUpdate the Samsung SSD controller comment.
brad [Mon, 26 Jan 2015 04:17:21 +0000 (04:17 +0000)]
Update the Samsung SSD controller comment.

9 years agoHost key rotation support.
djm [Mon, 26 Jan 2015 03:04:45 +0000 (03:04 +0000)]
Host key rotation support.

Add a hostkeys@openssh.com protocol extension (global request) for
a server to inform a client of all its available host key after
authentication has completed. The client may record the keys in
known_hosts, allowing it to upgrade to better host key algorithms
and a server to gracefully rotate its keys.

The client side of this is controlled by a UpdateHostkeys config
option (default on).

ok markus@

9 years agosmall refactor and add some convenience functions;
djm [Mon, 26 Jan 2015 02:59:11 +0000 (02:59 +0000)]
small refactor and add some convenience functions;
ok markus

9 years agoImport the exynos work into tree. This is from Bitrig. Discussed with and OK jsg...
bmercer [Mon, 26 Jan 2015 02:48:24 +0000 (02:48 +0000)]
Import the exynos work into tree. This is from Bitrig. Discussed with and OK jsg, also OK from krw.

9 years agoRename miniroot-sunxi to miniroot-cubie as the u-boot included
jsg [Mon, 26 Jan 2015 01:55:55 +0000 (01:55 +0000)]
Rename miniroot-sunxi to miniroot-cubie as the u-boot included
in the image is for Cubieboard1.  Discussed with bmercer@
While here switch from using the separate spl and u-boot images
to the combined spl and u-boot 'u-boot-sunxi-with-spl.bin'.

9 years agoImprove (or rather, rewrite) tbl(7) option parsing.
schwarze [Mon, 26 Jan 2015 00:54:09 +0000 (00:54 +0000)]
Improve (or rather, rewrite) tbl(7) option parsing.
* Allow the layout to start after the semicolon on the options line.
* Ignore leading commas.
* Option arguments cannot contain closing parentheses.
* Avoid needless UNSUPP messages.
* Better ERROR reporting.
* Delete unused "linesize" field in struct tbl_opts.
* No need for static buffers.
* Garbage collect one almost empty wrapper function.
Improved functionality, but minus 40 lines of code.

9 years agoRework cbus(4) interrupt support a bit. Instead of merging devhandle and
kettenis [Sun, 25 Jan 2015 21:42:13 +0000 (21:42 +0000)]
Rework cbus(4) interrupt support a bit.  Instead of merging devhandle and
devino into a pseudo-sysino, directly use the devino as the ihandle.  The
devhandle is stored in the cbus softc, and accessed through the bus space
tag.  This allows us to have more than 256 interrupts on a single cbus, and
avoids relying on the lower bits of the devhandle being zero.

9 years agomention that the kern.global_ptrace sysctl also affects PT_ATTACH
tedu [Sun, 25 Jan 2015 19:31:38 +0000 (19:31 +0000)]
mention that the kern.global_ptrace sysctl also affects PT_ATTACH

9 years agoDon't leak the individual strings when copying environment.
nicm [Sun, 25 Jan 2015 16:53:46 +0000 (16:53 +0000)]
Don't leak the individual strings when copying environment.

9 years agotweak and update the illustration to what the bootstrap loader actually
naddy [Sun, 25 Jan 2015 15:15:14 +0000 (15:15 +0000)]
tweak and update the illustration to what the bootstrap loader actually
looks like; ok deraadt@ miod@

9 years agoCorrect a bit test for DDR2 CAS Latency and recognise CL7 and CL6.
jsg [Sun, 25 Jan 2015 11:38:49 +0000 (11:38 +0000)]
Correct a bit test for DDR2 CAS Latency and recognise CL7 and CL6.
While the spec only mentions bits for CL5->CL2 with the other
bits being marked 'TBD' it seems likely they are used now.

From David Vasek.

9 years agorefactor loading of dmamaps.
dlg [Sun, 25 Jan 2015 11:36:41 +0000 (11:36 +0000)]
refactor loading of dmamaps.

bus_dmama_load and bus_dmamap_load mbuf figure out the physical
addresses of the memory theyre given and then hand it to
_bus_dmamap_load_paddr to store in the dmamaps sg lists.

unfortunately bus_dmamap_load_mbuf assumes it is only given memory
from the kernels direct mapped region, and blindly translates
anything its given into phys addresses to hand to _load_paddr.

i recently committed change to pool asking them to allocate large
pages, which meant uvm allocated mbufs outside the direct map, which
meant bus_dmamap_load_mbuf was handing out bogus physical addresses.
the pool change got backed out until i could debug this.

now _load and _load_mbuf now call _bus_dmamap_load_vaddr for every
buffer theyve been given, which properly determines if the addresses
are in the direct map or via the tlb. _load_vaddr then feeds the
physical addresses into _bus_dmamap_load_paddr to store them in the
dmamap.

tldr; _load_mbuf doesnt make naive assumptions about its addresses
now.

ok miod@ kettenis@

9 years agoImplement bus_dmamem_alloc_range(9) for macppc/socppc.
kettenis [Sat, 24 Jan 2015 20:59:42 +0000 (20:59 +0000)]
Implement bus_dmamem_alloc_range(9) for macppc/socppc.

9 years agocorrect the syntax description of the boot command; ok jmc@
naddy [Sat, 24 Jan 2015 20:47:19 +0000 (20:47 +0000)]
correct the syntax description of the boot command; ok jmc@

9 years agoFix getopt string; the -N flag doesn't take an argument.
millert [Sat, 24 Jan 2015 20:32:46 +0000 (20:32 +0000)]
Fix getopt string; the -N flag doesn't take an argument.
From Matthew Clarke

9 years agotweak previous;
jmc [Sat, 24 Jan 2015 19:20:26 +0000 (19:20 +0000)]
tweak previous;

9 years agoAdd bus_dmamem_alloc_range(9).
kettenis [Sat, 24 Jan 2015 16:20:37 +0000 (16:20 +0000)]
Add bus_dmamem_alloc_range(9).

9 years agoDocument bus_dmamem_alloc_range(9).
kettenis [Sat, 24 Jan 2015 16:06:46 +0000 (16:06 +0000)]
Document bus_dmamem_alloc_range(9).

9 years agoUse bus_dmamem_alloc_range(9) to make sure the ring descriprtors can be
kettenis [Sat, 24 Jan 2015 15:15:50 +0000 (15:15 +0000)]
Use bus_dmamem_alloc_range(9) to make sure the ring descriprtors can be
accessed by the device.

ok deraadt@, stsp@

9 years agoAdd bus_dmamem_alloc_range(9) to allow drivers to allocate DMA'able memory
kettenis [Sat, 24 Jan 2015 15:13:55 +0000 (15:13 +0000)]
Add bus_dmamem_alloc_range(9) to allow drivers to allocate DMA'able memory
within a range that is more (or less) restrictive than the default range.

ok deraadt@, stsp@

9 years agoMove -lz late in the linker commandline for things to build on static arches.
miod [Sat, 24 Jan 2015 10:39:21 +0000 (10:39 +0000)]
Move -lz late in the linker commandline for things to build on static arches.

9 years agoAdd back <sys/param.h>; it's needed for MACHINE_STACK_GROWS_UP.
kettenis [Sat, 24 Jan 2015 10:35:33 +0000 (10:35 +0000)]
Add back <sys/param.h>; it's needed for MACHINE_STACK_GROWS_UP.

ok millert@, tobiasu@

9 years agopreserve .PP before .RE; effect found in audio/pms(1)
schwarze [Sat, 24 Jan 2015 10:07:58 +0000 (10:07 +0000)]
preserve .PP before .RE; effect found in audio/pms(1)

9 years agoConvert openssl(1) sess_id to the new option handling.
doug [Sat, 24 Jan 2015 09:44:29 +0000 (09:44 +0000)]
Convert openssl(1) sess_id to the new option handling.

input + ok jsing@

9 years agoConvert openssl(1)'s rsa.c to the new option handling code.
doug [Sat, 24 Jan 2015 05:48:39 +0000 (05:48 +0000)]
Convert openssl(1)'s rsa.c to the new option handling code.

input + ok jsing@

9 years agoStrangely, ignoring the roff(7) .na request was implemented in the man(7)
schwarze [Sat, 24 Jan 2015 02:41:32 +0000 (02:41 +0000)]
Strangely, ignoring the roff(7) .na request was implemented in the man(7)
parser.  Simplify the code by moving it into the roff(7) parser, also
making it work for mdoc(7).

9 years agoRemove a comment that is no longer true with MCLGETI and jumbos on
brad [Sat, 24 Jan 2015 02:36:03 +0000 (02:36 +0000)]
Remove a comment that is no longer true with MCLGETI and jumbos on
some revisions of the chipsets.

9 years agochange .Cm to .Ar for macro arguments
schwarze [Sat, 24 Jan 2015 02:14:33 +0000 (02:14 +0000)]
change .Cm to .Ar for macro arguments

9 years agoSupport .RE with an argument; needed for audio/pms(1).
schwarze [Sat, 24 Jan 2015 01:59:40 +0000 (01:59 +0000)]
Support .RE with an argument; needed for audio/pms(1).

9 years agoUserland (base & ports) was adapted to always include <netinet/in.h>
deraadt [Sat, 24 Jan 2015 00:29:06 +0000 (00:29 +0000)]
Userland (base & ports) was adapted to always include <netinet/in.h>
before <net/pfvar.h> or <net/if_pflog.h>.  The kernel files can be
cleaned up next.  Some sockaddr_union steps make it into here as well.
ok naddy

9 years agoIn shell statements use shell pattern '+([0-9])', not sed regular
krw [Sat, 24 Jan 2015 00:20:35 +0000 (00:20 +0000)]
In shell statements use shell pattern '+([0-9])', not sed regular
expression '[0-9]*'.

Should fix problem reported by jsg@ where 'hostname.vlan6.bak' was
deemed to be an active vlan specification during upgrade.

No change to script output.

Tested by rpe@.

ok halex@ rpe@

9 years agoMore missing $OpenBSD$.
krw [Fri, 23 Jan 2015 22:48:51 +0000 (22:48 +0000)]
More missing $OpenBSD$.

ok nicm@

9 years agoa wee little bit more cleanup (more const and remove noise from CDIAGFLAGS...
espie [Fri, 23 Jan 2015 22:35:57 +0000 (22:35 +0000)]
a wee little bit more cleanup (more const and remove noise from CDIAGFLAGS...
-pedantic kind of requires -std=c99 here to avoid LL warnings)
okay miod@, millert@

9 years ago-Wpointer-sign is supported by gcc 4 only.
miod [Fri, 23 Jan 2015 21:21:23 +0000 (21:21 +0000)]
-Wpointer-sign is supported by gcc 4 only.

9 years agoWhile ignoring the .ta (set tab stops) and .ti (temp indent) requests
schwarze [Fri, 23 Jan 2015 20:17:25 +0000 (20:17 +0000)]
While ignoring the .ta (set tab stops) and .ti (temp indent) requests
is sometimes harmless, it often causes seriously ugly output,
so flag these requests as unsupported rather than ignoring them.
Discussed with naddy@.

9 years agobraces to open a function go on their own line like god intended
tedu [Fri, 23 Jan 2015 19:07:27 +0000 (19:07 +0000)]
braces to open a function go on their own line like god intended

9 years agodelete some code that doesn't (and shouldn't) run. ok deraadt millert
tedu [Fri, 23 Jan 2015 18:52:31 +0000 (18:52 +0000)]
delete some code that doesn't (and shouldn't) run. ok deraadt millert

9 years agoMake km_alloc(9) use the direct map for all "phys contig" mappings requested
kettenis [Fri, 23 Jan 2015 17:09:23 +0000 (17:09 +0000)]
Make km_alloc(9) use the direct map for all "phys contig" mappings requested
by the caller on architectures that implement them.  Make sure that we
physically align memory such that we meet any demands on virtual alignment
in this case.  This should reduce the overhead of mapping large pool pages
for pools that request dma'able memory.

ok deraadt@, dlg@

9 years agoRemove now-unused DebugFlags.
millert [Fri, 23 Jan 2015 15:56:04 +0000 (15:56 +0000)]
Remove now-unused DebugFlags.

9 years agoEnsure that a ServerKeyExchange message is received if the selected cipher
jsing [Fri, 23 Jan 2015 14:40:59 +0000 (14:40 +0000)]
Ensure that a ServerKeyExchange message is received if the selected cipher
suite uses ephemeral keys. This avoids an issue where an ECHDE cipher suite can
effectively be downgraded to ECDH, if the server omits the ServerKeyExchange
message and has provided a certificate with an ECC public key.

Issue reported to OpenSSL by Karthikeyan Bhargavan.

Based on OpenSSL.

Fixes CVE-2014-3572.

ok beck@

9 years agoKilling my darling. Functionality and binary name moved to pkg_* and
halex [Fri, 23 Jan 2015 14:38:24 +0000 (14:38 +0000)]
Killing my darling.  Functionality and binary name moved to pkg_* and
friends.  So long and thanks for all the fish.

ok deraadt@

9 years agoLet .Aq/.Ao/.Ac print "<>" instead of the normal "\(la\(ra"
schwarze [Fri, 23 Jan 2015 14:19:52 +0000 (14:19 +0000)]
Let .Aq/.Ao/.Ac print "<>" instead of the normal "\(la\(ra"
when the only child is .Mt, not when the preceding node is .An,
to improve robustness.  Triggered by a question from Svyatoslav
Mishyn <juef at openmailbox dot org> (Crux Linux).

9 years agotypo
espie [Fri, 23 Jan 2015 13:38:16 +0000 (13:38 +0000)]
typo

9 years agoremove a bunch of dangerous casts (useless casts from void * to something
espie [Fri, 23 Jan 2015 13:18:40 +0000 (13:18 +0000)]
remove a bunch of dangerous casts (useless casts from void * to something
else, in some cases by adding extra temporary variables.
IMO, it's much better practice to do

void *a;
int *p = a;
*p = 42;

rather than
void *a;
*(int *)a = 42;

okay miod@... to be revisited for some possible const additions later.

9 years agoNormal OpenBSD code fits in an 80 column term. From Jim Smith, ok dlg.
sthen [Fri, 23 Jan 2015 13:02:49 +0000 (13:02 +0000)]
Normal OpenBSD code fits in an 80 column term. From Jim Smith, ok dlg.

9 years agobreak after return is useless.
dlg [Fri, 23 Jan 2015 12:49:13 +0000 (12:49 +0000)]
break after return is useless.

9 years agomove from deferring vd requests with a task per message to a ring
dlg [Fri, 23 Jan 2015 12:41:23 +0000 (12:41 +0000)]
move from deferring vd requests with a task per message to a ring
of pointers to vd requests, and a single task to notify the taskq
that there's work on the ring.

the ring is modelled on what you usually get with network cards,
which is an array with a producer and consumer index. the interrupt
handler fills an entry in the ring at the producers index and
increments it. the task reads entries at the consumer index and
increments it until it reaches the same value as the producer.

tested and slightly tweaked by kettenis@
ok kettenis@

9 years agoget the args right for the fallback atomic_{cas,swap}_ptr
dlg [Fri, 23 Jan 2015 09:50:45 +0000 (09:50 +0000)]
get the args right for the fallback atomic_{cas,swap}_ptr
implementations, and then cast the pointer to the right type for
the gcc builtins.

9 years agozap trailing whitespace;
jmc [Fri, 23 Jan 2015 07:41:16 +0000 (07:41 +0000)]
zap trailing whitespace;

9 years agoRemove the OK and ERR macros. They obfuscate the code and don't
tedu [Fri, 23 Jan 2015 02:37:25 +0000 (02:37 +0000)]
Remove the OK and ERR macros. They obfuscate the code and don't
help legibility. (unix system calls use 0 for ok, but hundreds of
other projects use 1 to indicate success.) Despite the name, many
system calls (e.g., open) also return not OK values for success.
It also cleans up some weird code like int crontab_fd = OK - 1;
This diff is mechanical in nature. Later I will fix the bugs it reveals.
ok deraadt

9 years agodon't need to define debugging 0 anymore
tedu [Fri, 23 Jan 2015 01:58:20 +0000 (01:58 +0000)]
don't need to define debugging 0 anymore

9 years agominor debug removal cleanup
tedu [Fri, 23 Jan 2015 01:03:03 +0000 (01:03 +0000)]
minor debug removal cleanup

9 years agoremove debug code.
tedu [Fri, 23 Jan 2015 01:01:06 +0000 (01:01 +0000)]
remove debug code.
I think the level of debug code in cron is excessive for a program
that has reached feature complete. If cron needs to provide more
information to the user about its operational status, I think syslog
would be more appropriate. (The debug flags also disable forking
into the background, so they aren't even that useful for debugging a
live system.)
ok deraadt millert

9 years agoWonders of roff(7): Integer numbers in numerical expressions can carry
schwarze [Fri, 23 Jan 2015 00:38:42 +0000 (00:38 +0000)]
Wonders of roff(7): Integer numbers in numerical expressions can carry
scaling units, and some manuals (e.g. in devel/grcs) actually use that,
so let's support it.  Missing feature reported by naddy@.

9 years agoSlightly improve \w width measurements:
schwarze [Thu, 22 Jan 2015 22:50:31 +0000 (22:50 +0000)]
Slightly improve \w width measurements:
Count special characters with the same width as ASCII characters
and treat all other escape sequences as if they had a width of 0.
Certainly not perfect, but a bit better.
For example, GNU RCS ci(1) needs this; reported by naddy@.

9 years agodelete useless casts. ok deraadt guenther millert
tedu [Thu, 22 Jan 2015 22:38:55 +0000 (22:38 +0000)]
delete useless casts. ok deraadt guenther millert

9 years agoremove a stupid -Wstrict-prototype warning by making the hash function
tedu [Thu, 22 Jan 2015 22:09:39 +0000 (22:09 +0000)]
remove a stupid -Wstrict-prototype warning by making the hash function
static. noticed by florian riehm

9 years agoTraditional roff(7) explicitly allows certain control characters
schwarze [Thu, 22 Jan 2015 21:36:44 +0000 (21:36 +0000)]
Traditional roff(7) explicitly allows certain control characters
in the input stream (SOH, STX, ETX, ENQ, ACK, BEL, BS) for specific
purposes (leaders, backspace, delimiters, .tr), but making sure
these don't leak through to the output is tricky, so mark them as
unsupported for now.

9 years agoFix logic botch causing warnings with Clang. Reported by dhill, matches
miod [Thu, 22 Jan 2015 21:18:56 +0000 (21:18 +0000)]
Fix logic botch causing warnings with Clang. Reported by dhill, matches
similar changes in FreeBSD a few years ago.

9 years agoPossibly uninitialized variable. From Clang via dhill.
miod [Thu, 22 Jan 2015 21:17:43 +0000 (21:17 +0000)]
Possibly uninitialized variable. From Clang via dhill.

9 years agoheirarchy -> hierarchy;
jmc [Thu, 22 Jan 2015 21:00:42 +0000 (21:00 +0000)]
heirarchy -> hierarchy;

9 years agoDocument that changes made to the directory hierarchy of the chroot
millert [Thu, 22 Jan 2015 20:44:05 +0000 (20:44 +0000)]
Document that changes made to the directory hierarchy of the chroot
jail may inadvertanly allow a process to escape.  Also mention the
problem of directory fd passing.  Based on a diff from deraadt@

9 years agoProvide a warning about chroot misuses (which sadly, seem to have become
deraadt [Thu, 22 Jan 2015 20:24:41 +0000 (20:24 +0000)]
Provide a warning about chroot misuses (which sadly, seem to have become
quite popular because shiny).  sshd cannot detect/manage/do anything
about these cases, best we can do is warn in the right spot in the man page.
ok markus

9 years agopool_setipl() on both pmap pools as a workaround for some sort of MP
deraadt [Thu, 22 Jan 2015 19:47:00 +0000 (19:47 +0000)]
pool_setipl() on both pmap pools as a workaround for some sort of MP
race.  This will certainly be revisited, but too much time has been
spent on it for now.
ok mpi

9 years agoDon't let a failing mparse_open() clobber the filename pointer;
schwarze [Thu, 22 Jan 2015 19:26:16 +0000 (19:26 +0000)]
Don't let a failing mparse_open() clobber the filename pointer;
fixes error message content and a use after free
for .so with non-existent target when -Wall or -Tlint is given.

9 years agoProcessing $OpenBSD$ as well as sccs's @(#) is an OpenBSD extension, and
krw [Thu, 22 Jan 2015 19:10:17 +0000 (19:10 +0000)]
Processing $OpenBSD$ as well as sccs's @(#) is an OpenBSD extension, and
should stop displaying the line at the 2nd '$'. Clarify intended behaviour
in man page.

ok millert@ beck@ deraadt@

9 years agoUse /etc/services names in all the default pf rules (most already
krw [Thu, 22 Jan 2015 19:00:24 +0000 (19:00 +0000)]
Use /etc/services names in all the default pf rules (most already
did). This allows any local changes to /etc/services to be effective
if all you have is the default.

Issue pointed out by Brian S. Vangsgaard on bugs@. Thanks!

ok phessler@ deraadt@

9 years agoClean up includes, while here fix a white space which lead to a false
florian [Thu, 22 Jan 2015 18:22:27 +0000 (18:22 +0000)]
Clean up includes, while here fix a white space which lead to a false
positive during grep'ing.
OK reyk

9 years agoLet powerpc's bus_space(9) use the same pmap and uvm interfaces than the
mpi [Thu, 22 Jan 2015 17:55:45 +0000 (17:55 +0000)]
Let powerpc's bus_space(9) use the same pmap and uvm interfaces than the
other archs.

Specify the caching policy by passing PMAP_* flags to pmap_kenter_pa()
like the majority of our archs do and kill pmap_kenter_cache().

Spread some pmap_update() along the way.

While here remove the unused flag argument from pmap_fill_pte().

Finally convert the bus map/unmap functions to km_alloc/free() instead
of uvm_km_valloc/free().

Inputs from kettenis@ and miod@, ok miod@

9 years agoClean up the relayd headers with help of include-what-you-use and some
reyk [Thu, 22 Jan 2015 17:42:09 +0000 (17:42 +0000)]
Clean up the relayd headers with help of include-what-you-use and some
manual review.  Based on common practice, relayd.h now includes the
necessary headers for itself.

OK benno@

9 years agoOnly allow the -r flag when sending a message; from Martin Brandenburg
millert [Thu, 22 Jan 2015 16:25:07 +0000 (16:25 +0000)]
Only allow the -r flag when sending a message; from Martin Brandenburg

9 years agospacing
reyk [Thu, 22 Jan 2015 15:23:50 +0000 (15:23 +0000)]
spacing

9 years agospacing
reyk [Thu, 22 Jan 2015 15:21:28 +0000 (15:21 +0000)]
spacing

9 years agowrap long lines; spacing.
reyk [Thu, 22 Jan 2015 15:21:05 +0000 (15:21 +0000)]
wrap long lines; spacing.

Repeat after me: "Lines are not longer than 80 characters long" and
"mg(1) is the only true editor, I'll use ESC-q to wrap the lines".

9 years agoReplace some obvious '$OpenBSD' and '$OpenBSD:' typos with '$OpenBSD$'.
krw [Thu, 22 Jan 2015 14:33:01 +0000 (14:33 +0000)]
Replace some obvious '$OpenBSD' and '$OpenBSD:' typos with '$OpenBSD$'.

Pointed out by dickman@.

ok sthen@ phessler@