openbsd
6 years agofix return value
tb [Tue, 21 Aug 2018 16:34:40 +0000 (16:34 +0000)]
fix return value

6 years agoUnbreak 'R'esize.
krw [Tue, 21 Aug 2018 16:34:27 +0000 (16:34 +0000)]
Unbreak 'R'esize.

Problem noted and fix tested by jcs@.

ok otto@

6 years agoRemove ChaCha20-Poly1305 from the TODO list
tb [Tue, 21 Aug 2018 16:31:16 +0000 (16:31 +0000)]
Remove ChaCha20-Poly1305 from the TODO list

6 years agoA failure to _seal() should be looked into, so turn this into an
tb [Tue, 21 Aug 2018 16:25:11 +0000 (16:25 +0000)]
A failure to _seal() should be looked into, so turn this into an
unconditional failure.

6 years agoFactor the calls to EVP_AEAD_CTX_open() and EVP_AEAD_CTX_seal() into
tb [Tue, 21 Aug 2018 16:23:21 +0000 (16:23 +0000)]
Factor the calls to EVP_AEAD_CTX_open() and EVP_AEAD_CTX_seal() into
their own functions to make it easier to handle failures cleanly.

Discussed with jsing

6 years agoImprove the ASCII rendering of \(Po (Pound Sterling)
schwarze [Tue, 21 Aug 2018 16:01:38 +0000 (16:01 +0000)]
Improve the ASCII rendering of \(Po (Pound Sterling)
and of the playing card suits to match groff, using feedback
from Ralph Corderoy <ralph at inputplus dot co dot uk>.

6 years agoMerge duplicate benchmark() GET/SSL_shutdown blocks into doConnection().
cheloha [Tue, 21 Aug 2018 15:56:39 +0000 (15:56 +0000)]
Merge duplicate benchmark() GET/SSL_shutdown blocks into doConnection().

We need to then remove the shadow i from the GET block.  While there,
move retval's declaration to the beginning of the function.

As doConnection() now executes the body of the benchmark's test, rename
it to "run_test".

Shadow variable spotted by tb@.

ok tb@

6 years agoAIX reports the CODESET as "ISO8859-1" in the POSIX locale.
schwarze [Tue, 21 Aug 2018 13:56:27 +0000 (13:56 +0000)]
AIX reports the CODESET as "ISO8859-1" in the POSIX locale.
Treating that as a safe encoding is OK because even when other
systems return that string for real ISO8859-1, it is still
safe in the sense that it is ASCII-compatible and stateless.

Issue reported by Val dot Baranov at duke dot edu.  Additional
information provided by Michael dot Felt at felt dot demon dot nl.
Tested by Michael Felt on AIX 6.1 and by Val Baranov on AIX 7.1.
Tweak and OK djm@.

6 years agoUse explicit fd indexing to access fd_ofiles, to clarify the code.
visa [Tue, 21 Aug 2018 13:50:31 +0000 (13:50 +0000)]
Use explicit fd indexing to access fd_ofiles, to clarify the code.

OK mpi@

6 years agoIf a kernel thread was created by a user land system call, the user
bluhm [Tue, 21 Aug 2018 13:10:13 +0000 (13:10 +0000)]
If a kernel thread was created by a user land system call, the user
land FPU context was saved to proc0.  This was an information leak
as proc0 is used to initialize the FPU at exec and signal handlers.
Never save the FPU to proc0, it has the initialization value.  Also
check whether the FPU has valid user land state that has to be
forked.
This bug is a regression from the eager FPU commit.  OK guenther@

6 years agoprint rdtscp and xsave_ext cpuid bits on i386 as well
jsg [Tue, 21 Aug 2018 12:44:13 +0000 (12:44 +0000)]
print rdtscp and xsave_ext cpuid bits on i386 as well
move printing of ecxfeatures bits to match amd64

6 years agoIf the control message of IP_SENDSRCADDR did not fit into the socket
bluhm [Tue, 21 Aug 2018 12:34:11 +0000 (12:34 +0000)]
If the control message of IP_SENDSRCADDR did not fit into the socket
buffer together with an UDP packet, sosend(9) returned EWOULDBLOCK.
As it is an persistent problem, EMSGSIZE is the correct error code.
Split the AF_UNIX case into a separate condition and do not change
its logic.  For atomic protocols, check that both data and control
message length fit into the socket buffer.
original bug report from Alexander Markert
discussed with jca@; OK vgross@

6 years agoprint sefflags_edx cpuid bits on i386 as well
jsg [Tue, 21 Aug 2018 06:03:34 +0000 (06:03 +0000)]
print sefflags_edx cpuid bits on i386 as well

6 years agoFix some issues found looking at groff_char(7):
schwarze [Tue, 21 Aug 2018 01:56:26 +0000 (01:56 +0000)]
Fix some issues found looking at groff_char(7):
* Add two missing characters, \('Y and \('y.
* The Weierstrass p is not capital, see http://unicode.org/notes/tn27/.
* Add a groff-compatible ASCII transliteration for U+02DC: "~".

6 years agotypo in argument type, from Mario dot Andres dot Campos at gmail dot com
schwarze [Tue, 21 Aug 2018 00:35:55 +0000 (00:35 +0000)]
typo in argument type, from Mario dot Andres dot Campos at gmail dot com

6 years agoadd two missing \n
tb [Mon, 20 Aug 2018 21:18:03 +0000 (21:18 +0000)]
add two missing \n

6 years agoTest EVP_AEAD_CTX_open() at the same time as EVP_AEAD_CTX_seal()
tb [Mon, 20 Aug 2018 20:46:51 +0000 (20:46 +0000)]
Test EVP_AEAD_CTX_open() at the same time as EVP_AEAD_CTX_seal()

Suggested by jsing

6 years agoMove offset of window list into status struct.
nicm [Mon, 20 Aug 2018 20:41:58 +0000 (20:41 +0000)]
Move offset of window list into status struct.

6 years agoImplement bus_space_mmap(9).
kettenis [Mon, 20 Aug 2018 19:38:07 +0000 (19:38 +0000)]
Implement bus_space_mmap(9).

ok patrick@

6 years agoMemory barriers for arm64. These are somewhat stronger than strictly
kettenis [Mon, 20 Aug 2018 19:36:04 +0000 (19:36 +0000)]
Memory barriers for arm64.  These are somewhat stronger than strictly
necessary since we define the linux compat symbols in terms of a single set
of macros.

ok jsg@, mpi@, visa@

6 years agoAdd arm64 support. On ARM write-combining translates into the normal uncached
kettenis [Mon, 20 Aug 2018 19:33:31 +0000 (19:33 +0000)]
Add arm64 support.  On ARM write-combining translates into the normal uncached
memory attribute and uncached translates into device-nGnRnE memory.  This
complicates the mapping onto PMAP_WC, PMAP_NOCACHE and PMAP_DEVICE a bit
since the requirements of the drm(4) subsystem don't quite match the natural
definitions for these.

ok jsg@, mpi@, visa@

6 years agoAttach bwfm(4) to Broadcom BCM4371.
patrick [Mon, 20 Aug 2018 18:58:06 +0000 (18:58 +0000)]
Attach bwfm(4) to Broadcom BCM4371.

ok kettenis@

6 years agoregen
patrick [Mon, 20 Aug 2018 18:57:34 +0000 (18:57 +0000)]
regen

6 years agoAdd Broadcom BCM4371.
patrick [Mon, 20 Aug 2018 18:56:39 +0000 (18:56 +0000)]
Add Broadcom BCM4371.

ok kettenis@

6 years agoremove two redundant tests
tb [Mon, 20 Aug 2018 18:47:20 +0000 (18:47 +0000)]
remove two redundant tests

6 years agoUse sealed instead of out in a couple of places in preparation of
tb [Mon, 20 Aug 2018 18:26:35 +0000 (18:26 +0000)]
Use sealed instead of out in a couple of places in preparation of
testing EVP_AEAD_CTX_open()

6 years agoShuffle the decoding of the hex strings to the top and group all length
tb [Mon, 20 Aug 2018 18:17:52 +0000 (18:17 +0000)]
Shuffle the decoding of the hex strings to the top and group all length
tests together. Make failure of the length tests non-fatal, as these are
failures of test cases, not of the program.

6 years ago\f[] means \fP, not \fR
schwarze [Mon, 20 Aug 2018 18:06:42 +0000 (18:06 +0000)]
\f[] means \fP, not \fR

6 years agoExpand \n(.$ (the number of macro arguments) right in roff_userdef(),
schwarze [Mon, 20 Aug 2018 17:31:44 +0000 (17:31 +0000)]
Expand \n(.$ (the number of macro arguments) right in roff_userdef(),
before even reparsing the expanded macro.
That is the least dirty way to fix the bug that \(.$ remained set
after execution of the user-defined macro ended.  Any other way
to fix it would probably require changes to read.c, which really
shouldn't be bothered with such roff(7) internals.

6 years agoRun the Wycheproof ChaCha20-Poly1305 test vectors against libcrypto.
tb [Mon, 20 Aug 2018 17:06:18 +0000 (17:06 +0000)]
Run the Wycheproof ChaCha20-Poly1305 test vectors against libcrypto.
We currently only support nonces of length 12, so skip a few tests.

With input from jsing

6 years agoEnable I2C clocks in imxiic(4).
patrick [Mon, 20 Aug 2018 16:48:47 +0000 (16:48 +0000)]
Enable I2C clocks in imxiic(4).

6 years agoAdd the i.MX8MQ eCSPI clocks.
patrick [Mon, 20 Aug 2018 16:48:03 +0000 (16:48 +0000)]
Add the i.MX8MQ eCSPI clocks.

6 years agosync
kettenis [Mon, 20 Aug 2018 16:09:37 +0000 (16:09 +0000)]
sync

6 years agosync
kettenis [Mon, 20 Aug 2018 16:08:33 +0000 (16:08 +0000)]
sync

6 years agoAdd /dev/drm[0-3].
kettenis [Mon, 20 Aug 2018 16:07:39 +0000 (16:07 +0000)]
Add /dev/drm[0-3].

ok deraadt@, jsg@, mpi@

6 years agoReorder checks in the read/write(2) family of syscalls to prepare making
mpi [Mon, 20 Aug 2018 16:00:22 +0000 (16:00 +0000)]
Reorder checks in the read/write(2) family of syscalls to prepare making
file operations mp-safe.

This change makes it clear that `f_offset' is only accessed in vn_read()
and vn_write(), which will help taking it out of the KERNEL_LOCK().

This refactoring uncovered a race in vn_read() which is now documented
and will be addressed in a later diff.

ok visa@

6 years agoRemove unused spllock().
visa [Mon, 20 Aug 2018 15:02:07 +0000 (15:02 +0000)]
Remove unused spllock().

OK deraadt@ mpi@

6 years agoAdd -Z to find-window as well.
nicm [Mon, 20 Aug 2018 15:00:42 +0000 (15:00 +0000)]
Add -Z to find-window as well.

6 years agoMake fnew() return a new file with only one reference. This makes
visa [Mon, 20 Aug 2018 14:59:02 +0000 (14:59 +0000)]
Make fnew() return a new file with only one reference. This makes
the API more logical.

OK kettenis@ mpi@

6 years agoFix problems with page scrolling in copy mode, GitHub issue 1440 from
nicm [Mon, 20 Aug 2018 13:51:09 +0000 (13:51 +0000)]
Fix problems with page scrolling in copy mode, GitHub issue 1440 from
Amos Bird.

6 years agoPreparations for arm64 radeondrm(4) support.
kettenis [Mon, 20 Aug 2018 10:00:04 +0000 (10:00 +0000)]
Preparations for arm64 radeondrm(4) support.

ok jsg@ (who pointed out the kern_pledge.c change was necessary as well)

6 years agodrm_fourcc: Fix DRM_FORMAT_MOD_LINEAR #define
jsg [Mon, 20 Aug 2018 07:23:24 +0000 (07:23 +0000)]
drm_fourcc: Fix DRM_FORMAT_MOD_LINEAR #define

From Kristian H. Kristensen
771dacea92cd1b6107615aede467bdf62ef8907c in linux 4.4.y/4.4.91
af913418261d6d3e7a29f06cf35f04610ead667c in mainline linux

6 years agoCached tests moved from callers into ttm_io_prot() with linux 3.18
jsg [Mon, 20 Aug 2018 06:56:58 +0000 (06:56 +0000)]
Cached tests moved from callers into ttm_io_prot() with linux 3.18
which was partly missed when the 4.4 ttm changes went in.
Prompted by a patch from kettenis@

6 years agoSince we can feed localtime(3) with garbage input, or with input it cannot
mestre [Mon, 20 Aug 2018 06:24:50 +0000 (06:24 +0000)]
Since we can feed localtime(3) with garbage input, or with input it cannot
interpret, we always need to check its return value, and in the case it's NULL
then error and exit before proceeding further otherwise in this specific
program we would find a null dereference down the road which would make the
program segfault.

OK cheloha@

6 years agodrm: Add DP PSR2 sink enable bit
jsg [Mon, 20 Aug 2018 02:23:31 +0000 (02:23 +0000)]
drm: Add DP PSR2 sink enable bit

From Jose Roberto de Souza
5a3d1d67b3548e9dc1572c87527fa35b309feb0b in linux 4.4.y/4.4.146
4f212e40468650e220c1770876c7f25b8e0c1ff5 in mainline linux

6 years agodrm/atomic: Handling the case when setting old crtc for plane
jsg [Mon, 20 Aug 2018 02:04:31 +0000 (02:04 +0000)]
drm/atomic: Handling the case when setting old crtc for plane

From Satendra Singh Thakur
f1a64c117f1363f17cfc7e5bd410ec6222031501 in linux 4.4.y/4.4.146
fc2a69f3903dfd97cd47f593e642b47918c949df in mainline linux

6 years agodrm/radeon: fix mode_valid's return type
jsg [Mon, 20 Aug 2018 01:54:34 +0000 (01:54 +0000)]
drm/radeon: fix mode_valid's return type

From Luc Van Oostenryck
1f5e33948005cd1b720fd58717bb971109432875 in linux 4.4.y/4.4.146
7a47f20eb1fb8fa8d7a8fe3a4fd8c721f04c2174 in mainline linux

6 years agoDisable one test for now that is broken after the addition of \).
schwarze [Sun, 19 Aug 2018 23:55:40 +0000 (23:55 +0000)]
Disable one test for now that is broken after the addition of \).
It is not broken because of \), which is correctly implemented, but
the addition merely reveals a hidden bug elsewhere, almost certainly
in \\ handling.  Given that \\ is among the most mysterious escape
sequences and using it is very strongly discouraged in manual pages,
fixing that is not urgent - and it may be hard.

6 years agoAdd the \) special character, a variant of \& so arcane that i
schwarze [Sun, 19 Aug 2018 23:47:43 +0000 (23:47 +0000)]
Add the \) special character, a variant of \& so arcane that i
intentionally leave it undocumented.  Abused for example in the
groff(7) manual page.

6 years agoDo alignment of non-numeric strings in numeric cells the same way
schwarze [Sun, 19 Aug 2018 23:10:16 +0000 (23:10 +0000)]
Do alignment of non-numeric strings in numeric cells the same way
as groff, and also honour the explicit alignment indicator "\&".
This required an almost complete rewrite of both the measurement
function and the formatter function for numeric cells.

6 years agosync
deraadt [Sun, 19 Aug 2018 21:17:38 +0000 (21:17 +0000)]
sync

6 years agoThere was some misunderstanding about which mirror to use.
tb [Sun, 19 Aug 2018 20:35:51 +0000 (20:35 +0000)]
There was some misunderstanding about which mirror to use.
Back this out for now.

6 years agoDon't leak sktmp in X509_verify_cert().
tb [Sun, 19 Aug 2018 20:19:31 +0000 (20:19 +0000)]
Don't leak sktmp in X509_verify_cert().
CID #118791

ok jsing mestre

6 years agowhitespace fix
tb [Sun, 19 Aug 2018 20:17:20 +0000 (20:17 +0000)]
whitespace fix

6 years agoDon't leak db on error in RSA_padding_check_PKCS1_OAEP().
tb [Sun, 19 Aug 2018 20:15:30 +0000 (20:15 +0000)]
Don't leak db on error in RSA_padding_check_PKCS1_OAEP().
CID #183499.

input & ok jsing, ok mestre on first version

6 years agoAdd a flag to force redrawing of the status line even if the content
nicm [Sun, 19 Aug 2018 20:13:07 +0000 (20:13 +0000)]
Add a flag to force redrawing of the status line even if the content
hasn't changed, needed for resizing.

6 years agoDon't leak a strdup()'ed string on error in do_accept().
tb [Sun, 19 Aug 2018 20:07:06 +0000 (20:07 +0000)]
Don't leak a strdup()'ed string on error in do_accept().
CID #154702.

input & ok inoguchi, ok mestre on first version

6 years agoIf /etc/installurl doesn't exist, install a default one pointing to
tb [Sun, 19 Aug 2018 20:01:38 +0000 (20:01 +0000)]
If /etc/installurl doesn't exist, install a default one pointing to
cdn.openbsd.org.  This way, people doing installs without network
access also get working pkg_add and syspatch experience out of the box.

Idea from tj, supported by deraadt and job
ok halex

6 years agodo not print horizontal lines inside vertical spans
schwarze [Sun, 19 Aug 2018 19:32:17 +0000 (19:32 +0000)]
do not print horizontal lines inside vertical spans

6 years agoExpand \u and \U escape sequences in command strings, from Christopher
nicm [Sun, 19 Aug 2018 19:03:46 +0000 (19:03 +0000)]
Expand \u and \U escape sequences in command strings, from Christopher
Hunt in GitHub issue 1443.

6 years agodelete blank line not found in other arch
deraadt [Sun, 19 Aug 2018 18:09:49 +0000 (18:09 +0000)]
delete blank line not found in other arch

6 years agodouble the allowed length for the 'tls ciphers' option
jasper [Sun, 19 Aug 2018 18:03:35 +0000 (18:03 +0000)]
double the allowed length for the 'tls ciphers' option

for example now it can hold the recommended cipher list from the mozilla
ssl config generator rather than failing with a "ciphers too long" error.

ok benno@ sthen@ tb@

6 years agopseudo-device must be file-flagged otherwise ramdisks cannot link.
deraadt [Sun, 19 Aug 2018 18:01:04 +0000 (18:01 +0000)]
pseudo-device must be file-flagged otherwise ramdisks cannot link.

6 years agoMostly complete implementation of the 'c' (character available)
schwarze [Sun, 19 Aug 2018 17:43:39 +0000 (17:43 +0000)]
Mostly complete implementation of the 'c' (character available)
roff conditional, except that the .char request still isn't supported
and that behaviour differs from groff in many edge cases.
But at least valid character names and numbers are now distinguished
from invalid ones.
This also fixes the bug that parsing of the 'c' conditional was
incomplete, which resulted in leaking the tested character to the
input parser at the beginning of the body when the condition was
inverted.

6 years agotweak previous;
jmc [Sun, 19 Aug 2018 17:17:44 +0000 (17:17 +0000)]
tweak previous;

6 years agoAdd a client redraw-window flag instead of the redraw-all flag and for
nicm [Sun, 19 Aug 2018 16:45:03 +0000 (16:45 +0000)]
Add a client redraw-window flag instead of the redraw-all flag and for
all just use the three flags together (window, borders, status).

6 years agoRename and collapse tls12_get_sigandhash_cbb().
jsing [Sun, 19 Aug 2018 15:38:03 +0000 (15:38 +0000)]
Rename and collapse tls12_get_sigandhash_cbb().

Now that all callers of tls12_get_sigandhash() have been converted to CBB,
collapse tls12_get_sigandhash() and tls12_get_sigandhash_cbb() into a
single function. Rename it to tls12_gethashandsig() to be representative
of the actual order of the sigalgs parameters, and perform some other
clean up.

ok inoguchi@ tb@

6 years agoConvert ssl3_send_newsession_ticket() to CBB.
jsing [Sun, 19 Aug 2018 15:29:26 +0000 (15:29 +0000)]
Convert ssl3_send_newsession_ticket() to CBB.

This removes a memorable BUF_MEM_grow() and associated comment.

ok inoguchi@ tb@

6 years agoImplement "mach dtb <filename.dtb>" in efiboot(8). This way we can
patrick [Sun, 19 Aug 2018 14:09:41 +0000 (14:09 +0000)]
Implement "mach dtb <filename.dtb>" in efiboot(8).  This way we can
provide our own FDT if the BIOS doesn't supply one, or even override
the supplied one.

Idea from and ok kettenis@

6 years agoCall daemon with 0 as first argument so that it changes the cwd to /.
florian [Sun, 19 Aug 2018 12:31:41 +0000 (12:31 +0000)]
Call daemon with 0 as first argument so that it changes the cwd to /.
It is not a problem in slowcgi since it calls chroot(2) and then
chdir(2) shortly afterwards but hopefully prevents copying code into
daemons where it does matter.
Problem first observed by dlg in ntpd(8) which keeps sitting in the
directory from where it was started which might for example prevent an
unmount.
Discussed with deraadt@

6 years agoCall daemon with 0 as first argument so that it changes the cwd to /
florian [Sun, 19 Aug 2018 12:29:03 +0000 (12:29 +0000)]
Call daemon with 0 as first argument so that it changes the cwd to /
otherwise the main process will keep sitting in the directory from
where slaacd was started which might for example prevent an unmount.
Problem first observed by dlg in ntpd(8).
Discussed with deraadt@

6 years agoregen
anton [Sun, 19 Aug 2018 11:51:04 +0000 (11:51 +0000)]
regen

6 years agosync
anton [Sun, 19 Aug 2018 11:48:28 +0000 (11:48 +0000)]
sync

6 years agoAdd kcov(4), a kernel code coverage tracing driver. It's used in conjunction
anton [Sun, 19 Aug 2018 11:42:33 +0000 (11:42 +0000)]
Add kcov(4), a kernel code coverage tracing driver. It's used in conjunction
with the syzkaller kernel fuzzer. So far, 8 distinct panics have been found and
fixed. This effort will continue.

kcov is limited to architectures using Clang as their default compiler and is
not enabled by default.

With help from mpi@, thanks!

ok kettenis@ mpi@ visa@

6 years agoAdd support for multiple PCI segments. Only really implemented for arm64
kettenis [Sun, 19 Aug 2018 08:23:47 +0000 (08:23 +0000)]
Add support for multiple PCI segments.  Only really implemented for arm64
for now as amd64/i386 firmware still caters for legacy OSes that only
support a single PCI segment.

ok patrick@

6 years agoRemove a stale/obvious comment.
visa [Sun, 19 Aug 2018 02:22:40 +0000 (02:22 +0000)]
Remove a stale/obvious comment.

OK mpi@

6 years agoBugfix: When a line ends with '\ \"', don't strip the trailing space
schwarze [Sat, 18 Aug 2018 22:04:32 +0000 (22:04 +0000)]
Bugfix: When a line ends with '\ \"', don't strip the trailing space
because that turned it into a bogus line continuation.

6 years agosupport the highly surprising escape sequence \# (line continuation
schwarze [Sat, 18 Aug 2018 21:36:53 +0000 (21:36 +0000)]
support the highly surprising escape sequence \# (line continuation
with comment); used for example by gropdf(1)

6 years agoparagraphs can contain .MT and .UR blocks
schwarze [Sat, 18 Aug 2018 20:41:50 +0000 (20:41 +0000)]
paragraphs can contain .MT and .UR blocks

6 years agoIf a tbl(7) column contains both text cells and numeric cells,
schwarze [Sat, 18 Aug 2018 20:17:58 +0000 (20:17 +0000)]
If a tbl(7) column contains both text cells and numeric cells,
horizontally align the numbers in the same way as groff does.

6 years agoSESSION_UNATTACHED flag is no longer necessary now we have an attached
nicm [Sat, 18 Aug 2018 20:08:52 +0000 (20:08 +0000)]
SESSION_UNATTACHED flag is no longer necessary now we have an attached
count instead.

6 years ago.RE causes a line break even if .RS is not open
schwarze [Sat, 18 Aug 2018 17:32:06 +0000 (17:32 +0000)]
.RE causes a line break even if .RS is not open

6 years ago.SY causes a one-column indentation even without any argument
schwarze [Sat, 18 Aug 2018 17:06:58 +0000 (17:06 +0000)]
.SY causes a one-column indentation even without any argument

6 years agoDon't mention using poll(2) as a timeout.
cheloha [Sat, 18 Aug 2018 16:55:30 +0000 (16:55 +0000)]
Don't mention using poll(2) as a timeout.

Not a strictly portable use of the interface and there are more suitable
interfaces for timeouts anyway.

ok schwarze millert

6 years agoPlug SSL object leaks in doConnection().
cheloha [Sat, 18 Aug 2018 16:51:33 +0000 (16:51 +0000)]
Plug SSL object leaks in doConnection().

Move SSL_new/SSL_free up into benchmark() to restrict the responsibility
for the SSL object to a single scope.  Make doConnection() return an int,
openssl-style.  Some miscellaneous cleanup, too.

Discussed with tb, jsing, and jca.  Basic idea from jsing, lots of patch
input from tb.

ok deraadt on an earlier version

ok tb jsing

6 years agoDo not allocate a column for decimal points if all numbers are integers.
schwarze [Sat, 18 Aug 2018 16:44:52 +0000 (16:44 +0000)]
Do not allocate a column for decimal points if all numbers are integers.

6 years agoSome tidying and helper functions.
nicm [Sat, 18 Aug 2018 16:14:03 +0000 (16:14 +0000)]
Some tidying and helper functions.

6 years agoAdd support for flushing the instruction cache of other processes. This is
kettenis [Sat, 18 Aug 2018 15:42:19 +0000 (15:42 +0000)]
Add support for flushing the instruction cache of other processes.  This is
needed for inserting and removing breakpoints through ptrace(2).

The approach here only works for CPUs that have a PIPT instruction cache
as we use aliased mappings to invalidate the instruction cache.  That doesn't
work on CPUs that have a virtually indexed instruction cache.

ok deraadt@, visa@

6 years agoAfter calling getaddrinfo(3) both on rfc868 and ntp cases we can drop the "dns"
mestre [Sat, 18 Aug 2018 15:25:20 +0000 (15:25 +0000)]
After calling getaddrinfo(3) both on rfc868 and ntp cases we can drop the "dns"
promise and only pledge("stdio inet") since from here until the end of the
program we will only exchange packets through sockets.

After a discussion with deraadt@ about adding privdrop to it we came to the
conclusion that the easiest and sane solution is just to reduce pledge(2)
instead of adding a ton of code to chroot the child that is already forbidden
to access the filesystem anyway.

6 years agoUnsurprisingly, zero-width non-breaking spaces have... width 0.
schwarze [Sat, 18 Aug 2018 15:16:05 +0000 (15:16 +0000)]
Unsurprisingly, zero-width non-breaking spaces have...  width 0.

6 years agoend of sentence detection after .ME and .UE, useful for some GNU manuals
schwarze [Sat, 18 Aug 2018 15:12:09 +0000 (15:12 +0000)]
end of sentence detection after .ME and .UE, useful for some GNU manuals

6 years agoThe .nf/.fi (fill mode) requests never have text children
schwarze [Sat, 18 Aug 2018 14:25:55 +0000 (14:25 +0000)]
The .nf/.fi (fill mode) requests never have text children
and in particular do not reset font mode.

6 years agoTwo consecutive .SY blocks only get a blank line in between
schwarze [Sat, 18 Aug 2018 14:02:52 +0000 (14:02 +0000)]
Two consecutive .SY blocks only get a blank line in between
if the first one is explicitly closed with .YS.

6 years agoprevent line breaks in the middle of .OP
schwarze [Sat, 18 Aug 2018 13:04:48 +0000 (13:04 +0000)]
prevent line breaks in the middle of .OP

6 years agoMake sure we don't match (and attach) more than the maximum number of
kettenis [Sat, 18 Aug 2018 11:34:08 +0000 (11:34 +0000)]
Make sure we don't match (and attach) more than the maximum number of
supported CPUs.

ok deraadt@, patrick@, visa@

6 years agoSupport arbitrary number of redistributors.
kettenis [Sat, 18 Aug 2018 10:10:19 +0000 (10:10 +0000)]
Support arbitrary number of redistributors.
Inspired by an earlier diff from drahn@

ok patrick@, jsg@

6 years agoMassively reduce the amount of text, cutting it down to what is needed
schwarze [Sat, 18 Aug 2018 04:32:04 +0000 (04:32 +0000)]
Massively reduce the amount of text, cutting it down to what is needed
to understand existing man(7) code and deleting parts that would only
be useful for writing new documents, which we strongly discourage:

* Delete the MANUAL STRUCTURE section which merely duplicates mdoc(7).
* Delete internal cross references only useful for writing new code.
* Delete many instances of "included only for compatibility" as the
  whole language is only provided for compatibility.
* Fix a few minor errors and omissions.

6 years agoimplement the GNU man-ext .SY/.YS (synopsis block) macro in man,
schwarze [Sat, 18 Aug 2018 02:03:41 +0000 (02:03 +0000)]
implement the GNU man-ext .SY/.YS (synopsis block) macro in man,
used in most manual pages of the groff package

6 years agoThe official name for the ssdfb(4) reset GPIO attribute uses plural form.
patrick [Fri, 17 Aug 2018 21:00:17 +0000 (21:00 +0000)]
The official name for the ssdfb(4) reset GPIO attribute uses plural form.

6 years agoRemove more pointer arithmetic passing via regions outside the array
schwarze [Fri, 17 Aug 2018 20:31:52 +0000 (20:31 +0000)]
Remove more pointer arithmetic passing via regions outside the array
that is undefined according to the C standard.  Robert Elz <kre at
munnari dot oz dot au> pointed out i wasn't quite done yet.