openbsd
2 years agoUse the correct type for ssl_callback_ctrl()
tb [Fri, 14 Jan 2022 09:12:53 +0000 (09:12 +0000)]
Use the correct type for ssl_callback_ctrl()

2 years agoConvert the new record layers to opaque EVP_AEAD_CTX
tb [Fri, 14 Jan 2022 09:12:15 +0000 (09:12 +0000)]
Convert the new record layers to opaque EVP_AEAD_CTX

ok jsing

2 years agoConvert ssl_kex.c to opaque DH
tb [Fri, 14 Jan 2022 09:11:22 +0000 (09:11 +0000)]
Convert ssl_kex.c to opaque DH

Stop reaching into DH internals and use the new API functions instead.

ok inoguchi jsing

2 years agoUse BIO_next/BIO_set_next in ssl_lib.c
tb [Fri, 14 Jan 2022 09:10:11 +0000 (09:10 +0000)]
Use BIO_next/BIO_set_next in ssl_lib.c

Trivial conversion to cope with opaque BIO.

2 years agobio_ssl.c needs to peek into bio_local.h
tb [Fri, 14 Jan 2022 09:09:30 +0000 (09:09 +0000)]
bio_ssl.c needs to peek into bio_local.h

2 years agolibkeynote: fix build with opaque RSA and DSA
tb [Fri, 14 Jan 2022 09:08:03 +0000 (09:08 +0000)]
libkeynote: fix build with opaque RSA and DSA

This is a completely mechanical conversion to use accessors instead
of reaching inside the structs by hand.

ok millert

2 years agoUpdate Symbols.list
tb [Fri, 14 Jan 2022 09:06:02 +0000 (09:06 +0000)]
Update Symbols.list

ok inoguchi

2 years agoUnconditionally comment out OPENSSL_NO_RFC3779
tb [Fri, 14 Jan 2022 09:03:53 +0000 (09:03 +0000)]
Unconditionally comment out OPENSSL_NO_RFC3779

ok inoguchi jsing

2 years agoRemove header guard around RFC 3779 declarations
tb [Fri, 14 Jan 2022 09:01:36 +0000 (09:01 +0000)]
Remove header guard around RFC 3779 declarations

ok inoguchi jsing

2 years agoExpose Certificate Transparency symbols in headers
tb [Fri, 14 Jan 2022 08:59:30 +0000 (08:59 +0000)]
Expose Certificate Transparency symbols in headers

ok inoguchi jsing

2 years agoHide OBJ_bsearch_ from public visibility,
tb [Fri, 14 Jan 2022 08:56:00 +0000 (08:56 +0000)]
Hide OBJ_bsearch_ from public visibility,

This removes OBJ_bsearch_ex_() from the exported symbols and makes
OBJ_bsearch_() semi-private. It is still used in libssl.

While here, remove some hideous unused macros

ok inoguchi jsing

2 years agoMove ASN1_BOOLEAN to internal only.
tb [Fri, 14 Jan 2022 08:53:53 +0000 (08:53 +0000)]
Move ASN1_BOOLEAN to internal only.

This moves {d2i,i2d}_ASN1_BOOLEAN() to internal only. They are unused,
but help us testing the encoding.

ok jsing

2 years agoRemove check_defer and obj_cleanup_defer from public visibility
tb [Fri, 14 Jan 2022 08:52:05 +0000 (08:52 +0000)]
Remove check_defer and obj_cleanup_defer from public visibility

ok inoguchi jsing

2 years agoRemove name_cmp from public visibility
tb [Fri, 14 Jan 2022 08:50:25 +0000 (08:50 +0000)]
Remove name_cmp from public visibility

ok inoguchi jsing

2 years agoRemove all asn1_* symbols from public visibility
tb [Fri, 14 Jan 2022 08:43:06 +0000 (08:43 +0000)]
Remove all asn1_* symbols from public visibility

ok inoguchi jsing

2 years agoImplement new-style OpenSSL BIO callbacks
tb [Fri, 14 Jan 2022 08:40:57 +0000 (08:40 +0000)]
Implement new-style OpenSSL BIO callbacks

This provides support for new-style BIO callbacks in
BIO_{read,write,gets,puts}() and a helper function to
work out whether it should call the new or the old
style callback. It also adds a few typedefs and minor
code cleanup as well as the BIO_{get,set}_callback_ex()

from jsing, ok tb

2 years agoGarbage collect last use of EVP_ecdsa()
tb [Fri, 14 Jan 2022 08:38:48 +0000 (08:38 +0000)]
Garbage collect last use of EVP_ecdsa()

ok inoguchi jsing

2 years agoRemove legacy sign/verify from EVP_MD.
tb [Fri, 14 Jan 2022 08:38:05 +0000 (08:38 +0000)]
Remove legacy sign/verify from EVP_MD.

This removes m_dss.c, m_dss1.c, and m_ecdsa.c and the corresponding
public API EVP_{dss,dss1,ecdsa}().

This is basically the following OpenSSL commit. The mentioned change in
RSA is already present in rsa/rsa_pmeth.c.

ok inoguchi jsing

commit 7f572e958b13041056f377a62d3219633cfb1e8a
Author: Dr. Stephen Henson <steve@openssl.org>
Date:   Wed Dec 2 13:57:04 2015 +0000

    Remove legacy sign/verify from EVP_MD.

    Remove sign/verify and required_pkey_type fields of EVP_MD: these are a
    legacy from when digests were linked to public key types. All signing is
    now handled by the corresponding EVP_PKEY_METHOD.

    Only allow supported digest types in RSA EVP_PKEY_METHOD: other algorithms
    already block unsupported types.

    Remove now obsolete EVP_dss1() and EVP_ecdsa().

Reviewed-by: Richard Levitte <levitte@openssl.org>
Plus OpenSSL commit 625a9baf11c1dd94f17e5876b6ee8d6271b3921d for m_dss.c

2 years agoMake RSA, RSA_PSS_PARAMS and RSA_METHOD opaque
tb [Fri, 14 Jan 2022 08:34:39 +0000 (08:34 +0000)]
Make RSA, RSA_PSS_PARAMS and RSA_METHOD opaque

Move the struct internals to rsa_locl.h and provide a missing
typedef in ossl_typ.h.

ok inoguchi jsing

2 years agoMake structs in ocsp.h opaque
tb [Fri, 14 Jan 2022 08:32:26 +0000 (08:32 +0000)]
Make structs in ocsp.h opaque

This adds a little order to this pig sty.

ok inoguchi jsing

2 years agoMove ECDSA_SIG to ecs_locl.h
tb [Fri, 14 Jan 2022 08:31:03 +0000 (08:31 +0000)]
Move ECDSA_SIG to ecs_locl.h

We can't make ECDSA_METHOD opaque since it is still used in smtpd(8)

ok inoguchi jsing

2 years agoSimplify DSAPublicKey_it
tb [Fri, 14 Jan 2022 08:29:06 +0000 (08:29 +0000)]
Simplify DSAPublicKey_it

This was obtained by porting the OpenSSL commit below and then using
expand_crypto_asn1.go to unroll the new ASN.1 macros - actually the
ones from 987157f6f63 which fixed the omission of dsa_cb() in the
first commit.

ok inoguchi jsing

commit ea6b07b54c1f8fc2275a121cdda071e2df7bd6c1
Author: Dr. Stephen Henson <steve@openssl.org>
Date:   Thu Mar 26 14:35:49 2015 +0000

    Simplify DSA public key handling.

    DSA public keys could exist in two forms: a single Integer type or a
    SEQUENCE containing the parameters and public key with a field called
    "write_params" deciding which form to use. These forms are non standard
    and were only used by functions containing "DSAPublicKey" in the name.

    Simplify code to only use the parameter form and encode the public key
    component directly in the DSA public key method.

Reviewed-by: Richard Levitte <levitte@openssl.org>
2 years agoMake DSA opaque
tb [Fri, 14 Jan 2022 08:27:23 +0000 (08:27 +0000)]
Make DSA opaque

This moves DSA_SIG, DSA and DSA_METHOD to dsa_locl.h.

ok inoguchi jsing

2 years agoMake structs in dh.h opaque
tb [Fri, 14 Jan 2022 08:25:44 +0000 (08:25 +0000)]
Make structs in dh.h opaque

This moves the struct internals for DH and DH_METHOD to dh_local.h.

ok inoguchi jsing

2 years agoGarbage collect the unused OPENSSL_ITEM
tb [Fri, 14 Jan 2022 08:23:25 +0000 (08:23 +0000)]
Garbage collect the unused OPENSSL_ITEM

ok inoguchi jsing

2 years agoMake structs in comp.h opaque
tb [Fri, 14 Jan 2022 08:21:12 +0000 (08:21 +0000)]
Make structs in comp.h opaque

This moves COMP_CTX and COMP_METHOD to comp_local.h and provides
missing typedefs in ossl_typ.h.

ok inoguchi jsing

2 years agoMake structs in bio.h opaque
tb [Fri, 14 Jan 2022 08:18:55 +0000 (08:18 +0000)]
Make structs in bio.h opaque

Move BIO, BIO_METHOD and BIO_F_BUFFER_CTX to bio_local.h and provide
BIO typedef in ossl_typ.h.

ok inoguchi jsing

2 years agoGarbage collect the app_items field of ASN1_ADB
tb [Fri, 14 Jan 2022 08:16:13 +0000 (08:16 +0000)]
Garbage collect the app_items field of ASN1_ADB

This is unused and was removed in OpenSSL 5b70372d when it was
replaced with an ASN.1 ADB callback (which we don't support).

ok inoguchi jsing

2 years agoRemove NO_ASN1_FIELD_NAMES
tb [Fri, 14 Jan 2022 08:14:48 +0000 (08:14 +0000)]
Remove NO_ASN1_FIELD_NAMES

This follows OpenSSL commit 26f2412d.

ok inoguchi jsing

2 years agoRemove obsolete key formats
tb [Fri, 14 Jan 2022 08:12:31 +0000 (08:12 +0000)]
Remove obsolete key formats

This removes NETSCAPE_X509, NETSCAPE{,_ENCRYPTED}_PKEY, RSA_NET,
Netscape_RSA things. Some of the nasty tentacles that could go in
principle are used in some test suites, so we need to keep them...

All this was removed as part of OpenSSL commit 0bc2f365.

ok inoguchi jsing

2 years agoRemove ASN1_OBJECT internals from public visibility.
tb [Fri, 14 Jan 2022 08:09:18 +0000 (08:09 +0000)]
Remove ASN1_OBJECT internals from public visibility.

Move the struct declaration to asn1_locl.h and add a forward
declaration to ossl_typ.h. This makes struct visibility in the
asn1 headers match OpenSSL.

ok inoguchi jsing

2 years agoRemove HMAC_CTX_{init,cleanup}() and HMAC_init from public visibility
tb [Fri, 14 Jan 2022 08:06:03 +0000 (08:06 +0000)]
Remove HMAC_CTX_{init,cleanup}() and HMAC_init from public visibility

In OpenSSL commit 32fd54a9a3 HMAC_CTX_cleanup() was integrated into
HMAC_CTX_init(), then HMAC_CTX_init() was renamed to HMAC_CTX_reset()
in dc0099e1.

LibreSSL retained them for API compatibility with OpenSSL 1.0.
Not many things use them anymore. In fact, some projects that didn't
want to modify their code for OpenSSL 1.1 API compatibility used the
removed functions to wrap the OpenSSL 1.1 API. We had to patch some
of these and this will now no longer be necessary.

Also remove HMAC_cleanup(). Nothing uses this.

ok inoguchi jsing

2 years agoMake structs in evp.h and hmac.h opaque
tb [Fri, 14 Jan 2022 08:04:14 +0000 (08:04 +0000)]
Make structs in evp.h and hmac.h opaque

This moves most structs to evp_locl.h and moves HMAC_CTX to hmac_local.h.

ok inoguchi jsing

2 years agoMove BN structs to bn_lcl.h
tb [Fri, 14 Jan 2022 08:01:47 +0000 (08:01 +0000)]
Move BN structs to bn_lcl.h

This makes all structs in bn.h opaque that are also opaque in OpenSSL.

ok inoguchi jsing

2 years agoRemove BIO_s_file_internal
tb [Fri, 14 Jan 2022 07:59:32 +0000 (07:59 +0000)]
Remove BIO_s_file_internal

Pointed out by schwarze. How something with this name ever made
its way into a public header will remain a mystery.

ok inoguchi jsing

2 years agoRemove ASN1{_const,}_check_infinite_end
tb [Fri, 14 Jan 2022 07:57:17 +0000 (07:57 +0000)]
Remove ASN1{_const,}_check_infinite_end

Suggested by schwarze

ok inoguchi jsing

2 years agoRemove ASN1{,_const}_CTX
tb [Fri, 14 Jan 2022 07:55:29 +0000 (07:55 +0000)]
Remove ASN1{,_const}_CTX

These are leftovers of the old ASN.1 stuff. Nothing uses this.
OpenSSL removed them in a469a677.

ok inoguchi jsing

2 years agoRemove X509_OBJECT_free_contents
tb [Fri, 14 Jan 2022 07:53:45 +0000 (07:53 +0000)]
Remove X509_OBJECT_free_contents

Inline X509_OBJECT_free_contents() in X509_OBJECT_free() and
remove this dangerous API. It was left over when x509_vfy.h
was made opaque.

ok inoguchi jsing

2 years agoRemove PEM_Seal{Init,Update,Final}
tb [Fri, 14 Jan 2022 07:52:24 +0000 (07:52 +0000)]
Remove PEM_Seal{Init,Update,Final}

This unused, bug-ridden API was removed in OpenSSL commit 0674427f.

ok inoguchi jsing

2 years agoUnifdef LIBRESSL_OPAQUE_* and LIBRESSL_NEXT_API
tb [Fri, 14 Jan 2022 07:49:49 +0000 (07:49 +0000)]
Unifdef LIBRESSL_OPAQUE_* and LIBRESSL_NEXT_API

This marks the start of major surgery in libcrypto. Do not attempt to
build the tree for a while (~50 commits).

2 years agoupdate drm to linux 5.15.14
jsg [Fri, 14 Jan 2022 06:52:58 +0000 (06:52 +0000)]
update drm to linux 5.15.14

new hardware support includes

Intel
ehl/Elkhart Lake (embedded)
jsl/Jasper Lake (atom)
rkl/Rocket Lake (desktop)

AMD
van gogh APU (gfx1033)
yellow carp / rembrandt APU (gfx1035?)
        Ryzen 6000 APU
navy flounder / navi 22 (gfx1031)
        RX 6700, RX 6700 XT, RX 6700M, RX 6800M, RX 6850M XT
dimgrey cavefish / navi 23 (gfx1032)
        Pro W6600, Pro W6600M, RX 6600, RX 6600 XT, RX 6600M,
RX 6600S, RX 6650M, RX 6650M XT, RX 6700S, RX 6800S
beige goby / navi 24 (gfx1034)
        RX 6500 XT, RX 6400, RX 6500M, RX 6300M

Thanks to the OpenBSD Foundation for sponsoring this work
niklas@ for helping with ttm and amdgpu and patrick@ for adapting
rockchip drm.

2 years agoget the list of things in the full identifier right.
dlg [Fri, 14 Jan 2022 04:25:57 +0000 (04:25 +0000)]
get the list of things in the full identifier right.

2 years agoallow pin-required FIDO keys to be added to ssh-agent(1).
djm [Fri, 14 Jan 2022 03:43:48 +0000 (03:43 +0000)]
allow pin-required FIDO keys to be added to ssh-agent(1).
ssh-askpass will be used to request the PIN at authentication time.

From Pedro Martelletto, ok djm

2 years agossh-sk: free a resident key's user id
djm [Fri, 14 Jan 2022 03:35:10 +0000 (03:35 +0000)]
ssh-sk: free a resident key's user id

From Pedro Martelletto; ok dtucker & me

2 years agosshsk_load_resident: don't preallocate resp
djm [Fri, 14 Jan 2022 03:34:00 +0000 (03:34 +0000)]
sshsk_load_resident: don't preallocate resp

resp is allocated by client_converse(), at which point we lose
the original pointer.

From Pedro Martelletto; ok dtucker & me

2 years agosshsk_sign: trim call to sshkey_fingerprint()
djm [Fri, 14 Jan 2022 03:32:52 +0000 (03:32 +0000)]
sshsk_sign: trim call to sshkey_fingerprint()

the resulting fingerprint doesn't appear to be used for anything,
and we end up leaking it.

from Pedro Martelletto; ok dtucker & me

2 years agouse status error message to communicate ~user expansion failures;
djm [Fri, 14 Jan 2022 03:31:52 +0000 (03:31 +0000)]
use status error message to communicate ~user expansion failures;
provides better experience for scp in sftp mode, where ~user paths
are more likely to be used; spotted jsg, feedback jsg & deraadt
ok jsg & markus

(forgot to include this file in previous commit)

2 years agoComputng -> Computing
jsg [Fri, 14 Jan 2022 00:14:39 +0000 (00:14 +0000)]
Computng -> Computing

2 years agoadd a dummy -t flag to llvm-ranlib to match binutils' ranlib's -t flag which
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@

2 years agofix the -width argument;
jmc [Thu, 13 Jan 2022 18:39:14 +0000 (18:39 +0000)]
fix the -width argument;

2 years agoMove mft_check() after setting repoid and path on the mft.
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@

2 years agoMove some functions around to reduce diff with an upcoming change.
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@

2 years agoMake bpf event filter MP-safe
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@

2 years agoReturn an error if bpfilter_lookup() fails in bpfkqfilter()
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@

2 years agoAlter valid_filehash() to take a file descriptor instead of a path.
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@

2 years agoImplement a RRDP_CLEAR message that instructs the parent to cleanup
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@

2 years agoallow disabling the @ts tweak, which may come in handy for new fw_update
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.

2 years agoImplement but don't use code to use rsync's --compare-dest feature.
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@

2 years agoAdd the same entityq_flush() logic in ta_lookup() as it is done in
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@

2 years agobe more explicit about the current package format and why it's so.
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.

2 years agoAdapt to changed debugging output
martijn [Thu, 13 Jan 2022 10:34:58 +0000 (10:34 +0000)]
Adapt to changed debugging output

2 years agoMove parsing of incoming syslog messages to their own section.
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@

2 years agoImplement powerdown. This involves writing a magic bit somewhere in the
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@

2 years agoTedu support for the -xsh4.2 argument to the mdoc(7) .St macro
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.

2 years agoCalling MB_CUR_MAX is much more expensive than incrementing a pointer
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@.

2 years agoSet LC_ALL in both local and remote shells so that sorted output
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@

2 years agoAvoid %'s in commands (not used in OpenBSD, but used in -portable's
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.

2 years agoOnly sort the result array if it contains more than one element,
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.

2 years agozap some stray whitespace
tb [Wed, 12 Jan 2022 22:55:51 +0000 (22:55 +0000)]
zap some stray whitespace

2 years agoseperators -> separators
tb [Wed, 12 Jan 2022 22:52:40 +0000 (22:52 +0000)]
seperators -> separators

2 years agozap spaces before tabs
tb [Wed, 12 Jan 2022 22:51:44 +0000 (22:51 +0000)]
zap spaces before tabs

2 years agogratuitious -> gratuitous
tb [Wed, 12 Jan 2022 22:49:53 +0000 (22:49 +0000)]
gratuitious -> gratuitous

2 years agoLift the '#ifdef RCRT0' conditional out of boot*.h to crt0.c
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@

2 years agofixup previous refactoring
mbuhl [Wed, 12 Jan 2022 20:17:08 +0000 (20:17 +0000)]
fixup previous refactoring
OK stsp@ (without assuming any responsibility for NFS)

2 years agoExtend the verbose logging.
anton [Wed, 12 Jan 2022 19:55:12 +0000 (19:55 +0000)]
Extend the verbose logging.

2 years agosync
tb [Wed, 12 Jan 2022 17:55:45 +0000 (17:55 +0000)]
sync

2 years agoASN1_{,F,T}BOOLEAN_it and the encoding and decoding API will move
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

2 years agoEnable commandl1, commandl2, and commandD1.
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

2 years agoMake lputs use psl instead of expecting it to be null-terminated.
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@

2 years agotoggle hw.power based on the ACDI SMR key if available
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@

2 years agoset cpuspeed to 0 if hw.cpuspeed cannot be retrieved
robert [Wed, 12 Jan 2022 13:09:29 +0000 (13:09 +0000)]
set cpuspeed to 0 if hw.cpuspeed cannot be retrieved
ok kettenis@

2 years agoadd three new SMC sensors to get information about the power supply status
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@

2 years agoFix array index. Spotted by robert@
kettenis [Wed, 12 Jan 2022 11:42:17 +0000 (11:42 +0000)]
Fix array index.  Spotted by robert@

2 years agoMake acpi_getpropint() return uint64_t, as ACPI integers are in fact that
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@

2 years agoOnly evp_pkey_check needs static linking
tb [Wed, 12 Jan 2022 09:11:48 +0000 (09:11 +0000)]
Only evp_pkey_check needs static linking

2 years agoAdd a prototype for OBJ_bsearch_ so this test will keep working
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.

2 years agoRework ecdsatest to build after the bump and link statically for now
tb [Wed, 12 Jan 2022 09:02:34 +0000 (09:02 +0000)]
Rework ecdsatest to build after the bump and link statically for now

2 years agoRework dsatest to use accessors 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

2 years agoRework dhtest 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.

2 years agoRework dhtest to use accessors and link statically for now
tb [Wed, 12 Jan 2022 08:56:49 +0000 (08:56 +0000)]
Rework dhtest to use accessors and link statically for now

2 years agoRework test to use EVP_AEAD_CTX_{new,free}() 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

2 years agoFix typo in header guard
tb [Wed, 12 Jan 2022 08:52:25 +0000 (08:52 +0000)]
Fix typo in header guard

2 years agoFix asn1x509 build with opaque structures. Link statically for now.
tb [Wed, 12 Jan 2022 08:45:09 +0000 (08:45 +0000)]
Fix asn1x509 build with opaque structures. Link statically for now.

2 years agoRemove ieee80211_find_node_for_beacon().
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@

2 years agoRework Makefile to use regress framework and link asn1basic statically.
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.

2 years agoUse egrep when searching for an anchored string.
dtucker [Wed, 12 Jan 2022 07:18:37 +0000 (07:18 +0000)]
Use egrep when searching for an anchored string.

2 years agoMore accurately represent cells containing horizontal lines in -T tree
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>.

2 years agoAccording to the tbl(7) manual, if a data cell contains only the
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>.

2 years agoIn one of the examples, the tbl(7) source code displayed
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>.

2 years agoDon't log NULL hostname in restricted agent code, printf("%s", NULL) is
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