openbsd
6 years agoswitch installurl example to cdn.openbsd.org
tj [Thu, 23 Aug 2018 16:28:12 +0000 (16:28 +0000)]
switch installurl example to cdn.openbsd.org

6 years agoMove job struct into job.c.
nicm [Thu, 23 Aug 2018 15:45:05 +0000 (15:45 +0000)]
Move job struct into job.c.

6 years agoSet the pointer to the EFI Runtime Services, otherwise we call into
patrick [Thu, 23 Aug 2018 15:31:12 +0000 (15:31 +0000)]
Set the pointer to the EFI Runtime Services, otherwise we call into
nowhere.

ok kettenis@

6 years agoAdd license header.
inoguchi [Thu, 23 Aug 2018 15:16:21 +0000 (15:16 +0000)]
Add license header.

6 years agoCheck reusing SSL/TLS session ticket by regression test
inoguchi [Thu, 23 Aug 2018 14:54:28 +0000 (14:54 +0000)]
Check reusing SSL/TLS session ticket by regression test

- Added checking for session ticket reusing with using openssl(1) s_server and
  s_client command in appstest.sh
- Confirm certificate verification status.
- Save s_server message to log file.

ok tb@ and jsing@

6 years agoport the amd64 code for loading intel microcode on boot to i386
jsg [Thu, 23 Aug 2018 14:47:52 +0000 (14:47 +0000)]
port the amd64 code for loading intel microcode on boot to i386
ok deraadt@ mlarkin@

6 years agoImplement the roff(7) .shift and .return requests,
schwarze [Thu, 23 Aug 2018 14:16:11 +0000 (14:16 +0000)]
Implement the roff(7) .shift and .return requests,
for example used by groff_hdtbl(7) and groff_mom(7).

Also correctly interpolate arguments during nested macro execution
even after .shift and .return, implemented using a stack of argument
arrays.

Note that only read.c, but not roff.c can detect the end of a macro
execution, and the existence of .shift implies that arguments cannot
be interpolated up front, so unfortunately, this includes a partial
revert of roff.c rev. 1.209, moving argument interpolation back into
the function roff_res().

6 years agoAlways check the return values of get_[fsize|bsize|cpg].
krw [Thu, 23 Aug 2018 13:21:27 +0000 (13:21 +0000)]
Always check the return values of get_[fsize|bsize|cpg].

Accept partition changes only if all succeed.

ok tb@ deraadt@

6 years agoimport alternative message parser (not used yet).
eric [Thu, 23 Aug 2018 10:07:06 +0000 (10:07 +0000)]
import alternative message parser (not used yet).

6 years agoWe can safely assume that our utmp(5) file format implementation can guarantee
mestre [Thu, 23 Aug 2018 06:27:54 +0000 (06:27 +0000)]
We can safely assume that our utmp(5) file format implementation can guarantee
space for the NUL character, nevertheless there will always be some piece of
software that can get it wrong and corrupt the database, so we must take this
into consideration.

That being said, there is one strlcpy(3) that needs to be reverted back into
strncpy(3) + '\0' since if we try to use a bogus wtmp(5) file with ac(8) that
is big enough then the NUL char is not verified and it will write memory
out-of-bounds which will make the program crash.

discussed with and OK cheloha@ deraadt@

6 years agoreduce pledge(2) to "stdio tty" after ncurses initialization. robots(6) uses a
mestre [Thu, 23 Aug 2018 06:26:35 +0000 (06:26 +0000)]
reduce pledge(2) to "stdio tty" after ncurses initialization. robots(6) uses a
scorefile nevertheless an fd is opened way in advance and therefore we can
disable any further access to the filesystem.

OK tb@

6 years agoreduce pledge(2) to "stdio tty" after ncurses initialization.
mestre [Thu, 23 Aug 2018 06:25:01 +0000 (06:25 +0000)]
reduce pledge(2) to "stdio tty" after ncurses initialization.

OK tb@

6 years agoAllow to boot CDROM-only VMs.
reyk [Thu, 23 Aug 2018 06:04:53 +0000 (06:04 +0000)]
Allow to boot CDROM-only VMs.

Pointed out by Jon Williams

OK mlarkin@ kn@ ccardenas@

6 years agomemleak introduced in r1.83; from Colin Watson
djm [Thu, 23 Aug 2018 03:01:08 +0000 (03:01 +0000)]
memleak introduced in r1.83; from Colin Watson

6 years agoremove hwrm interface code for nvram reads and writes, firmware updates,
jmatthew [Thu, 23 Aug 2018 01:40:26 +0000 (01:40 +0000)]
remove hwrm interface code for nvram reads and writes, firmware updates,
and wol filters, none of which we're going to use.

6 years agorearrange txeof so it processes slots up to the index given in the
jmatthew [Thu, 23 Aug 2018 01:06:06 +0000 (01:06 +0000)]
rearrange txeof so it processes slots up to the index given in the
completion event, and only request completion events for the last packet
we place on the ring in bnxt_start, which doesn't do anything now but
will make tx faster when we get tx mitigation working.

6 years agoset interrupt aggregation parameters so we get around 10000 interrupts
jmatthew [Thu, 23 Aug 2018 00:22:53 +0000 (00:22 +0000)]
set interrupt aggregation parameters so we get around 10000 interrupts
per second, which makes a pretty sizable improvement to rx performance.

6 years agoInitialize bridge registers instead of relying on ppb(4) to do it for us.
kettenis [Wed, 22 Aug 2018 21:15:53 +0000 (21:15 +0000)]
Initialize bridge registers instead of relying on ppb(4) to do it for us.
This gives us more control over the I/O windows that we expose such that
we can make enough address space available for graphics cards.

6 years agoUse a monotonic clock for the benchmark timeout.
cheloha [Wed, 22 Aug 2018 20:36:24 +0000 (20:36 +0000)]
Use a monotonic clock for the benchmark timeout.

While here, we don't need the app_timer_* wrapper function, it only
obfuscates things, so delete it.  Also while here, totalTime only needs
to be assigned once.

ok tb@

6 years agoAdd StatusLeft and StatusRight mouse key modifiers for the left and
nicm [Wed, 22 Aug 2018 20:06:14 +0000 (20:06 +0000)]
Add StatusLeft and StatusRight mouse key modifiers for the left and
right parts of the status line.

6 years agofrag6_slowtimo: push NET_LOCK into frag6_freef around icmp6_error.
cheloha [Wed, 22 Aug 2018 19:48:48 +0000 (19:48 +0000)]
frag6_slowtimo: push NET_LOCK into frag6_freef around icmp6_error.

icmp6_error() still probably needs the NET_LOCK, as the call chain
icmp6_error -> icmp6_reflect -> rt_match -> rt_clone -> rtrequest
is possible.

The fragment discard loop in frag6_slowtimo and the other
cleanup bits in frag6_freef do not require it however.  So
push the lock down into frag6_freef around icmp6_error.

Prompted by mpi.  Discussed with bluhm and kn.  Regress test help
by bluhm.  Additional testing by kn.

ok kn@ visa@ mpi@

6 years agoCorrect session ticket encryption.
jsing [Wed, 22 Aug 2018 17:46:29 +0000 (17:46 +0000)]
Correct session ticket encryption.

The CBB conversion resulted in the ticket encryption being handled
incorrectly, resulting in only the last block being used. Fix this and
restore the previous behaviour.

Issue found by inoguchi@ and sebastia@.

ok inoguchi@ and tb@

6 years agoLet /etc/installurl default to cdn.openbsd.org if it doesn't exist and no
tb [Wed, 22 Aug 2018 16:53:36 +0000 (16:53 +0000)]
Let /etc/installurl default to cdn.openbsd.org if it doesn't exist and no
official mirror was used. This way, people doing installs without network
access also get working pkg_add and syspatch experience out of the box.

Idea from tj
ok halex, job (who made it all possible), deraadt

6 years agoEnable uscom(4) where uslcom(4) is already present.
mpi [Wed, 22 Aug 2018 15:38:46 +0000 (15:38 +0000)]
Enable uscom(4) where uslcom(4) is already present.

Based on a submisison from Jan Klemkow.

6 years agoWork well with the Dynastream ANTUSB-m, from Jan Klemkow.
mpi [Wed, 22 Aug 2018 15:32:49 +0000 (15:32 +0000)]
Work well with the Dynastream ANTUSB-m, from Jan Klemkow.

6 years agoregen
mpi [Wed, 22 Aug 2018 15:31:05 +0000 (15:31 +0000)]
regen

6 years agoDynastream ANTUSB-m, from Jan Klemkow.
mpi [Wed, 22 Aug 2018 15:30:20 +0000 (15:30 +0000)]
Dynastream ANTUSB-m, from Jan Klemkow.

6 years agoUpdate libexpat to 2.2.6. Relevant for OpenBSD is
bluhm [Wed, 22 Aug 2018 13:32:11 +0000 (13:32 +0000)]
Update libexpat to 2.2.6.  Relevant for OpenBSD is
- Avoid doing arithmetic with NULL pointers in XML_GetBuffer
- Fix 2.2.5 regression with suspend-resume while parsing
  a document like '<root/>'
- Address compiler warnings
- Fix miscellaneous typos

6 years agoAdding membar_xxx defines to userland.
aoyama [Wed, 22 Aug 2018 11:25:58 +0000 (11:25 +0000)]
Adding membar_xxx defines to userland.

The src/lib/libc/thread/rthread.c 1.8 change adds #include
<sys/atomic.h> in userland code.

Current m88k atomic.h contents are inside of #if defined(_KERNEL)
guard, then, nothing is defined for userland program.
So we need adding some defines to compile it on m88k.

The original diff is suggested from Miod Vallat, modified by the
advice from mpi@ and kettenis@.

ok kettenis@

6 years agoFix a crash when relaying with authentication but auth table is not set.
eric [Wed, 22 Aug 2018 10:11:43 +0000 (10:11 +0000)]
Fix a crash when relaying with authentication but auth table is not set.

found by and ok stsp@

6 years agoImplement address translation. Makes I/O space access work.
kettenis [Tue, 21 Aug 2018 22:16:42 +0000 (22:16 +0000)]
Implement address translation.  Makes I/O space access work.

6 years agoUse an mmap()'d buffer instead of a static buffer for the contents
millert [Tue, 21 Aug 2018 20:20:04 +0000 (20:20 +0000)]
Use an mmap()'d buffer instead of a static buffer for the contents
of the pointer returned by getpw{ent,nam,uid}().  We unmap the
buffer each time to catch callers using a stale passwd struct
pointer.  As a special case, we do not unmap the buffer if the
previous lookup was for the same name or uid.  This special case
may be removed in the future.  OK deraadt@

6 years agoPerform mitigations for Intel L1TF screwup. There are three options:
deraadt [Tue, 21 Aug 2018 19:04:38 +0000 (19:04 +0000)]
Perform mitigations for Intel L1TF screwup.  There are three options:
(1) Future cpus which don't have the bug, (2) cpu's with microcode
containing a L1D flush operation, (3) stuffing the L1D cache with fresh
data and expiring old content.  This stuffing loop is complicated and
interesting, no details on the mitigation have been released by Intel so
Mike and I studied other systems for inspiration.  Replacement algorithm
for the L1D is described in the tlbleed paper. We use a 64K PA-linear
region filled with trapsleds (in case there is L1D->L1I data movement).
The TLBs covering the region are loaded first, because TLB loading
apparently flows through the D cache.  Before performing vmlaunch or
vmresume, the cachelines covering the guest registers are also flushed.
with mlarkin, additional testing by pd, handy comments from the
kettenis and guenther peanuts

6 years agoLink arch amd64 regress to build.
bluhm [Tue, 21 Aug 2018 18:42:40 +0000 (18:42 +0000)]
Link arch amd64 regress to build.

6 years agoCheck the FPU environment of user land processes after exec and the
bluhm [Tue, 21 Aug 2018 18:35:18 +0000 (18:35 +0000)]
Check the FPU environment of user land processes after exec and the
proc0 kernel thread for FPU initialization values.

6 years agoImplement the \\$@ escape sequence (insert all macro arguments,
schwarze [Tue, 21 Aug 2018 18:15:16 +0000 (18:15 +0000)]
Implement the \\$@ escape sequence (insert all macro arguments,
quoted) in addition to the already supported \\$* (similar, but
unquoted).  Then use \\$@ to improve the implementation of
the .als request (macro alias).

Needed by groff_hdtbl(7).
Gosh, it feels like the manual pages of the groff package are
exercising every bloody roff(7) feature under the sun.  In the
manual page source code itself, not merely in the implementation
of the used macro packages, that is.

6 years agocope with latest config changes; ok jmc@
anton [Tue, 21 Aug 2018 18:09:34 +0000 (18:09 +0000)]
cope with latest config changes; ok jmc@

6 years agoRework kcov kernel config. Instead of treating kcov as both an option and a
anton [Tue, 21 Aug 2018 18:06:12 +0000 (18:06 +0000)]
Rework kcov kernel config. Instead of treating kcov as both an option and a
pseudo-device, get rid of the option. Enabling kcov now requires the following
line to be added to the kernel config:

  pseudo-device kcov 1

This is how pseudo devices are enabled in general. A side-effect of this change
is that dev/kcov.c will no longer be compiled by default.

Prodded by deraadt@; ok mpi@ visa@

6 years agoFix alignment fault in switchd(8) on sparc64. Use memcpy to set oxm_value,
akoshibe [Tue, 21 Aug 2018 16:40:23 +0000 (16:40 +0000)]
Fix alignment fault in switchd(8) on sparc64. Use memcpy to set oxm_value,
which isn't aligned to 64 bits.

Based on pointers from Ori Bernstein
Reported by Ryan Keating
ok yasuoka@ deraadt@

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