jsg [Fri, 14 Jan 2022 00:14:39 +0000 (00:14 +0000)]
Computng -> Computing
robert [Thu, 13 Jan 2022 19:05:00 +0000 (19:05 +0000)]
add a dummy -t flag to llvm-ranlib to match binutils' ranlib's -t flag which
is a no-op; ok millert@
jmc [Thu, 13 Jan 2022 18:39:14 +0000 (18:39 +0000)]
fix the -width argument;
claudio [Thu, 13 Jan 2022 14:58:21 +0000 (14:58 +0000)]
Move mft_check() after setting repoid and path on the mft.
Also skip mft_check() if the mft is stale because at least in -n mode
the files to check are probably not around.
OK tb@
claudio [Thu, 13 Jan 2022 14:57:02 +0000 (14:57 +0000)]
Move some functions around to reduce diff with an upcoming change.
OK tb@
visa [Thu, 13 Jan 2022 14:15:27 +0000 (14:15 +0000)]
Make bpf event filter MP-safe
Use bd_mtx to serialize bpf knote handling. This allows calling the
event filter without the kernel lock.
OK mpi@
visa [Thu, 13 Jan 2022 14:12:02 +0000 (14:12 +0000)]
Return an error if bpfilter_lookup() fails in bpfkqfilter()
The lookup should not fail because the kernel lock should prevent
simultaneous detaching on the vnode layer. However, most other device
kqfilter routines check the lookup's outcome anyway, which is maybe
a bit more forgiving.
OK mpi@
claudio [Thu, 13 Jan 2022 13:46:03 +0000 (13:46 +0000)]
Alter valid_filehash() to take a file descriptor instead of a path.
This is needed so that callers can allow a file to be in multiple
locations. Also move mft_check() from mft.c to parser.c.
OK tb@
claudio [Thu, 13 Jan 2022 13:18:41 +0000 (13:18 +0000)]
Implement a RRDP_CLEAR message that instructs the parent to cleanup
the rrdp directory. This is used before a snapshot download to ensure
that the snapshot is applied to a clean repo.
Similar cleanup happens if the transfer fails. In that case remove the
temp directory contents only.
This uses a new function remove_contents() to remove everything below
a base directory (a bit like rm -r X/*).
OK tb@
espie [Thu, 13 Jan 2022 12:21:22 +0000 (12:21 +0000)]
allow disabling the @ts tweak, which may come in handy for new fw_update
that doesn't grok them.
claudio [Thu, 13 Jan 2022 11:50:29 +0000 (11:50 +0000)]
Implement but don't use code to use rsync's --compare-dest feature.
One gotcha is that the path passed to --compare-dest needs to be relative
to the dst directory. rsync_fixup_dest() will prepend the necessary ../
for that by counting number of '/' in dst.
OK tb@
claudio [Thu, 13 Jan 2022 11:47:44 +0000 (11:47 +0000)]
Add the same entityq_flush() logic in ta_lookup() as it is done in
repo_lookup(). This fixes -n mode.
OK tb@
espie [Thu, 13 Jan 2022 11:23:47 +0000 (11:23 +0000)]
be more explicit about the current package format and why it's so.
martijn [Thu, 13 Jan 2022 10:34:58 +0000 (10:34 +0000)]
Adapt to changed debugging output
martijn [Thu, 13 Jan 2022 10:34:07 +0000 (10:34 +0000)]
Move parsing of incoming syslog messages to their own section.
This should make it more manageable.
No functional change intended, debugging output slightly changed.
help from and OK bluhm@
kettenis [Thu, 13 Jan 2022 08:59:10 +0000 (08:59 +0000)]
Implement powerdown. This involves writing a magic bit somewhere in the
address space of the SPMI PMU to prevent the machine from immediately
starting up again.
The implementaton makes aplpmu(4) provide powerdownfn(), which sets the
magic bit and then chains into cpuresetfn(). It also makes aplsmc(4)
provide cpuresetfn() to reset the machine via the SMC. Resetting via
the watchdog works as well (and will powerdown the machine if the magic
bit is set) but letting the SMC handle things might do some other
required steps.
ok patrick@
schwarze [Thu, 13 Jan 2022 08:39:24 +0000 (08:39 +0000)]
Tedu support for the -xsh4.2 argument to the mdoc(7) .St macro
because all of the following hold:
* It is an alias for a part of an ancient standard that is no longer important.
* To refer to that old standard, -xpg4.2 is readily available and portable.
* It is unused in OpenBSD, FreeBSD, and NetBSD.
* Groff never supported it.
I agreed with G. Branden Robinson that deleting this from mandoc
is preferable to adding it to groff.
schwarze [Thu, 13 Jan 2022 05:10:46 +0000 (05:10 +0000)]
Calling MB_CUR_MAX is much more expensive than incrementing a pointer
and than testing and printing a byte, so do it once up front rather
than inside the inner loop. This speeds up rev(1) by about a factor
of three for typical use cases.
Performance issue found by cheloha@, but my fix is a bit simpler
and more rigorous than Scott's original patch.
While here, also add the missing handling for write errors (making
them fatal, whereas read errors remain non-fatal and proceed to the
next input file) and also avoid testing each byte twice, making the
code more straightforward and more readable.
In part using ideas from millert@ and martijn@.
OK martijn@.
dtucker [Thu, 13 Jan 2022 04:53:16 +0000 (04:53 +0000)]
Set LC_ALL in both local and remote shells so that sorted output
matches regardless of what the user's shell sets it to. ok djm@
dtucker [Thu, 13 Jan 2022 04:22:10 +0000 (04:22 +0000)]
Avoid %'s in commands (not used in OpenBSD, but used in -portable's
Valgrind test) being interpretted as printf format strings.
schwarze [Thu, 13 Jan 2022 04:06:10 +0000 (04:06 +0000)]
Only sort the result array if it contains more than one element,
making the mansearch() function easier to read for human auditors.
No functional change on OpenBSD.
As observed by Mark Millard <marklmi at yahoo dot com>, neither the
latest version of POSIX 2008 nor C11 defines what qsort(3) should do
for base == NULL && nmemb == 0.
My impression is it is indeed undefined behaviour because the
standards say that base shall point to an array, NULL does not point
to an array, and while there is special wording saying that compar()
shall not be called if nmemb == 0, i fail to see any similar wording
stating that base shall not be accessed if nmemb == 0.
Consequently, this patch is also likely to improve standard conformance
and portability.
Minor issue found by Stefan Esser <se at FreeBSD> with UBSAN.
He sent a patch to bugs@, but my patch differs in a minor way.
tb [Wed, 12 Jan 2022 22:55:51 +0000 (22:55 +0000)]
zap some stray whitespace
tb [Wed, 12 Jan 2022 22:52:40 +0000 (22:52 +0000)]
seperators -> separators
tb [Wed, 12 Jan 2022 22:51:44 +0000 (22:51 +0000)]
zap spaces before tabs
tb [Wed, 12 Jan 2022 22:49:53 +0000 (22:49 +0000)]
gratuitious -> gratuitous
guenther [Wed, 12 Jan 2022 21:41:06 +0000 (21:41 +0000)]
Lift the '#ifdef RCRT0' conditional out of boot*.h to crt0.c
Prep for dropping #includes from archdep.h: pull in <machine/reloc.h>
and declare _dl_exit() in boot*.h
ok kettenis@
mbuhl [Wed, 12 Jan 2022 20:17:08 +0000 (20:17 +0000)]
fixup previous refactoring
OK stsp@ (without assuming any responsibility for NFS)
anton [Wed, 12 Jan 2022 19:55:12 +0000 (19:55 +0000)]
Extend the verbose logging.
tb [Wed, 12 Jan 2022 17:55:45 +0000 (17:55 +0000)]
sync
tb [Wed, 12 Jan 2022 17:54:51 +0000 (17:54 +0000)]
ASN1_{,F,T}BOOLEAN_it and the encoding and decoding API will move
to internal only soon. Stop documenting them.
ok inoguchi jsing
martijn [Wed, 12 Jan 2022 15:32:15 +0000 (15:32 +0000)]
Enable commandl1, commandl2, and commandD1.
D1 already worked.
l1 and l2 fixed after analysis by seL4 <at> disroot <dot> org
martijn [Wed, 12 Jan 2022 15:13:36 +0000 (15:13 +0000)]
Make lputs use psl instead of expecting it to be null-terminated.
This allows us to enable the commandl1 and commandl2 regress tests.
Original analysis from seL4 <at> disroot <dot> org
OK millert@
robert [Wed, 12 Jan 2022 15:05:38 +0000 (15:05 +0000)]
toggle hw.power based on the ACDI SMR key if available
ok kettenis@
robert [Wed, 12 Jan 2022 13:09:29 +0000 (13:09 +0000)]
set cpuspeed to 0 if hw.cpuspeed cannot be retrieved
ok kettenis@
robert [Wed, 12 Jan 2022 13:08:06 +0000 (13:08 +0000)]
add three new SMC sensors to get information about the power supply status
and remaining time to battery full and empty and feed these values to
apm(4)
ok kettenis@
kettenis [Wed, 12 Jan 2022 11:42:17 +0000 (11:42 +0000)]
Fix array index. Spotted by robert@
patrick [Wed, 12 Jan 2022 11:18:30 +0000 (11:18 +0000)]
Make acpi_getpropint() return uint64_t, as ACPI integers are in fact that
wide and some _DSD properties depend on it.
ok kettenis@
tb [Wed, 12 Jan 2022 09:11:48 +0000 (09:11 +0000)]
Only evp_pkey_check needs static linking
tb [Wed, 12 Jan 2022 09:04:40 +0000 (09:04 +0000)]
Add a prototype for OBJ_bsearch_ so this test will keep working
after the bump. Since this tests the public interfaces, we do not
want to use LIBRESSL_INTERNAL/LIBRESSL_CRYPTO_INTERNAL here.
tb [Wed, 12 Jan 2022 09:02:34 +0000 (09:02 +0000)]
Rework ecdsatest to build after the bump and link statically for now
tb [Wed, 12 Jan 2022 08:59:56 +0000 (08:59 +0000)]
Rework dsatest to use accessors and link statically for now
tb [Wed, 12 Jan 2022 08:58:12 +0000 (08:58 +0000)]
Rework dhtest to use accessors and link statically for now
For some reason CVS didn't want to commit this the first time around.
tb [Wed, 12 Jan 2022 08:56:49 +0000 (08:56 +0000)]
Rework dhtest to use accessors and link statically for now
tb [Wed, 12 Jan 2022 08:54:23 +0000 (08:54 +0000)]
Rework test to use EVP_AEAD_CTX_{new,free}() and link statically for now
tb [Wed, 12 Jan 2022 08:52:25 +0000 (08:52 +0000)]
Fix typo in header guard
tb [Wed, 12 Jan 2022 08:45:09 +0000 (08:45 +0000)]
Fix asn1x509 build with opaque structures. Link statically for now.
stsp [Wed, 12 Jan 2022 08:29:27 +0000 (08:29 +0000)]
Remove ieee80211_find_node_for_beacon().
The original purpose of ieee80211_find_node_for_beacon() was to avoid
storing duplicate nodes with the same source MAC address in a hash table.
Later on, our node table data structure was changed from a hash table
to an RB tree. The RB tree can only store a single node per MAC address.
However, find_node_for_beacon() was kept regardless, now documented to
serve a different purpose.
Its new purpose is to tell apart different nodes which happen to use
the same MAC address and hence cannot both be stored in the RB tree.
The idea is to filter such duplicate nodes out during a scan. But colliding
nodes are told apart by RSSI and channel, and either may change over time.
So this does not really prevent duplicate MAC addresses from causing issues.
The code which decides which node is "better" can erroneously match an
AP against itself, in case the AP uses a hidden SSID. This caused
workarounds for hidden SSID to pile up over time.
Just a bit further down, the code looks up the same node again and
performs all of the intended node state updates. Simply skipping the
ieee80211_find_node_for_beacon() check makes such state updates work.
ok tobhe@
tb [Wed, 12 Jan 2022 07:55:25 +0000 (07:55 +0000)]
Rework Makefile to use regress framework and link asn1basic statically.
It will need this for testing {d2i,i2d}_ASN1_BOOLEAN which will be
moved to internal-only in the upcoming bump.
dtucker [Wed, 12 Jan 2022 07:18:37 +0000 (07:18 +0000)]
Use egrep when searching for an anchored string.
schwarze [Wed, 12 Jan 2022 04:53:57 +0000 (04:53 +0000)]
More accurately represent cells containing horizontal lines in -T tree
output. In particular, do not represent "_" as "-", and distinguish "_"
from "\_" and "=" from "\=".
Output tweak following a related question from
Ted Bullock <tbullock at comlore dot com>.
schwarze [Wed, 12 Jan 2022 04:43:21 +0000 (04:43 +0000)]
According to the tbl(7) manual, if a data cell contains only the
two character sequence "\_" or "\=", a single or double horizontal
line is supposed to be drawn inside the cell, not joining its
neighbours.
I am not aware of any way to do that with HTML and/or CSS.
Still, it seems closer to the intent of the document author to draw
a horizontal line with <hr/>, even though that line will join the
neighbour cells, rather than printing a literal '_' or '=' character.
Formatting tweak inspired by a related question from
Ted Bullock <tbullock at comlore dot com>.
schwarze [Wed, 12 Jan 2022 04:14:20 +0000 (04:14 +0000)]
In one of the examples, the tbl(7) source code displayed
contains a backslash that needs to be escaped, and the
missing escaping resulted in very misleading formatting.
Documentation bug found due to a question from
Ted Bullock <tbullock at comlore dot com>.
dtucker [Wed, 12 Jan 2022 03:30:32 +0000 (03:30 +0000)]
Don't log NULL hostname in restricted agent code, printf("%s", NULL) is
not safe on all platforms. with & ok djm
afresh1 [Wed, 12 Jan 2022 02:21:15 +0000 (02:21 +0000)]
Bug fixes and performance improvements
Plus improving usage to match the man page
fine deraadt@
jsg [Wed, 12 Jan 2022 01:19:24 +0000 (01:19 +0000)]
maxumum -> maximum
kevlo [Wed, 12 Jan 2022 00:58:48 +0000 (00:58 +0000)]
Remove -target riscv64-unknown-openbsd from CMACHFLAGS.
ok kettenis@ deraadt@
jsg [Tue, 11 Jan 2022 23:59:55 +0000 (23:59 +0000)]
spelling
jsg [Tue, 11 Jan 2022 23:10:11 +0000 (23:10 +0000)]
spelling
djm [Tue, 11 Jan 2022 22:33:16 +0000 (22:33 +0000)]
remove hardcoded domain and use window.location.host, so this can
be run anywhere
jsg [Tue, 11 Jan 2022 21:41:15 +0000 (21:41 +0000)]
Jasper Lake eMMC needs the same 0V quirk as Apollo Lake and Gemini Lake
fixes accessing eMMC on Acer Swift 1 SF114-34
problem reported and fix tested by Sven Wolf
tobhe [Tue, 11 Jan 2022 20:34:22 +0000 (20:34 +0000)]
Make sure 'out' is initialized to 0 before adding flags.
ok dv@ mlarkin@
tb [Tue, 11 Jan 2022 19:27:35 +0000 (19:27 +0000)]
forgot to zap some dead assignments
tb [Tue, 11 Jan 2022 19:20:36 +0000 (19:20 +0000)]
Add regress for EVP_PKEY_{,public_,param_}check()
jsing [Tue, 11 Jan 2022 19:08:08 +0000 (19:08 +0000)]
Revise for peer_cert.
tb [Tue, 11 Jan 2022 19:06:23 +0000 (19:06 +0000)]
Convert relayd for opaque RSA_METHOD
This is a mostly mechanical diff which will hopefully be superseded
soon by work in libtls.
ok jsing
jsing [Tue, 11 Jan 2022 19:03:15 +0000 (19:03 +0000)]
Remove peer_pkeys from SSL_SESSION.
peer_pkeys comes from some world where peers can send multiple certificates
- in fact, one of each known type. Since we do not live in such a world,
get rid of peer_pkeys and simply use peer_cert instead (in both TLSv1.2
and TLSv1.3, both clients and servers can only send a single leaf
(aka end-entity) certificate).
ok inoguchi@ tb@
jsing [Tue, 11 Jan 2022 18:43:00 +0000 (18:43 +0000)]
Simplify SSL_get_peer_certificate()
ok inoguchi@ tb@
jsing [Tue, 11 Jan 2022 18:39:28 +0000 (18:39 +0000)]
Rename 'peer' to 'peer_cert' in SSL_SESSION.
The 'peer' member of SSL_SESSION is the leaf/end-entity certificate
provided by our peer. Rename it since 'peer' on its own is unhelpful.
ok inoguchi@ tb@
jsing [Tue, 11 Jan 2022 18:29:10 +0000 (18:29 +0000)]
Revise for changes to tls_key_share_peer_public()
jsing [Tue, 11 Jan 2022 18:28:41 +0000 (18:28 +0000)]
Plumb decode errors through key share parsing code.
Distinguish between decode errors and other errors, so that we can send
a SSL_AD_DECODE_ERROR alert when appropriate.
Fixes a tlsfuzzer failure, due to it expecting a decode error alert and
not receiving one.
Prompted by anton@
ok tb@
jsing [Tue, 11 Jan 2022 18:24:03 +0000 (18:24 +0000)]
Use SSL_AD_INTERNAL_ERROR for non-decoding alerts when parsing keyshares.
ok tb@
jsing [Tue, 11 Jan 2022 18:22:16 +0000 (18:22 +0000)]
Simplify tlsext_keyshare_server_parse()
SSL_AD_DECODE_ERROR is the default alert for a TLS extension parsing
failure - remove the various gotos and simply return 0 instead.
ok tb@
kettenis [Tue, 11 Jan 2022 16:54:58 +0000 (16:54 +0000)]
Bump KVA space up to 512MB (and a bit).
ok phessler@, deraadt@, miod@
inoguchi [Tue, 11 Jan 2022 16:06:48 +0000 (16:06 +0000)]
Wrap long lines
inoguchi [Tue, 11 Jan 2022 15:45:00 +0000 (15:45 +0000)]
Check function return value
inoguchi [Tue, 11 Jan 2022 15:05:58 +0000 (15:05 +0000)]
Suppress warning
inoguchi [Tue, 11 Jan 2022 15:02:34 +0000 (15:02 +0000)]
Compare pointer variable with NULL
inoguchi [Tue, 11 Jan 2022 14:35:14 +0000 (14:35 +0000)]
Remove space between '*' and pointer variable.
inoguchi [Tue, 11 Jan 2022 14:23:05 +0000 (14:23 +0000)]
Convert openssl(1) smime option handling
Apply new option handling to openssl(1) smime and no functional changes.
input and ok jsing@
claudio [Tue, 11 Jan 2022 13:06:07 +0000 (13:06 +0000)]
Change the way the parser accesses files. It now builds the file path
based on information from the repository, a local path and the filename.
This simplifies some code both in the main process and the parser.
For this to work repositories are passed to the parser before any other
entity of this repository is passed. Struct entity is extended to include
the repoid and the path along the file(name).
Input and OK tb@ & job@
tb [Tue, 11 Jan 2022 12:14:07 +0000 (12:14 +0000)]
Garbage collect historical setting of dsa->write_params = 1.
This is always 1 with modern libs and write_params will soon go away.
uaa [Tue, 11 Jan 2022 11:51:14 +0000 (11:51 +0000)]
add Synopsys Degisnware UART (dw-apb-uart) support
To fix Allwinner H6's UART problem, need to add dw-apb-uart special code.
ok kettenis@
claudio [Tue, 11 Jan 2022 10:34:13 +0000 (10:34 +0000)]
Remove KASSERT(0) and default switch case. No other sc_ncm_format
switch has a default case and umb_ncm_setup_format() ensures that
only 16 and 32bit formats are accepted. Fixes build error without
DIAGNOSTIC set.
Found by and OK robert@
uaa [Tue, 11 Jan 2022 10:23:17 +0000 (10:23 +0000)]
fix RSB_DMCR_DEVICE_MODE_DATA value to enter RSB mode correctly
ok kettenis@ patrick@
jsg [Tue, 11 Jan 2022 09:21:34 +0000 (09:21 +0000)]
spelling
sashan [Tue, 11 Jan 2022 09:00:17 +0000 (09:00 +0000)]
move allocations in DIOCSADDRULE and DIOCHANGERULE outside of locks.
this diff lets pf_rule_copyin() to be called outside of PF_LOCK()/NET_LOCK().
OK bluhm@
mvs [Tue, 11 Jan 2022 08:10:03 +0000 (08:10 +0000)]
regen
mvs [Tue, 11 Jan 2022 08:09:14 +0000 (08:09 +0000)]
Unlock getpeername(2). For inet and unix sockets it follows the code
which was unlocked with accept(2) unlocking. For key management and
route domain sockets it just copies the read-only data.
ok bluhm@
mvs [Tue, 11 Jan 2022 08:03:25 +0000 (08:03 +0000)]
Produce alive in-flight sockets with positive "f_count == unp_msgcount"
equation. Such sockets should not be killed by unp_gc() otherwise system
will panic.
tested by anton@; ok bluhm@
semarie [Tue, 11 Jan 2022 07:31:50 +0000 (07:31 +0000)]
move kern_unveil.c to use DPRINTF()
Changes the way printf debug is done in kern_unveil.c
Currently, each printf() is enclosed in #ifdef DEBUG_UNVEIL. It moves
to using DPRINTF(), and reduces the number of #ifdef inside the file.
Also changes some strings to use __func__ instead of using the
function name verbatim.
ok visa@
visa [Tue, 11 Jan 2022 06:35:03 +0000 (06:35 +0000)]
Remove dead store to f and avoid use of unvalidated fd.
Found by LLVM scan-build.
OK millert@ deraadt@
anton [Tue, 11 Jan 2022 06:23:05 +0000 (06:23 +0000)]
Add temporary verbose logging when remote coverage fails to attach.
In the hopes of tracking down a rare bug seen on syzkaller.
anton [Tue, 11 Jan 2022 06:01:15 +0000 (06:01 +0000)]
no need to inspect the coverage for the dying test case
anton [Tue, 11 Jan 2022 06:00:41 +0000 (06:00 +0000)]
In revision 1.43 of kcov.c, the redundant conditional of checking for
an exising kcov descriptor with the given device minor was removed since
kcov is a cloning device; i.e. the device minor should always be unique.
However, there's one edge case to still consider in which one thread
have tracing enabled while another thread closes the same kcov
descriptor. The kcov descriptor is kept alive until thread with tracing
enabled exits to prevent usage after free. This does however cause the
spec file layer above to flag the device minor as unused. Any subsequent
open of /dev/kcov would trip on the assertion in kcovopen() until the
thread with tracing enabled exits.
Therefore unconditionally remove the kcov descriptor from the global
list of active descriptors which is fine since the same kcov descriptor
will later be freed in kcov_exit().
I have never seen this in the wild but realized while hunting another
bug.
jsg [Tue, 11 Jan 2022 05:34:32 +0000 (05:34 +0000)]
spelling
afresh1 [Tue, 11 Jan 2022 03:25:52 +0000 (03:25 +0000)]
Tidy up some comments
requested by deraadt@
jsg [Tue, 11 Jan 2022 03:13:58 +0000 (03:13 +0000)]
spelling
ok jmc@
dtucker [Tue, 11 Jan 2022 02:56:19 +0000 (02:56 +0000)]
"void" functions should not return anything. From Tim Rice via -portable.
djm [Tue, 11 Jan 2022 01:26:47 +0000 (01:26 +0000)]
suppress "Connection to xxx closed" messages at LogLevel >= error
bz3378; ok dtucker@
deraadt [Tue, 11 Jan 2022 00:58:32 +0000 (00:58 +0000)]
If the install media contains non-free /*firmware*.tgz files, use fw_update
to install them. This lets users usb-lift firmware on a preloaded install70.img
image like this:
# vnconfig install70.img
vnd0
# (mount /dev/vnd0a /mnt && cd /mnt && fw_update -F iwm iwx iwn intel)
# umount /mnt && vnconfig -u vnd0
The firmwares are installed after the sets, then all network drivers are
re-configured in the hope that new firmwares have showed up. The install
script continues to attempt a network firmware install, which might pull/update
additional firmwares.
work done with afresh1