inoguchi [Thu, 2 Sep 2021 11:37:44 +0000 (11:37 +0000)]
Use defined constants
semarie [Thu, 2 Sep 2021 11:36:47 +0000 (11:36 +0000)]
atactl(8): few printf("%s", NULL) cleanup
ok deraadt@
inoguchi [Thu, 2 Sep 2021 11:30:15 +0000 (11:30 +0000)]
Add DB_TYPE_SUSP
semarie [Thu, 2 Sep 2021 11:26:54 +0000 (11:26 +0000)]
timeout(1): execvp(2) does not return except on error
there is no need to check if the return value is -1. just
unconditionally call err(3).
ok deraadt@ schwarze@
schwarze [Thu, 2 Sep 2021 11:19:02 +0000 (11:19 +0000)]
Make all signal handler functions async-signal-safe
by deleting the redundant "killersig" struct member
and using the existing sig_atomic_t cl_sigterm variable instead.
While here, garbage collect the h_hup() signal handler
which is essentially identical to h_term().
This also gets rid of the last #define & #undef in cl_main.c.
OK martijn@, and also tested by Tim <trondd at kagu hyphen tsuchi dot com>.
beck [Thu, 2 Sep 2021 11:10:43 +0000 (11:10 +0000)]
Correct the is_server flag in the call to the debug callback to be correct.
ok tb@
inoguchi [Thu, 2 Sep 2021 11:07:56 +0000 (11:07 +0000)]
Move subject check process after the subject edit process
Referred to OpenSSL commit
2cedf794 and arranged for our codebase.
ok tb@
deraadt [Thu, 2 Sep 2021 10:59:13 +0000 (10:59 +0000)]
Ah, I was fooled by a left over man page
mlarkin [Thu, 2 Sep 2021 10:49:26 +0000 (10:49 +0000)]
add aq(4) to amd64 RAMDISK_CD and riscv64 RAMDISK
kettenis [Thu, 2 Sep 2021 10:48:52 +0000 (10:48 +0000)]
Fix the TCR_TG0_xxx definitions and add TCR_TG0_4K to the initial setting
of TCR_EL1 in locore to make clear we use 4K pages for both userland and
the kernel.
ok patrick@
deraadt [Thu, 2 Sep 2021 10:46:22 +0000 (10:46 +0000)]
nameserver alias on domain (53) collided with true nameserver (42)
which would be parsed earlier in any case. what a weird piece of
history.
from Raf Czlonka
deraadt [Thu, 2 Sep 2021 10:39:32 +0000 (10:39 +0000)]
delete reference to X11 README file which is no longer installed.
from Raf Czlonka
mlarkin [Thu, 2 Sep 2021 10:18:27 +0000 (10:18 +0000)]
Typo in previous commit
mlarkin [Thu, 2 Sep 2021 10:17:46 +0000 (10:17 +0000)]
.Xr for aq(4) in pci(4) manpage
mlarkin [Thu, 2 Sep 2021 10:12:20 +0000 (10:12 +0000)]
Forgot the man page Makefile in the previous commit
mlarkin [Thu, 2 Sep 2021 10:11:21 +0000 (10:11 +0000)]
aq(4) driver for Aquantia 1/2.5/5/10Gb/s PCIe ethernet adapters
Adds support for Aquantia AQC1xx family of PCIe ethernet adapters. This
driver supports 1Gbps through 10Gbps modes of operation based on the
hardware and media/switch capabilities.
The initial code was ported from NetBSD, with jmatthew@ finishing up
the Tx/Rx ring support and interrupt handler routine.
The driver only supports devices using firmware V2.
This diff enables aq(4) on riscv64 and amd64, the only platforms where
I have tested the driver, but it likely works on other architectures
as well.
deraadt [Thu, 2 Sep 2021 09:50:38 +0000 (09:50 +0000)]
Document new %n syslog+abort behaviour, text mostly copied from printf.3
deraadt [Thu, 2 Sep 2021 09:46:21 +0000 (09:46 +0000)]
delete %n using test cases, which now intentionally fault
spotted by anton
deraadt [Thu, 2 Sep 2021 09:35:17 +0000 (09:35 +0000)]
move comment into correct place
deraadt [Thu, 2 Sep 2021 09:08:08 +0000 (09:08 +0000)]
bunch of err() should be errx()
job [Thu, 2 Sep 2021 08:52:10 +0000 (08:52 +0000)]
No need to list foreign source code repository tags
Feedback from deraadt@
beck [Thu, 2 Sep 2021 08:51:56 +0000 (08:51 +0000)]
RFC 6066 section 8 allows the server MAY choose not send the CertificateStatus
message, even if it has received a "status_request" extension in the client
hello message and has sent a "status_request" extention in the server hello
message. Genua found a site that is this broken. This makes it work.
ok jsing@
mpi [Thu, 2 Sep 2021 08:48:22 +0000 (08:48 +0000)]
Initialize mutex to IPL_NONE.
ok kettenis@
dv [Thu, 2 Sep 2021 07:19:53 +0000 (07:19 +0000)]
rename rw locks to avoid ambiguity and verboseness
Syzbot might complain about "new" panics, but to help debug a recent
report it helps to have unique rw lock names.
"sounds good to me" @mlarkin
jasper [Thu, 2 Sep 2021 07:14:15 +0000 (07:14 +0000)]
regress tests shouldn't set or modify MALLOC_OPTIONS unless they're actually very specific behaviour
document this accordingly in the guidelines section of the manpage
ok bluhm@
nicm [Thu, 2 Sep 2021 07:11:03 +0000 (07:11 +0000)]
Change copying arguments to that flags without arguments are inserted
correctly and empty arguments lists do not crash. Fixes crash reported
by & ok mpi@.
deraadt [Thu, 2 Sep 2021 06:46:32 +0000 (06:46 +0000)]
this is not a section 3 man page anymore
deraadt [Thu, 2 Sep 2021 06:23:32 +0000 (06:23 +0000)]
some functionality requires pledge "proc"
martijn [Thu, 2 Sep 2021 05:41:02 +0000 (05:41 +0000)]
Allow snmpd(8) to send SNMPv3 traps.
OK jmatthew@
job [Wed, 1 Sep 2021 21:45:10 +0000 (21:45 +0000)]
Add the NetBSD source code repository tag back to help future historians
job [Wed, 1 Sep 2021 21:43:51 +0000 (21:43 +0000)]
Fix overflow / underflow check by moving it up before the return
Also rename 'end' to 'suffix' for readability.
OK beck@
job [Wed, 1 Sep 2021 20:18:54 +0000 (20:18 +0000)]
Update project tag line, shorten some err() calls
krw [Wed, 1 Sep 2021 20:08:32 +0000 (20:08 +0000)]
Improve editing GPT partition type GUID's by rejecting partition
id's that have no associated GUID, rather than disabling the
partition.
If the current partition type is a GUID with no corresponding
partition id, display and use that GUID as the default value.
Less surprising behaviour all round.
deraadt [Wed, 1 Sep 2021 20:03:43 +0000 (20:03 +0000)]
small unused/initialization improvements
deraadt [Wed, 1 Sep 2021 20:01:14 +0000 (20:01 +0000)]
repair strtonum idiom and improve error messaging
ok job
job [Wed, 1 Sep 2021 19:55:53 +0000 (19:55 +0000)]
Enable making timeout(1)
OK deraadt@
job [Wed, 1 Sep 2021 19:54:34 +0000 (19:54 +0000)]
Style nits
Contribution from Anton Lindqvist
halex [Wed, 1 Sep 2021 18:16:52 +0000 (18:16 +0000)]
consider two files sharing the same inode identical
This gives a substantial speedup when comparing directory
structures with many hardlinked files, e.g. when using
rsnapshot for incremental backup.
ok stsp@ millert@
jmc [Wed, 1 Sep 2021 17:47:33 +0000 (17:47 +0000)]
remove unused macro;
job [Wed, 1 Sep 2021 16:12:38 +0000 (16:12 +0000)]
Case h is pointless
Feedback from deraadt@
job [Wed, 1 Sep 2021 16:11:30 +0000 (16:11 +0000)]
Fix indenting
Feedback from deraadt@
jan [Wed, 1 Sep 2021 16:10:39 +0000 (16:10 +0000)]
Use ttopen in tty drivers open functions as ttysleep string, as the others do.
ok patrick@
job [Wed, 1 Sep 2021 16:09:54 +0000 (16:09 +0000)]
Simplify code by replacing strtol() with strtonum()
Feedback from deraadt@
job [Wed, 1 Sep 2021 16:04:40 +0000 (16:04 +0000)]
pledge() timeout
Feedback from deraadt@
job [Wed, 1 Sep 2021 16:00:48 +0000 (16:00 +0000)]
Remove sysexits.h reference and improve usage string.
Feedback from deraadt@
claudio [Wed, 1 Sep 2021 15:59:22 +0000 (15:59 +0000)]
inet_ntop(3) needs sys/socket.h for AF_INET / AF_INET6 so add the header
to the list. While here remove some of the headers from inet_net_ntop(3)
for balance.
deraadt [Wed, 1 Sep 2021 15:54:40 +0000 (15:54 +0000)]
A couple commands don't need sys/param.h, but they do need sys/signal.h
deraadt [Wed, 1 Sep 2021 15:51:45 +0000 (15:51 +0000)]
neither ktrace(2) or utrace(2) require a caller to pull sys/param.h
job [Wed, 1 Sep 2021 15:50:33 +0000 (15:50 +0000)]
Import timeout(1) from NetBSD
The timeout(1) utility can be used to run commands with a time limit.
OK deraadt@ beck@
tobhe [Wed, 1 Sep 2021 15:30:06 +0000 (15:30 +0000)]
Add client side support for DNS configuration. Use RTM_PROPOSAL_STATIC
route messages to propose the name server to resolvd(8).
For now, iked will only propose a single name server from the first
established connection.
Automatic name server configuration is enabled by default for policies using
the 'iface' option.
discussed with deraadt@
ok for the DNS parts florian@
ok for the rest patrick@
job [Wed, 1 Sep 2021 15:21:10 +0000 (15:21 +0000)]
Let rpki-client(8) inform bgpd(8) when RPKI VRPs will expire.
This will help prevent machines loading outdated roa-sets.
OK claudio@
deraadt [Wed, 1 Sep 2021 15:19:00 +0000 (15:19 +0000)]
remove sys/param.h use (few small repairs)
job [Wed, 1 Sep 2021 15:06:47 +0000 (15:06 +0000)]
Clarify maxlen is optional in roa-set
OK claudio@
schwarze [Wed, 1 Sep 2021 14:28:15 +0000 (14:28 +0000)]
As a first step towards safe signal handling, improve the h_int()
and h_winch() signal handlers to make one single store to a
sig_atomic_t variable. Note that the h_hup() and h_term() signal
handlers are still unsafe after this commit because they also set
the "killersig" (how fitting!) field in a global struct.
Despite storing information in static global variables rather than
in structs passed around as arguments, this patch does not cause a
change in behaviour because there is always exactly one GS object,
initialized using gs_init() called from the top of main(), and
screen_init() stores a pointer to this one and only GS object in
the .gp member of each and every SCR object. Talk about useless
abstraction...
Problem pointed out by deraadt@.
Patch from Tim <trondd at kagu hyphen tsuchi dot com> on tech@.
OK deraadt@.
mpi [Wed, 1 Sep 2021 14:03:24 +0000 (14:03 +0000)]
Prevent lock ordering issue by raising ipl level of vcpu_pool to IPL_MPFLOOR.
Reported-by: syzbot+c8905496cd61610f77e2@syzkaller.appspotmail.com
ok mlarkin@
schwarze [Wed, 1 Sep 2021 13:56:03 +0000 (13:56 +0000)]
comment out the detailed description of SSL_get_servername(3),
leaving only the basic description in the RETURN VALUES section;
tb@ pointed out LibreSSL does not currently provide all those guarantees,
and he also OK'ed this diff
mortimer [Wed, 1 Sep 2021 13:37:14 +0000 (13:37 +0000)]
Add lfence after ret in retpoline thunk.
Recommended by AMD white paper Software Techniques for Managing
Speculation on AMD Processors (9.17.20) mitigation V2-1.
Pointed out by bluhm@. ok bluhm@ kettenis@
mpi [Wed, 1 Sep 2021 13:22:36 +0000 (13:22 +0000)]
Rergression for printing a @map after calling clear().
Adapted from a test case generated by AFL++.
ok jasper@
mpi [Wed, 1 Sep 2021 13:21:24 +0000 (13:21 +0000)]
Handle the case where map/hist can be read after calling clear().
Fix a NULL-derference found by jasper@ with AFL++ (port coming soon!).
ok jasper@
claudio [Wed, 1 Sep 2021 12:39:52 +0000 (12:39 +0000)]
Implement roa-set data expiry. Every prefix in a roa-set can specify an
optional expires timestamp. The rtr process is walking the roa-set every
5min and removes every prefix that is expired.
With this stale RPKI data will slowly disapear and not linger around.
OK job@
claudio [Wed, 1 Sep 2021 12:26:26 +0000 (12:26 +0000)]
RPKI only cares about *.{cer,crl,gbr,mft,roa} files. Use rsync --include
and --exclude to only fetch those files from the CA repositories.
OK job@
dv [Wed, 1 Sep 2021 11:08:21 +0000 (11:08 +0000)]
remove unused functions and cleanup vmd.h
Discussed with mlarkin@. These functions were implemented but never
used. While in vmd.h, fix the order to match current vmd(8) reality.
anton [Wed, 1 Sep 2021 10:41:39 +0000 (10:41 +0000)]
Add support for the more rare volume usage which differs compared to the
more common volume increment/decrement usages in which each volume
change direction is represented using a distinct usage. The volume usage
instead uses bits of the interrupt buffer to represent the wanted
volume. The same bits should be within the bounds given by the logical
min/max associated with the HID item. However, the volume is not
interpreted as an absolute value but rather just looking at the sign bit
in order to determine the volume change direction.
I couldn't find any documentation of this usage and the implementation is
therefore solely based on analysing actual data from Richard Toohey's
<richardjtoohey at gmail dot com> Dell keyboard.
anton [Wed, 1 Sep 2021 10:40:19 +0000 (10:40 +0000)]
Rename ucc_bits_to_usage() to ucc_bits_to_int() as it's about to be used
in more than one context.
bluhm [Wed, 1 Sep 2021 09:50:21 +0000 (09:50 +0000)]
Older AMD CPUs that do not support IBRS need an lfence after ret
to stop speculation. This seems to be necessary when the branch
predictor hits the ret for the first time. In their white paper
to mitigate speculation attacks, AMD's retpoline example has an
explicit lfence. Adjust our retpoline assembly macro in the kernel.
OK guenther@ mortimer@ deraadt@
claudio [Wed, 1 Sep 2021 09:48:08 +0000 (09:48 +0000)]
Remove from0 support. openrsync will not implement all bad ideas that
were added to rsync. from0 is one of those and really not needed.
OK job@
beck [Wed, 1 Sep 2021 09:42:28 +0000 (09:42 +0000)]
Remove assignment of value that is never read.
ok tb@
claudio [Wed, 1 Sep 2021 09:39:14 +0000 (09:39 +0000)]
Fix bad logic I introduced before commit.
Found by job@
gnezdo [Wed, 1 Sep 2021 09:34:53 +0000 (09:34 +0000)]
llvm: Use Component in OpenBSD::getCompilerRT to find libraries
Clang uses runtime libraries for some advanced features like
sanitizers. Different systems have different preferences about file
placement. OpenBSD with this change would use this name for ASan:
/usr/lib/clang/11.1.0/lib/libclang_rt.asan.a
So far, no libraries are shipped, only their eventual location is chosen.
Discussed with deraadt@ and kettenis@, OK mortimer@
jan [Wed, 1 Sep 2021 09:29:31 +0000 (09:29 +0000)]
Remove dead poweroff functions, as they not appear in other
serial drivers.
ok patrick@
jasper [Wed, 1 Sep 2021 09:26:32 +0000 (09:26 +0000)]
remove manual fiddling with MALLOC_OPTIONS from libc regress tests
these options should be set globally (sysctl) when running regress as opposed to having
individual tests set it, barring a few specific exceptions.
ok bluhm@
claudio [Wed, 1 Sep 2021 08:17:37 +0000 (08:17 +0000)]
Document the http_proxy environment variable
deraadt [Wed, 1 Sep 2021 08:15:53 +0000 (08:15 +0000)]
quietly attempt mounting of /var/log early, in case someone creates such
a partition to avoid /var overflow issues
ok benno beck
beck [Wed, 1 Sep 2021 08:12:15 +0000 (08:12 +0000)]
Add a regression test to verify that we call the callback in the same
order on success for both the legacy and the new verifier, This avoids
problems as seen in perl's regression tests for some of the crazy things
net:ssleay does.
This is currently marked as expected to fail, it will be expected to
succeed after a forthcoming commit from me.
claudio [Wed, 1 Sep 2021 08:09:41 +0000 (08:09 +0000)]
Add http_proxy support to rpki-client's http handler.
OK tb@
mpi [Wed, 1 Sep 2021 08:06:49 +0000 (08:06 +0000)]
Imitate how free(3) behaves and make map_clear() works on NULL map.
mpi [Wed, 1 Sep 2021 08:01:09 +0000 (08:01 +0000)]
Always print non-empty map & hist on exit even if there's an END rule.
Match bpftrace behavior.
mpi [Wed, 1 Sep 2021 07:35:21 +0000 (07:35 +0000)]
Support for insert pid/tid/cpu builtins in map/hist.
dtucker [Wed, 1 Sep 2021 03:16:06 +0000 (03:16 +0000)]
Fix ssh-rsa fallback for old PuTTY interop tests.
dtucker [Wed, 1 Sep 2021 00:50:27 +0000 (00:50 +0000)]
Add a function to skip remaining tests. Many tests skip tests for
various reasons but not in a consistent way and don't always clean
up, so add that and switch the tests that do that over.
kn [Tue, 31 Aug 2021 23:53:42 +0000 (23:53 +0000)]
Honour netinet6 when generating symlinks to tags files
"make tags" needs "make links" to have tags available in subdirectories and
netinet6 has been missing all the time.
OK tb
bluhm [Tue, 31 Aug 2021 23:33:05 +0000 (23:33 +0000)]
Make include bsd.prog.mk is supporting PROGS for a while. Allow
multiple programs also in bsd.regress.mk for consistency.
OK anton@
patrick [Tue, 31 Aug 2021 23:05:11 +0000 (23:05 +0000)]
Implement suspend/resume for bwfm(4) with PCIe backend. We try to send the
device into D3 and do a hot-resume if possible. Otherwise we need to clean
up the resources to allow complete HW re-initialization to take place.
jmatthew [Tue, 31 Aug 2021 22:56:24 +0000 (22:56 +0000)]
regen
jmatthew [Tue, 31 Aug 2021 22:55:56 +0000 (22:55 +0000)]
Add Aquantia USB ethernet devices
from Brad originally
patrick [Tue, 31 Aug 2021 21:46:00 +0000 (21:46 +0000)]
Clean up the list of chips upon detach and mark us uninitialized.
patrick [Tue, 31 Aug 2021 21:13:24 +0000 (21:13 +0000)]
Properly deallocate some more structures upon detach, and make sure we're
not considered initialized anymore.
patrick [Tue, 31 Aug 2021 21:02:09 +0000 (21:02 +0000)]
Initialize some struct variables to make sure that upon reinit, caused by
a suspend/resume cycle, the values are set to a sane default.
patrick [Tue, 31 Aug 2021 20:58:51 +0000 (20:58 +0000)]
Initialize ring read/write pointers to make sure that upon reinit, caused
by a suspend/resume cycle, the pointers are set to a sane default.
kn [Tue, 31 Aug 2021 20:28:45 +0000 (20:28 +0000)]
Adjust .Bl width
kn [Tue, 31 Aug 2021 20:18:03 +0000 (20:18 +0000)]
Say autoconf not dhcp
Do not abuse "dhcp" to say "DHCP and SLAAC".
unwind.conf(5) does so but unwindctl(8) does not; in fact, the latter
already has `status autoconf' to
Show nameservers learned from dhclient(8), dhcpleased(8) or slaacd(8).
Adjust unwind's config manual and internal code accordingly; still accept
the old keyword but do not document it.
hostname.if(5) already advises for `inet[6] autoconf' instead of `dhcp' and
other related daemons don't abuse the word "dhcp" like unwind does.
Feedback sthen
OK florian
tb [Tue, 31 Aug 2021 20:14:40 +0000 (20:14 +0000)]
Remove some dead code that was missed in an earlier cleanup and
fix a stale comment.
Found by mortimer with clang 13's -Wunused-but-set-variable.
ok beck
florian [Tue, 31 Aug 2021 18:12:47 +0000 (18:12 +0000)]
Make includes follow style(9).
dv [Tue, 31 Aug 2021 17:40:59 +0000 (17:40 +0000)]
vmm(4): add ipi for vmclear, unlock kernel
On Intel VMX hosts, when a guest migrates cpus, VMCS state needs
to be flushed to physical memory before being reloaded on the new
cpu. This diff adds a new ipi to allow a guest resuming on a new
cpu to signal to the old that it needs to vmclear.
To better surface the potential race conditions, unlock the kernel
after handling the ioctl to vmm and simplify the run loops for both
vmx and svm. This requires a new vcpu lock.
Tested by some on tech@. "go for it" @mlarkin
patrick [Tue, 31 Aug 2021 15:53:36 +0000 (15:53 +0000)]
Only use the i8254 delay code if we are specifically using the i8254 as
delay func. Otherwise simply delay for a second to calibrate the LAPIC.
Install the lapic delay func only if we were using the i8254 before as
delay func.
Discussed with the hackroom
ok kettenis@
patrick [Tue, 31 Aug 2021 15:52:59 +0000 (15:52 +0000)]
Identify the paravirtual bus earlier, as we need to make sure that we have
a working delay func ready before the first occurence of delay(). This is
necessary on Hyper-V Gen 2 VMs where we don't use the TSC.
Discussed with the hackroom
ok kettenis@
patrick [Tue, 31 Aug 2021 15:52:10 +0000 (15:52 +0000)]
When running on Hyper-V, make use of its timecounter as delay func in case
we're still using the i8254 for that. On Hyper-V Gen 2 VMs there is no
i8254 we can trust, so we need some kind of fallback, especially if there
is no TSC either.
Discussed with the hackroom
ok kettenis@
kettenis [Tue, 31 Aug 2021 15:37:40 +0000 (15:37 +0000)]
aplpinctrl(4)
claudio [Tue, 31 Aug 2021 15:31:28 +0000 (15:31 +0000)]
Swap lock flags so that LK_EXCLUSIVE is first like in all other places.
kettenis [Tue, 31 Aug 2021 15:21:19 +0000 (15:21 +0000)]
Do pinctrl stuff.
ok patrick@