openbsd
3 years agoThe official service name of tcp/465 is "submissions"
jca [Wed, 12 May 2021 06:50:33 +0000 (06:50 +0000)]
The official service name of tcp/465 is "submissions"

Keep "smtps" as an alias.
https://datatracker.ietf.org/doc/html/rfc8314#section-7.3

ok sthen@ florian@ kmos@

3 years agoDrop swat (tcp/901)
jca [Wed, 12 May 2021 06:45:30 +0000 (06:45 +0000)]
Drop swat (tcp/901)

The Samba Web Administration Tool has been dropped by the samba project and
TCP port 901 is not registered at IANA.  ok sthen@ florian@ kmos@

3 years agoKNF
mlarkin [Wed, 12 May 2021 04:00:46 +0000 (04:00 +0000)]
KNF

3 years agoCorrect defines for fenv rounding modes and change fenv_t and fexcept_t
jsg [Wed, 12 May 2021 02:28:25 +0000 (02:28 +0000)]
Correct defines for fenv rounding modes and change fenv_t and fexcept_t
from unsigned long long to unsigned int.

ok kettenis@

3 years agovmd(8): omit a possibly uninitialized var in a log_warnx
mlarkin [Wed, 12 May 2021 02:24:56 +0000 (02:24 +0000)]
vmd(8): omit a possibly uninitialized var in a log_warnx

Don't print 'base' since it might not be initialized in all code paths.

From James Cook

3 years agoadd a comment describing how this was created
jsg [Wed, 12 May 2021 01:24:32 +0000 (01:24 +0000)]
add a comment describing how this was created

ok deraadt@

3 years agoadd OpenBSD rcs ids
jsg [Wed, 12 May 2021 01:20:52 +0000 (01:20 +0000)]
add OpenBSD rcs ids

3 years agovmm(4): fix flawed physical cpu tracking logic in svm_run_vcpu
dv [Tue, 11 May 2021 22:04:10 +0000 (22:04 +0000)]
vmm(4): fix flawed physical cpu tracking logic in svm_run_vcpu

Replace the overly complicated logic used to track which CPU we are on
in svm_run_vcpu. This fixes an issue where ltr causes a #GP on exit in
certain conditions due to referencing the wrong GDT.

This was primarily witnessed with NixOS guests that performed a heavy
amount of disk io.

Reported by Josh Rickmar. Tested by Josh & abieber@. OK mlarkin@.

3 years agoCast printf args to remove compiler warnings.
dv [Tue, 11 May 2021 21:45:33 +0000 (21:45 +0000)]
Cast printf args to remove compiler warnings.

From Ashton Fagg. OK tb@.

3 years agoDocument SSL_CTX_get_ssl_method(3)
tb [Tue, 11 May 2021 19:48:56 +0000 (19:48 +0000)]
Document SSL_CTX_get_ssl_method(3)

3 years agoMerge some details from OpenSSL 1.1.1.
tb [Tue, 11 May 2021 18:57:17 +0000 (18:57 +0000)]
Merge some details from OpenSSL 1.1.1.

3 years agoA Data Segment Interrupt does not indicate whether it was the result
kettenis [Tue, 11 May 2021 18:21:12 +0000 (18:21 +0000)]
A Data Segment Interrupt does not indicate whether it was the result
of a read or a write fault.  Unfortunately that means we can't call
uvm_fault(), as we have to pass the right access_type.  In particular,
passing PROT_READ for write access on a write-only page will fail.
Fix this issue by inserting an appropriate SLB entry when a mapping
exists at the fault address.  A subsequent Data Storage Interrupt
will call uvm_fault() to insert a mapping for the page into the
page tables.

Fixes the sys/kern/fork-exit regress test.

Debugging done by bluhm@ and patrick@
ok bluhm@

3 years agoTemporarily release the mutex while calling sensor_task_register() as it
anton [Tue, 11 May 2021 16:40:57 +0000 (16:40 +0000)]
Temporarily release the mutex while calling sensor_task_register() as it
might end up sleeping in malloc(). This can only happen if uhidpp is the
first one calling the aforementioned routine which causes the sensors
task queue to be allocated.

Thanks to Justin Yang <linuxjustin at gmail dot com> for the report.

3 years agomissing word in previous
tb [Tue, 11 May 2021 15:31:13 +0000 (15:31 +0000)]
missing word in previous

3 years agoMerge documentation for EVP_DigestVerify() from OpenSSL 1.1.1.
tb [Tue, 11 May 2021 15:26:21 +0000 (15:26 +0000)]
Merge documentation for EVP_DigestVerify() from OpenSSL 1.1.1.

3 years agoinitial attempt at install*.img
deraadt [Tue, 11 May 2021 15:18:48 +0000 (15:18 +0000)]
initial attempt at install*.img

3 years agoMerge documentation for EVP_DigestSign from OpenSSL 1.1.1.
tb [Tue, 11 May 2021 15:14:56 +0000 (15:14 +0000)]
Merge documentation for EVP_DigestSign from OpenSSL 1.1.1.

3 years agomore whitespace cleanups
deraadt [Tue, 11 May 2021 14:58:25 +0000 (14:58 +0000)]
more whitespace cleanups

3 years agowhitespace cleanup
deraadt [Tue, 11 May 2021 14:58:08 +0000 (14:58 +0000)]
whitespace cleanup

3 years agoriscv has no delay slots, we don't need anything like this in the sigcode.
deraadt [Tue, 11 May 2021 13:56:28 +0000 (13:56 +0000)]
riscv has no delay slots, we don't need anything like this in the sigcode.
ok jsg drahn

3 years agotimeout_barrier(9), timeout_del_barrier(9): remove kernel lock
cheloha [Tue, 11 May 2021 13:29:25 +0000 (13:29 +0000)]
timeout_barrier(9), timeout_del_barrier(9): remove kernel lock

In timeout_barrier(9) we take/release the kernel lock to ensure that the
given timeout has finished running (if it had been running at all).

This approach is inefficient.  If we put a barrier timeout on the
queue and wait for it to run in cond_wait(9) we can block instead of
spinning for the kernel lock.  We already do this for process-context
timeouts in timeout_barrier(9) anyway.

Discussed with dlg@, visa@, and mpi@.

ok dlg@

3 years agoEnable iwx(4).
patrick [Tue, 11 May 2021 13:25:26 +0000 (13:25 +0000)]
Enable iwx(4).

3 years agoDon't leak fd on error.
claudio [Tue, 11 May 2021 12:09:19 +0000 (12:09 +0000)]
Don't leak fd on error.

3 years agouse FE_ALL_EXCEPT not _ROUND_MASK when masking fcsr exception bits
jsg [Tue, 11 May 2021 12:05:13 +0000 (12:05 +0000)]
use FE_ALL_EXCEPT not _ROUND_MASK when masking fcsr exception bits

3 years agoMake sure some variables are initialised since modern gcc warns about them.
claudio [Tue, 11 May 2021 11:48:02 +0000 (11:48 +0000)]
Make sure some variables are initialised since modern gcc warns about them.
Handle rrdppid like we do for all other child processes. The two warnings
in rrdp are probably false positives.
OK tb@

3 years agoArm the alarms in all childs so they terminate if the timeout is hit.
claudio [Tue, 11 May 2021 11:43:21 +0000 (11:43 +0000)]
Arm the alarms in all childs so they terminate if the timeout is hit.
Also install the special signal handler around the main poll() loop.
The main process handles SIGALRM so it can log an error to the operator
before exiting.
With and OK deraadt@

3 years agoBefore calling ASN1_time_parse() initialize the struct tm. While
claudio [Tue, 11 May 2021 11:32:51 +0000 (11:32 +0000)]
Before calling ASN1_time_parse() initialize the struct tm. While
recent libressl version initalise the struct tm properly older
versions did not and so -portable runs into problem on systems
with older libressl versions installed.
Problem found by job@
OK tb@

3 years agoregen
mvs [Tue, 11 May 2021 11:21:58 +0000 (11:21 +0000)]
regen

3 years agoUnlock shutdown(2).
mvs [Tue, 11 May 2021 11:21:31 +0000 (11:21 +0000)]
Unlock shutdown(2).

ok mpi@

3 years agoregen
mvs [Tue, 11 May 2021 11:20:51 +0000 (11:20 +0000)]
regen

3 years agoUnlock listen(2).
mvs [Tue, 11 May 2021 11:20:23 +0000 (11:20 +0000)]
Unlock listen(2).

ok mpi@

3 years agoregen
mvs [Tue, 11 May 2021 11:19:39 +0000 (11:19 +0000)]
regen

3 years agoUnlock connect(2).
mvs [Tue, 11 May 2021 11:19:10 +0000 (11:19 +0000)]
Unlock connect(2).

ok mpi@

3 years agoregen
mvs [Tue, 11 May 2021 11:18:15 +0000 (11:18 +0000)]
regen

3 years agoUnlock bind(2).
mvs [Tue, 11 May 2021 11:17:32 +0000 (11:17 +0000)]
Unlock bind(2).

ok mpi@

3 years agoSince ld.lld doesn't properly support R_RISCV_RELAX relocations, switch the
kettenis [Tue, 11 May 2021 09:36:41 +0000 (09:36 +0000)]
Since ld.lld doesn't properly support R_RISCV_RELAX relocations, switch the
default to -no-relax.

ok drahn@

3 years agoDuring a "key unset for sw crypto" panic, display more meta-data
stsp [Tue, 11 May 2021 08:46:31 +0000 (08:46 +0000)]
During a "key unset for sw crypto" panic, display more meta-data
about the offending key. This will hopefully help with debugging.

3 years agoIn hostap mode don't send data frames to nodes which aren't in state ASSOC.
stsp [Tue, 11 May 2021 08:39:32 +0000 (08:39 +0000)]
In hostap mode don't send data frames to nodes which aren't in state ASSOC.

Sending data frames to nodes in other states is wrong since the node's
data structure might not be set up properly in such states.
This could explain occasional "key unset for sw crypto" panics observed
with athn(4) hostap interfaces.

Problem reported and fix tested by Mikolaj Kucharski.

3 years agoUse non-blocking connect() to setup the RTR socket. connect() can hang for
claudio [Tue, 11 May 2021 07:57:24 +0000 (07:57 +0000)]
Use non-blocking connect() to setup the RTR socket. connect() can hang for
a long time if the IP is not reachable and would block the main process
while doing so.
Problem noticed by Pier Carlo Chiodi
OK benno@

3 years agozap stray comma
tb [Tue, 11 May 2021 04:22:32 +0000 (04:22 +0000)]
zap stray comma

3 years agoReplace unnecessary calls to EC_GROUP_get_curve_GF{p,2m}() with
tb [Mon, 10 May 2021 20:58:32 +0000 (20:58 +0000)]
Replace unnecessary calls to EC_GROUP_get_curve_GF{p,2m}() with
EC_GROUP_get_curve() and remove no longer needed prototypes.

3 years agoIt's no longer necessary to link ecdhtest statically.
tb [Mon, 10 May 2021 20:41:44 +0000 (20:41 +0000)]
It's no longer necessary to link ecdhtest statically.

3 years agoMerge documentation for EC_GROUP_{set,get}_curve(3) from OpenSSL 1.1.1.
tb [Mon, 10 May 2021 20:20:49 +0000 (20:20 +0000)]
Merge documentation for EC_GROUP_{set,get}_curve(3) from OpenSSL 1.1.1.

3 years agoMerge documentation for EC_POINT_{get,set}_coordinates and
tb [Mon, 10 May 2021 20:00:58 +0000 (20:00 +0000)]
Merge documentation for EC_POINT_{get,set}_coordinates and
for EC_POINT_set_compressed_coordinates from OpenSSL 1.1.1.

3 years agoRevert previous, it introduced a regression with breakpoints in gdb.
mpi [Mon, 10 May 2021 18:01:24 +0000 (18:01 +0000)]
Revert previous, it introduced a regression with breakpoints in gdb.

3 years agolibexpat major bump to 13.0
bluhm [Mon, 10 May 2021 17:46:56 +0000 (17:46 +0000)]
libexpat major bump to 13.0

3 years agoUpdate libexpat to 2.3.0. Relevant for OpenBSD are only bug fix
bluhm [Mon, 10 May 2021 17:36:48 +0000 (17:36 +0000)]
Update libexpat to 2.3.0.  Relevant for OpenBSD are only bug fix
#438 and other change #443.  A new error constant has been added
to a public header file.  According to guenther@ this is an ABI
break that requires a major bump.
OK tb@; tested by matthieu@

3 years agoAdd ld.script for macppc kernel, ofwboot
gkoehler [Mon, 10 May 2021 17:29:41 +0000 (17:29 +0000)]
Add ld.script for macppc kernel, ofwboot

These are copies of powerpc64/conf/ld.script with some changes for
macppc.  They work with both ld.bfd and ld.lld.

The ld.script fixes ld.lld.  Without ld.script, lld would set the
symbol "etext" to a wrong value like 0x10000034, then ofwboot would
freeze and fail to boot the kernel.  With ld.script, we PROVIDE a
correct etext.

ok kettenis@

3 years agoReplace some magic numbers with #define's. Rename GPT_get_gpt() to
krw [Mon, 10 May 2021 17:16:01 +0000 (17:16 +0000)]
Replace some magic numbers with #define's. Rename GPT_get_gpt() to
GPT_read() to match MBR_read().

No intentional functional change.

3 years agosync
tb [Mon, 10 May 2021 17:15:11 +0000 (17:15 +0000)]
sync

3 years agogive libtls the same bump as libssl
tb [Mon, 10 May 2021 17:13:51 +0000 (17:13 +0000)]
give libtls the same bump as libssl

3 years agobump libssl major after struct visibility changes and symbol addition
tb [Mon, 10 May 2021 17:13:08 +0000 (17:13 +0000)]
bump libssl major after struct visibility changes and symbol addition

3 years agobump libcrypto minor after symbol addition
tb [Mon, 10 May 2021 17:12:05 +0000 (17:12 +0000)]
bump libcrypto minor after symbol addition

3 years agoMake SSL_CIPHER, SSL_CTX, SSL_SESSION, {DTLS1,SSL3}_STATE
tb [Mon, 10 May 2021 17:10:57 +0000 (17:10 +0000)]
Make SSL_CIPHER, SSL_CTX, SSL_SESSION, {DTLS1,SSL3}_STATE
and a few other structs in libssl opaque.

from/ok jsing

3 years agoProvide SSL_SESSION_get0_cipher(3)
tb [Mon, 10 May 2021 17:07:23 +0000 (17:07 +0000)]
Provide SSL_SESSION_get0_cipher(3)

ok jsing

3 years agoProvide SSL_CTX_get_ssl_method(3)
tb [Mon, 10 May 2021 17:05:26 +0000 (17:05 +0000)]
Provide SSL_CTX_get_ssl_method(3)

ok jsing

3 years agoProvide SSL_CIPHER_find(3)
tb [Mon, 10 May 2021 17:03:57 +0000 (17:03 +0000)]
Provide SSL_CIPHER_find(3)

ok jsing

3 years agoExpose EVP_Digest{Sign,Verify}(3)
tb [Mon, 10 May 2021 17:00:32 +0000 (17:00 +0000)]
Expose EVP_Digest{Sign,Verify}(3)

ok jsing

3 years agoExpose EC_POINT_{get,set}_affine_coordinates(3) and
tb [Mon, 10 May 2021 16:58:18 +0000 (16:58 +0000)]
Expose EC_POINT_{get,set}_affine_coordinates(3) and
EC_POINT_set_compressed_coordinates(3)

ok jsing

3 years agoExpose EC_GROUP_{get,set}_curve(3)
tb [Mon, 10 May 2021 16:55:19 +0000 (16:55 +0000)]
Expose EC_GROUP_{get,set}_curve(3)

ok jsing

3 years agoTo add keep-alive support the read handler got changed a lot. Now when
claudio [Mon, 10 May 2021 15:12:33 +0000 (15:12 +0000)]
To add keep-alive support the read handler got changed a lot. Now when
tls_read hits the EOF (s == 0) case it is always a cause to close the
connection. All possible data was already consumed and if something is
still in the buffer then it remained in there for a reason.
Issue noticed and OK deraadt@

3 years agoremove serial number (used during development to observe file rewrites)
deraadt [Mon, 10 May 2021 15:06:34 +0000 (15:06 +0000)]
remove serial number (used during development to observe file rewrites)

3 years agosigfillsiz is int, not long; ok kettenis
deraadt [Mon, 10 May 2021 14:54:14 +0000 (14:54 +0000)]
sigfillsiz is int, not long; ok kettenis

3 years agoExtend eval_all test a little bit.
claudio [Mon, 10 May 2021 10:29:04 +0000 (10:29 +0000)]
Extend eval_all test a little bit.

3 years agoBetter way to detect the double new lines the API issues from time to time.
claudio [Mon, 10 May 2021 10:26:23 +0000 (10:26 +0000)]
Better way to detect the double new lines the API issues from time to time.
This way done lines now will have a newline.

3 years agoLet iwm(4) flush Tx queues before removing the firmware station and
stsp [Mon, 10 May 2021 08:28:00 +0000 (08:28 +0000)]
Let iwm(4) flush Tx queues before removing the firmware station and
before stopping a Tx block ack session. This aligns us more closely
with how the Linux iwlwifi driver is doing things.

Also, reset the device if an errors occurs in the block ack session task.
Fixes auto-recovery after such errors.

Prompted by firmware error reports from kettenis@ and Matthias Schmidt.
Doesn't fix the reported issues completely. I will keep investigating.

Tested:
7265: stsp
8265: Matthias Schmidt
9260: phessler, kettenis

3 years agoRefactor softraid crypto code to allow use of a discipline-specific data
stsp [Mon, 10 May 2021 08:17:07 +0000 (08:17 +0000)]
Refactor softraid crypto code to allow use of a discipline-specific data
structure for RAID1C volumes, as requested by jsing@ during review of my
initial RAID1C patch.

This should effectively be a cosmetic change. The point of this exercise
is to allow the data structure changes made here in softraidvar.h.

Tested on CRYPTO and RAID1C by Josh Grosse, Matthias Schmidt, and myself.
ok jsing@

3 years agoreduce exception.S diff to FreeBSD
jsg [Mon, 10 May 2021 05:58:19 +0000 (05:58 +0000)]
reduce exception.S diff to FreeBSD

ok mlarkin@

3 years agoPull the logic to get the "lock" for TLB shooting into
guenther [Mon, 10 May 2021 00:52:15 +0000 (00:52 +0000)]
Pull the logic to get the "lock" for TLB shooting into
pmap_start_tlb_shoot(), to get the #ifdef goo out of
pmap_tlb_shoot{page,range,tlb}()

Use a normal do{}while(0) when nooping pmap_tlb_shootwait()

tweak and ok kettenis@

3 years agofpu_valid_opcode() did not correctly handle 16 bit fp instructions
jsg [Sun, 9 May 2021 23:22:25 +0000 (23:22 +0000)]
fpu_valid_opcode() did not correctly handle 16 bit fp instructions
such as an stval of 0xaa22.  The RISC-V Instruction Set Manual states
that setting stval to a non-zero value with the instruction on illegal
instruction exception is an optional feature so instead of changing
fpu_valid_opcode() remove it entirely.

ok deraadt@ kettenis@ drahn@

3 years agoChange offsets to (N * 8) to reduce chance of register clobber and mistakes.
drahn [Sun, 9 May 2021 21:26:06 +0000 (21:26 +0000)]
Change offsets to (N * 8) to reduce chance of register clobber and mistakes.
Simplify integer loading, use 'li <dest>, <value>' instead of x0/zero register
Adjust _JB_SIGMASK to not collide with saved registers.

3 years agoAdd draft-ietf-sidrops-rpki-rsc OID
job [Sun, 9 May 2021 19:50:14 +0000 (19:50 +0000)]
Add draft-ietf-sidrops-rpki-rsc OID

Listed under 'SMI Security for S/MIME CMS Content Type
(1.2.840.113549.1.9.16.1)'
https://www.iana.org/assignments/smi-numbers/smi-numbers.xhtml#security-smime-1

OK tb@

3 years agoSome x86 machines advertise the "hardware reduced" ACPI feature, advertise
kettenis [Sun, 9 May 2021 15:51:35 +0000 (15:51 +0000)]
Some x86 machines advertise the "hardware reduced" ACPI feature, advertise
S4 and S5 support, but fail to populate the SLEEP_CONTROL_REG and
SLEEP_STATUS_REG descriptions in the FADT.  An example of such a machine
is the ASUS Zenbook 14 UM433DA.  Any attempt to powerdown the machine
will result in a kernel crash.  It turns out that using the legacy ACPI PM
registers works fine on this machien.  So fall back on those registers
if SLEEP_CONTROL_REG and/or SLEEP_STATUS_REG aren't provided.

ok deraadt@, mpi@

3 years agoAdd subtest for EPRT command in ftpd regression test
jan [Sun, 9 May 2021 14:26:45 +0000 (14:26 +0000)]
Add subtest for EPRT command in ftpd regression test

3 years agoPrepare to provide EVP_Digest{Sign,Verify}
tb [Sun, 9 May 2021 14:25:40 +0000 (14:25 +0000)]
Prepare to provide EVP_Digest{Sign,Verify}

These are one-shot versions combining EVP_Digest{Sign,Verify}{Update,Final}.
and are part of the OpenSSL 1.1.1 API. While they simplify callers in some
situations slightly, their real use is for EdDSA that by design can't be
split into Update/Final steps.

Based on OpenSSL commit 7539418981c140648a620d72edd7398564878b5c

ok inoguchi

3 years agoAdd subtest for SIZE command in ftpd regression tests
jan [Sun, 9 May 2021 14:05:42 +0000 (14:05 +0000)]
Add subtest for SIZE command in ftpd regression tests

3 years agoAdd subtest for RNFR and RNTO in ftpd regression tests
jan [Sun, 9 May 2021 13:16:33 +0000 (13:16 +0000)]
Add subtest for RNFR and RNTO in ftpd regression tests

3 years agoGarbage collect sz in mft_parse_filehash() which has been unused
tb [Sun, 9 May 2021 11:25:32 +0000 (11:25 +0000)]
Garbage collect sz in mft_parse_filehash() which has been unused
since mft.c r1.20.

3 years agotwo whitespace tweaks
tb [Sun, 9 May 2021 11:19:30 +0000 (11:19 +0000)]
two whitespace tweaks

3 years agoRemove unnecessary NULL check that breaks the build with OpenSSL 1.1.
tb [Sun, 9 May 2021 11:18:57 +0000 (11:18 +0000)]
Remove unnecessary NULL check that breaks the build with OpenSSL 1.1.

ok job

3 years agoreturn type on a different line and use (void) instead of ()
jsg [Sun, 9 May 2021 06:40:59 +0000 (06:40 +0000)]
return type on a different line and use (void) instead of ()

3 years agofix indentation
jsg [Sun, 9 May 2021 06:34:21 +0000 (06:34 +0000)]
fix indentation

3 years agoadapt ruslan@freebsd's disasm to our world, and replace the incomplete decoder.
deraadt [Sat, 8 May 2021 18:10:03 +0000 (18:10 +0000)]
adapt ruslan@freebsd's disasm to our world, and replace the incomplete decoder.
ok jsg kettenis

3 years agosimilar to ruslan@freebsd's work, use https://github.com/riscv/riscv-opcodes
deraadt [Sat, 8 May 2021 18:08:41 +0000 (18:08 +0000)]
similar to ruslan@freebsd's work, use https://github.com/riscv/riscv-opcodes
to generate instruction decoder tables

$ cat opcodes opcodes-rvc-pseudo opcodes-rvc opcodes-custom |
    ./parse-opcodes -c

with jsg

3 years agoRecognize GPT partitions of type 21686148-6449-6e6f-744e-656564454649 (a.k.a.
krw [Sat, 8 May 2021 17:44:22 +0000 (17:44 +0000)]
Recognize GPT partitions of type 21686148-6449-6e6f-744e-656564454649 (a.k.a.
"IdontNeedEFI", a.k.a. "BIOS boot"). Often used to contain the second stage boot
loader binary on disk images.

Makes it easier to recognize/overwrite/remove the contents.

Example image provided by mlarkin@

3 years agoSpoof GPT partitions of type 21686148-6449-6e6f-744e-656564454649 (a.k.a.
krw [Sat, 8 May 2021 16:41:24 +0000 (16:41 +0000)]
Spoof GPT partitions of type 21686148-6449-6e6f-744e-656564454649 (a.k.a.
"IdontNeedEFI", a.k.a. "BIOS boot") as FS_BOOT. Often used to contain the second
stage boot loader binary on disk images.

Makes it easier to recognize/overwrite/remove the contents.

Not yet supported in fdisk(8).

Example image provided by mlarkin@

3 years agoPerhaps the syntax '((' and '()' will be valid one day, but not at the
lum [Sat, 8 May 2021 12:57:41 +0000 (12:57 +0000)]
Perhaps the syntax '((' and '()' will be valid one day, but not at the
moment.  This diff works the two checks for them into the main for
parsing loop.

3 years agoRevert previous commit.
martijn [Sat, 8 May 2021 09:38:29 +0000 (09:38 +0000)]
Revert previous commit.
Someone this introduces some problems that I didn't ran into during testing

3 years agostop parsing if a digit is found as first character of an expression.
lum [Sat, 8 May 2021 09:27:35 +0000 (09:27 +0000)]
stop parsing if a digit is found as first character of an expression.

3 years agoIn the C locale make codepoints > 0x7f return EILSEQ, since these aren't
martijn [Sat, 8 May 2021 07:26:19 +0000 (07:26 +0000)]
In the C locale make codepoints > 0x7f return EILSEQ, since these aren't
part of that locale.
This matches what at least FreeBSD and glibc do.

OK millert@

3 years agoFix a race in the kqueue-read test. If the writer thread managed to fill
anton [Sat, 8 May 2021 06:53:19 +0000 (06:53 +0000)]
Fix a race in the kqueue-read test. If the writer thread managed to fill
up the pipe buffer, it will hang in write(2) waiting for the pipe to
become writeable again. While doing so, it cannot observe that the
kqueue thread as already finished implying that ctx_thread_alive() would
return false, meaning no further writes are wanted.

Therefore open the pipe in non blocking mode and just ignore EAGAIN
errors while writing.

3 years agokernel setjmp saves 14 registers, not 13. ddb continue now works.
deraadt [Sat, 8 May 2021 05:31:07 +0000 (05:31 +0000)]
kernel setjmp saves 14 registers, not 13.  ddb continue now works.
ok jsg

3 years agoReplace random mix of u_int* and uint* types with consistent uint* types.
krw [Fri, 7 May 2021 22:15:13 +0000 (22:15 +0000)]
Replace random mix of u_int* and uint* types with consistent uint* types.

3 years agoPrint Synopsys version number, use OF_getpropbool(9) where appropriate
kettenis [Fri, 7 May 2021 19:03:01 +0000 (19:03 +0000)]
Print Synopsys version number, use OF_getpropbool(9) where appropriate
and handle a few more device properties seen on the beaglev board.

ok jsg@

3 years agoDynamic socket buffers make tests unreliable, set fixed buffer size.
bluhm [Fri, 7 May 2021 19:00:34 +0000 (19:00 +0000)]
Dynamic socket buffers make tests unreliable, set fixed buffer size.

3 years agoFix the \x escape sequence to be limited to max 2 characters, instead of
martijn [Fri, 7 May 2021 14:31:27 +0000 (14:31 +0000)]
Fix the \x escape sequence to be limited to max 2 characters, instead of
consuming as long as there are isxdigit(3) characters available.

While here document it and mark it as an extension.

OK millert@

3 years agoIncrease ConnectionAttempts from 4 to 10 as the tests occasionally time
dtucker [Fri, 7 May 2021 09:23:40 +0000 (09:23 +0000)]
Increase ConnectionAttempts from 4 to 10 as the tests occasionally time
out on heavily loaded hosts.

3 years agoRealTek -> Realtek
jsg [Fri, 7 May 2021 09:13:19 +0000 (09:13 +0000)]
RealTek -> Realtek

ok jmc@ kevlo@

3 years agoGive an error if quoted string is found as first non-white char after
lum [Fri, 7 May 2021 08:29:30 +0000 (08:29 +0000)]
Give an error if quoted string is found as first non-white char after
'('.

3 years agoTake a note of expression length when it is extracted from line
lum [Fri, 7 May 2021 07:42:20 +0000 (07:42 +0000)]
Take a note of expression length when it is extracted from line
submitted to excline().