openbsd
2 years agobetter abstraction: instead of storing a string we're going to parse for
espie [Sun, 8 May 2022 13:21:04 +0000 (13:21 +0000)]
better abstraction: instead of storing a string we're going to parse for
signature dates, just annotate the PackageLocation with the info,
and decorate the PackingList itself when we finished reading it from the
location

2 years agoshow actual linking operations alongside renames if verbose >= 5
espie [Sun, 8 May 2022 11:42:28 +0000 (11:42 +0000)]
show actual linking operations alongside renames if verbose >= 5

2 years agonow we no longer go through temporary files when names don't change,
espie [Sun, 8 May 2022 11:06:06 +0000 (11:06 +0000)]
now we no longer go through temporary files when names don't change,
make the matching algorithm between the old and the new package more
precise: keep a list of matching checksums, instead of just one candidate.

For starters, empty files will always yield the same checksum, but it seems
some software (python for instance) loves installing multiple copies of
the same file.  This does prevent 500 "name mismatches" out of 2500 in
python-3.9, for instance.

2 years agoSort alphabetically so that future omissions will be easier to spot.
tb [Sat, 7 May 2022 17:20:41 +0000 (17:20 +0000)]
Sort alphabetically so that future omissions will be easier to spot.

discussed with jsing

2 years agoSplit asn1_item_ex_d2i() into three.
jsing [Sat, 7 May 2022 15:50:25 +0000 (15:50 +0000)]
Split asn1_item_ex_d2i() into three.

Factor out the handling of CHOICE and SEQUENCE into their own functions.
This reduces complexity, reduces indentation and will allow for further
clean up.

ok beck@ tb@

2 years agoNow that the internal versions of GPT partitions are host-endian,
krw [Sat, 7 May 2022 11:45:36 +0000 (11:45 +0000)]
Now that the internal versions of GPT partitions are host-endian,
simplify PRT_protected_guid() by comparing GUID's with
uuid_compare() rather than converting them to strings and using
strncmp().

Further clarify logic by doing the EFI Sys dance only if
the GUID being tested is not marked as protected.

No intentional functional change.

2 years agozap stray tab
tb [Sat, 7 May 2022 10:31:54 +0000 (10:31 +0000)]
zap stray tab

2 years agoKNF nits
tb [Sat, 7 May 2022 10:31:28 +0000 (10:31 +0000)]
KNF nits

2 years agoRewrite asn1_d2i_ex_primitive() with CBS.
jsing [Sat, 7 May 2022 10:13:56 +0000 (10:13 +0000)]
Rewrite asn1_d2i_ex_primitive() with CBS.

ok tb@

2 years agoRefactor asn1_ex_c2i()
jsing [Sat, 7 May 2022 10:03:49 +0000 (10:03 +0000)]
Refactor asn1_ex_c2i()

The asn1_ex_c2i() function currently handles the V_ASN1_ANY case inline,
which means there multiple special cases, with  pointer fudging and
restoring. Instead, split asn1_ex_c2i() into three functions - one that
only handles storage into a primitive type (asn1_ex_c2i_primitive()), one
that handles the V_ASN1_ANY case (asn1_ex_c2i_any()) and calls
asn1_ex_c2i_primitive() with the correct pointer and an asn1_ex_c2i()
that handles the custom functions case, before dispatching to
asn1_ex_c2i_any() or asn1_ex_c2i_primitive(), as appropriate.

This results in cleaner and simpler code.

With input from and ok tb@

2 years agoAvoid strict aliasing violations in BN_nist_mod_*()
jsing [Sat, 7 May 2022 07:47:24 +0000 (07:47 +0000)]
Avoid strict aliasing violations in BN_nist_mod_*()

The optimised code path switches from processing data via unsigned long to
processing data via unsigned int, which requires type punning. This is
currently attempted via a union (for one case), however this fails since
a pointer to a union member is passed to another function (these unions
were added to "fix strict-aliasing compiler warning" - it would seem the
warnings stopped but the undefined behaviour remained). The second case
does not use a union and simply casts from one type to another.

Undefined behaviour is currently triggered when compiling with clang 14
using -03 and -fstrict-aliasing, while disabling assembly (in order to use
this C code). The resulting binary produces incorrect results.

Avoid strict aliasing violations by copying from an unsigned long array to
an unsigned int array, then copying back the result. Any sensible compiler
will omit the copies, while avoiding undefined behaviour that would result
from unsafe type punning via pointer type casting.

Thanks to Guido Vranken for reporting the issue and testing the fix.

ok tb@

2 years agoRename PRT_uuid_to_[protection|typename] to PRT_uuid_to_[protected|sname],
krw [Fri, 6 May 2022 23:53:43 +0000 (23:53 +0000)]
Rename PRT_uuid_to_[protection|typename] to PRT_uuid_to_[protected|sname],
and PRT_type_to_uuid() to PRT_type_to_guid() so the names clearly match
the field names being searched for.

No intentional functional change.

2 years agoAdd missing ERR_load_{COMP,CT,KDF}_strings()
tb [Fri, 6 May 2022 20:49:01 +0000 (20:49 +0000)]
Add missing ERR_load_{COMP,CT,KDF}_strings()

ok beck

2 years agoRelax the limitation of what is an acceptable unicast IP.
claudio [Fri, 6 May 2022 15:51:09 +0000 (15:51 +0000)]
Relax the limitation of what is an acceptable unicast IP.

Remove the IN_BADCLASS() check which filters out the experimental IPv4
address space. Now there are no more experiments in IPv4 and so there
is less reason for these network daemons to deny such an IP.
Everything still disallows multicast IPs (224/4) and loopback (127/8)
a few also disallow 0/8 but this is not consistent.

In any case using 240/4 in production is a really bad idea but it is
not up to this software to prevent you from being a fool.

OK deraadt@ tb@

2 years agoWhen printing the GPT table, display "Microsoft basic data" instead of
krw [Fri, 6 May 2022 14:22:49 +0000 (14:22 +0000)]
When printing the GPT table, display "Microsoft basic data" instead of
"FAT12" for partition types that are mapped to GPT_UUID_MSDOS.

No intentional functional change.

2 years agoReplace selwakeup() with KNOTE() in kqueue event activation.
visa [Fri, 6 May 2022 13:12:16 +0000 (13:12 +0000)]
Replace selwakeup() with KNOTE() in kqueue event activation.

The deferred activation can now run in an MP-safe task queue.

2 years agoReplace selwakeup() with KNOTE() in pipe and socket event activation.
visa [Fri, 6 May 2022 13:09:41 +0000 (13:09 +0000)]
Replace selwakeup() with KNOTE() in pipe and socket event activation.

OK mpi@

2 years agoAlso check EVP_PKEY_CTX_new_id() return in example code. Letting this
tb [Fri, 6 May 2022 10:10:10 +0000 (10:10 +0000)]
Also check EVP_PKEY_CTX_new_id() return in example code. Letting this
be caught by the error check of EVP_PKEY_derive_init() is a dubious
pattern.

2 years agosync
tb [Fri, 6 May 2022 07:40:10 +0000 (07:40 +0000)]
sync

2 years agoInstall EVP_PKEY_CTX_set_hkdf_md.3
tb [Fri, 6 May 2022 07:39:21 +0000 (07:39 +0000)]
Install EVP_PKEY_CTX_set_hkdf_md.3

2 years agoDocument the EVP HKDF API
tb [Fri, 6 May 2022 07:36:54 +0000 (07:36 +0000)]
Document the EVP HKDF API

Manual from OpenSSL 1.1.1o with minimal tweaks.

input/ok schwarze

2 years agosync
deraadt [Fri, 6 May 2022 02:54:17 +0000 (02:54 +0000)]
sync

2 years agokstat(1): implement wait with setitimer(2) instead of nanosleep(2)
cheloha [Thu, 5 May 2022 22:36:36 +0000 (22:36 +0000)]
kstat(1): implement wait with setitimer(2) instead of nanosleep(2)

kstat(1)'s wait period drifts because nanosleep(2) uses a relative
timeout.  If we use setitimer(2)/sigsuspend(2) the period does not
drift.

While here, bump the upper bound for wait up to UINT_MAX and switch to
the normal strtonum(3) error message format.

With input from kn@.

Tweaked by bluhm@ to block SIGALRM with sigprocmask(2) while we're
outside of sigsuspend(2).

Thread: https://marc.info/?l=openbsd-tech&m=160038548111187&w=2

Earlier version ok millert@.

ok bluhm@

2 years agoFix watchdog in the installer.
florian [Thu, 5 May 2022 20:07:23 +0000 (20:07 +0000)]
Fix watchdog in the installer.

We only had one watchdog running that triggered after 30 minutes. If
an unattended upgrade (e.g. started by sysupgrade(8)) took longer than
this in total, the machine would reboot half way through an upgrade.
The intention was that the watchdog would be reset after each set
download and after each set installation. But this never worked
correctly because the actual upgrade ran in a sub-shell and WDPID was
not visible.
To fix this we first need to export WDPID to make it visible in the
sub-shell. Then reset_watchdog was guarded by $UU && reset_watchdog,
but UU wasn't visible either. But we can't export it because we would
enter a loop. We can just use the fact that WDPID is not empty to
restart the watchdog.
Lastly the watchdog process would keep stderr and stdout open. This
made the tee(1) hang that is collecting the autoupgrade log that is
mailed to root.
As a simplification, we don't need to run the watchdog as a
co-process, we don't want to communicate with it, we can just run it
in the background.
Problem reported by stsp
With & OK deraadt
OK millert

2 years agoCheck that the challenge token which is turned into a filename is
florian [Thu, 5 May 2022 19:51:35 +0000 (19:51 +0000)]
Check that the challenge token which is turned into a filename is
base64url encoded.
We have only the challenge directory unveil(2)'ed so funny business
like ../ will not work, but we shouldn't generate garbage filenames
that someone else might trip over either.
Pointed out and diff by Ali Farzanrad (ali_farzanrad AT riseup.net)
OK beck

2 years agoSimplify: freezero() is NULL safe; assign + test in one go, as usual.
tb [Thu, 5 May 2022 19:48:06 +0000 (19:48 +0000)]
Simplify: freezero() is NULL safe; assign + test in one go, as usual.

ok jsing

2 years agoAvoid malloc(0) in EVP_PKEY_CTX_set1_hkdf_key()
tb [Thu, 5 May 2022 19:46:36 +0000 (19:46 +0000)]
Avoid malloc(0) in EVP_PKEY_CTX_set1_hkdf_key()

ok jsing

2 years agoSecurely wipe the entire HKDF_PKEY_CTX instead of only taking care of
tb [Thu, 5 May 2022 19:44:23 +0000 (19:44 +0000)]
Securely wipe the entire HKDF_PKEY_CTX instead of only taking care of
a piece of the embedded info array.

ok jsing

2 years agoUse size_t for ASN.1 lengths.
jsing [Thu, 5 May 2022 19:18:56 +0000 (19:18 +0000)]
Use size_t for ASN.1 lengths.

Change asn1_get_length_cbs() and asn1_get_object_cbs() to handle and return
a length as a size_t rather than a uint32_t. This makes it simpler and less
error prone in the callers.

Suggested by and ok tb@

2 years agoSwitch wycheproof.go to using the EVP HKDF API.
tb [Thu, 5 May 2022 18:34:27 +0000 (18:34 +0000)]
Switch wycheproof.go to using the EVP HKDF API.

Gotta love EVP... Instead of a single, obvious call to HKDF(), you now
need to call eight EVP functions with plenty of allocations and pointless
copying internally. If you want to suffer even more, you could consider
using the gorgeous string interface instead.

2 years agoFix HMAC() with NULL key
tb [Thu, 5 May 2022 18:29:34 +0000 (18:29 +0000)]
Fix HMAC() with NULL key

If a NULL key is passed to HMAC_Init_ex(), it tries to reuse the
previous key. This makes no sense inside HMAC() since the HMAC_CTX
has no key set yet. This is hit by HKDF() with NULL salt() via the
EVP API and results in a few Wycheproof test failures. If key is
NULL, use a zero length dummy key.

This was not hit from wycheproof.go since we pass a []byte with a
single NUL from Go.

Matches OpenSSL if key is NULL and key_len is 0. If key_len != 0,
OpenSSL will still fail by passing a NULL key which makes no sense,
so set key_len to 0 instead.

ok beck jsing

2 years agoClean up divert_packet(). Function does not return error, make it
bluhm [Thu, 5 May 2022 16:44:22 +0000 (16:44 +0000)]
Clean up divert_packet().  Function does not return error, make it
void.  Introduce mutex and refcounting for inp like in the other
PCB functions.
OK sashan@

2 years agoAdd error handling if setting the keyboard encoding fails. After
bluhm [Thu, 5 May 2022 16:12:42 +0000 (16:12 +0000)]
Add error handling if setting the keyboard encoding fails.  After
open of all /dev/wskbd* devices failed, report the error from the
first one.  Also wrap long lines.
OK mpi@

2 years agoUpdate documentation for switch of default ruby version to 3.1
jeremy [Thu, 5 May 2022 15:45:05 +0000 (15:45 +0000)]
Update documentation for switch of default ruby version to 3.1

2 years agowe no longer announce rounding here
dv [Thu, 5 May 2022 15:42:04 +0000 (15:42 +0000)]
we no longer announce rounding here

2 years agoSwitch the log_warnx() about trailing garbage to log_debug(). After a
tb [Thu, 5 May 2022 14:44:59 +0000 (14:44 +0000)]
Switch the log_warnx() about trailing garbage to log_debug(). After a
maintenance window, my ISP started sending an unexpected 'ff' byte at
the very end which created noise in the log.  Apparently this came up
before.

From and ok florian

2 years agoUse static objects for struct rttimer_queue instead of dynamically
claudio [Thu, 5 May 2022 13:57:40 +0000 (13:57 +0000)]
Use static objects for struct rttimer_queue instead of dynamically
allocate them.

Currently there are 6 rttimer_queues and not many more will follow. So
change rt_timer_queue_create() to rt_timer_queue_init() which now takes
a struct rttimer_queue * as argument which will be initialized.
Since this changes the gloabl vars from pointer to struct adjust other
callers as well.
OK bluhm@

2 years agoregen
fcambus [Thu, 5 May 2022 12:29:14 +0000 (12:29 +0000)]
regen

2 years agoAdd ID for the AMD Sensor Fusion Hub found on my Ryzen-based ZBOX CA621.
fcambus [Thu, 5 May 2022 12:26:06 +0000 (12:26 +0000)]
Add ID for the AMD Sensor Fusion Hub found on my Ryzen-based ZBOX CA621.

OK jsg@

2 years agoFix argument order in HKDF and HKDF_extract().
tb [Thu, 5 May 2022 11:26:36 +0000 (11:26 +0000)]
Fix argument order in HKDF and HKDF_extract().

2 years agounbreak vmd(8) regress, update string matches
dv [Thu, 5 May 2022 11:19:18 +0000 (11:19 +0000)]
unbreak vmd(8) regress, update string matches

2 years agoFix line wrapping in wall(1).
bluhm [Thu, 5 May 2022 10:04:24 +0000 (10:04 +0000)]
Fix line wrapping in wall(1).
from Anton Borowka; OK mbuhl@

2 years agoUsing mutex initializer for static variable does not compile with
bluhm [Thu, 5 May 2022 09:45:15 +0000 (09:45 +0000)]
Using mutex initializer for static variable does not compile with
witness.  Make ratecheck mutex global.
Reported-by: syzbot+9864ba1338526d0e8aca@syzkaller.appspotmail.com
2 years agoAdd hkdf_pkey_meth to the standard_methods[]
tb [Thu, 5 May 2022 08:51:21 +0000 (08:51 +0000)]
Add hkdf_pkey_meth to the standard_methods[]

ok beck jsing

2 years agoLink kdf/ to the build
tb [Thu, 5 May 2022 08:50:35 +0000 (08:50 +0000)]
Link kdf/ to the build

ok beck jsing

2 years agoProvide EVP_PKEY_HKDF alias for NID_hkdf
tb [Thu, 5 May 2022 08:48:50 +0000 (08:48 +0000)]
Provide EVP_PKEY_HKDF alias for NID_hkdf

ok beck jsing

2 years agoProvide KDFerr() and KDFerror() macros
tb [Thu, 5 May 2022 08:48:05 +0000 (08:48 +0000)]
Provide KDFerr() and KDFerror() macros

ok beck jsing

2 years agoNo longer consider IN_EXPERIMENTAL aka 240/4 as not forwardable.
claudio [Thu, 5 May 2022 08:43:37 +0000 (08:43 +0000)]
No longer consider IN_EXPERIMENTAL aka 240/4 as not forwardable.
We already allow 240/4 in and out so lets allow it through as well.
One of many steps to make 240/4 useable.
Diff by Seth David Schoen (schoen at loyalty.org)
OK bluhm@ djm@

2 years agoProvide versions of EVP_PKEY_CTX_{str,hex}2ctrl() for internal use.
tb [Thu, 5 May 2022 08:42:27 +0000 (08:42 +0000)]
Provide versions of EVP_PKEY_CTX_{str,hex}2ctrl() for internal use.

ok beck jsing

2 years agoDitch #defines for tls1_prf and scrypt. Drop unused errors and massage
tb [Thu, 5 May 2022 08:24:14 +0000 (08:24 +0000)]
Ditch #defines for tls1_prf and scrypt. Drop unused errors and massage
some const.

ok beck jsing

2 years agoTranslate from OpenSSL's HKDF API to BoringSSL API.
tb [Thu, 5 May 2022 08:14:14 +0000 (08:14 +0000)]
Translate from OpenSSL's HKDF API to BoringSSL API.

ok beck jsing

2 years agoRemove function codes from errors, i.e., KDFerr(A, B) -> KDFerror(B)
tb [Thu, 5 May 2022 08:10:39 +0000 (08:10 +0000)]
Remove function codes from errors, i.e., KDFerr(A, B) -> KDFerror(B)

ok beck jsing

2 years agoFix typo in previous.
tb [Thu, 5 May 2022 08:07:24 +0000 (08:07 +0000)]
Fix typo in previous.

2 years agoInline OPENSSL_memdup() using malloc() + memcpy()
tb [Thu, 5 May 2022 08:05:58 +0000 (08:05 +0000)]
Inline OPENSSL_memdup() using malloc() + memcpy()

ok beck jsing

2 years agoTranslate OPENSSL_{cleanse,clear_free,free,zalloc}() to libc API.
tb [Thu, 5 May 2022 08:03:11 +0000 (08:03 +0000)]
Translate OPENSSL_{cleanse,clear_free,free,zalloc}() to libc API.

ok beck jsing

2 years agoAdjust includes for LibreSSL
tb [Thu, 5 May 2022 07:57:33 +0000 (07:57 +0000)]
Adjust includes for LibreSSL

ok beck jsing

2 years agoUse C99 initializres for hkdf_pkey_meth
tb [Thu, 5 May 2022 07:53:30 +0000 (07:53 +0000)]
Use C99 initializres for hkdf_pkey_meth

ok beck jsing

2 years agoRemove OpenSSL versions of HKDF*().
tb [Thu, 5 May 2022 07:50:06 +0000 (07:50 +0000)]
Remove OpenSSL versions of HKDF*().

ok beck jsing

2 years agoFix includes of the removed kdferr.h
tb [Thu, 5 May 2022 07:48:07 +0000 (07:48 +0000)]
Fix includes of the removed kdferr.h

2 years agoAdd NID for HKDF
tb [Thu, 5 May 2022 07:45:57 +0000 (07:45 +0000)]
Add NID for HKDF

ok beck jsing

2 years agosshkey_unshield_private() contains a exact duplicate of the code in
djm [Thu, 5 May 2022 01:04:14 +0000 (01:04 +0000)]
sshkey_unshield_private() contains a exact duplicate of the code in
private2_check_padding(). Pull private2_check_padding() up so the code
can be reused. From Martin Vahlensieck, ok deraadt@

2 years agochannel_new no longer frees remote_name. So update the comment
djm [Thu, 5 May 2022 00:56:58 +0000 (00:56 +0000)]
channel_new no longer frees remote_name.  So update the comment
accordingly.  As remote_name is not modified, it can be const
as well. From Martin Vahlensieck

2 years agomux.c: mark argument as const; from Martin Vahlensieck
djm [Thu, 5 May 2022 00:55:11 +0000 (00:55 +0000)]
mux.c: mark argument as const; from Martin Vahlensieck

2 years agovmctl(8)/vmd(8): convert disk sizes from MB to bytes
dv [Wed, 4 May 2022 23:17:25 +0000 (23:17 +0000)]
vmctl(8)/vmd(8): convert disk sizes from MB to bytes

Continue converting other parts to storing data in bytes instead
of MB. In this case, the logic for disk sizes was being scaled.

This fixes issues reported by Martin Vahlensieck where vmctl could
no longer create disks larger than 7 MiB after previous commits to
change storing memory sizes as bytes.

While this keeps the vm memory limit check in vmctl's size parser,
it skips the limit check for disks. The error messages adjust
accordingly and this removes the double error message logging.

Update comments and function types accordingly.

ok marlkin@

2 years agoIntroduce mutex for ratecheck(9) and ppsratecheck(9). A global
bluhm [Wed, 4 May 2022 21:24:33 +0000 (21:24 +0000)]
Introduce mutex for ratecheck(9) and ppsratecheck(9).  A global
mutex with spl high for all function calls is used for now.  It
protects the lasttime and curpps parameter.  This solution is MP
safe for the usual use case, allows progress, and can be optimized
later.  Remove a useless #if 1 while there.
OK claudio@

2 years agoremove accidentally duplicated line
tb [Wed, 4 May 2022 19:34:26 +0000 (19:34 +0000)]
remove accidentally duplicated line

2 years agoWhitespace nit (knfmt(1) agrees after inserting an empty line after the
tb [Wed, 4 May 2022 19:15:52 +0000 (19:15 +0000)]
Whitespace nit (knfmt(1) agrees after inserting an empty line after the
variable declaration)

2 years agoFound two multiple evaluation macros. One of them so long and scary it
deraadt [Wed, 4 May 2022 18:57:50 +0000 (18:57 +0000)]
Found two multiple evaluation macros. One of them so long and scary it
too many people to unravel correctly and place into a static function.
While here, move the flags bits into local variables, which reduces
the amount of () in the checks.
help from millert, miod, tedu

2 years agoKNF according to knfmt(1)
tb [Wed, 4 May 2022 18:56:34 +0000 (18:56 +0000)]
KNF according to knfmt(1)

2 years agoAdd RCS tags
tb [Wed, 4 May 2022 18:49:50 +0000 (18:49 +0000)]
Add RCS tags

2 years agoRestore copyright years to 2016-2018 as they were before the previous
tb [Wed, 4 May 2022 18:48:55 +0000 (18:48 +0000)]
Restore copyright years to 2016-2018 as they were before the previous
commit.

2 years agoReinstate the licenses that were replaced with license stubs in
tb [Wed, 4 May 2022 18:47:26 +0000 (18:47 +0000)]
Reinstate the licenses that were replaced with license stubs in
OpenSSL commits d2e9e320186f0917cc940f46bdf1a7e4120da9b0 and
b6cff313cbb1d0381b329fe4f6a8f009cdb270e4

2 years agoBump copyright years to 2016-2018 as it was before the previous commit.
tb [Wed, 4 May 2022 18:37:00 +0000 (18:37 +0000)]
Bump copyright years to 2016-2018 as it was before the previous commit.

2 years agoReinstate the license that was replaced with a stub in OpenSSL commit
tb [Wed, 4 May 2022 18:36:03 +0000 (18:36 +0000)]
Reinstate the license that was replaced with a stub in OpenSSL commit
21dcbebc6e35419f1842f39a125374ea1ba45693

2 years agoInline kdferr.h at the end of kdf.h
tb [Wed, 4 May 2022 18:27:39 +0000 (18:27 +0000)]
Inline kdferr.h at the end of kdf.h

2 years agoRename hkdf.c to hkdf_evp.c to avoid a name clash with hkdf/hkdf.c
tb [Wed, 4 May 2022 18:19:17 +0000 (18:19 +0000)]
Rename hkdf.c to hkdf_evp.c to avoid a name clash with hkdf/hkdf.c

2 years agoImport HKDF code from OpenSSL 1.1.1o
tb [Wed, 4 May 2022 18:02:07 +0000 (18:02 +0000)]
Import HKDF code from OpenSSL 1.1.1o

This imports verbatim copies as of the OpenSSL_1_1_1o tag of

  crypto/kdf/hkdf.c
  crypto/kdf/hkdf_err.c
  include/openssl/kdf.h
  include/openssl/kdferr.h

from https://www.github.com/openssl/openssl.git into lib/libcrypto/kdf.

We only want the EVP interface to HKDF since some ports need them.  Not
yet linked to the build since it will not compile. Follow-on commits will
add KNF, clean up and make this compile.

Tests of an early draft version by abieber and Caspar Schutijser

ok jsing

2 years agoMove rttimer callback function from the rttimer itself to rttimer_queue.
claudio [Wed, 4 May 2022 16:52:10 +0000 (16:52 +0000)]
Move rttimer callback function from the rttimer itself to rttimer_queue.
All users use the same callback per queue so that makes sense.
Also replace rt_timer_queue_destroy() with rt_timer_queue_flush().
OK bluhm@

2 years agoIn ipsp_spd_lookup() rename the parameter tdbp to tdbin as it is
bluhm [Wed, 4 May 2022 15:29:58 +0000 (15:29 +0000)]
In ipsp_spd_lookup() rename the parameter tdbp to tdbin as it is
always the incoming TDB that has to be checked.
from markus@

2 years agorpki-client: bypass timeout in file mode.
tb [Wed, 4 May 2022 15:21:25 +0000 (15:21 +0000)]
rpki-client: bypass timeout in file mode.

ok claudio

2 years agoMerge swap-backed and object-backed inactive page lists.
mpi [Wed, 4 May 2022 14:58:26 +0000 (14:58 +0000)]
Merge swap-backed and object-backed inactive page lists.

ok millert@, kettenis@

2 years agoVariable pri is uninitialized, use msg.m_pri instead. This affects
bluhm [Wed, 4 May 2022 14:47:46 +0000 (14:47 +0000)]
Variable pri is uninitialized, use msg.m_pri instead.  This affects
the priority of userland messages with kernel or unspecified facility.
broken in previous commit; fix from markus@

2 years agoTweak wording of a comment to reflect current reality better.
tb [Wed, 4 May 2022 13:07:35 +0000 (13:07 +0000)]
Tweak wording of a comment to reflect current reality better.

2 years agoRewrite asn1_collect() and asn1_find_end() with CBS.
jsing [Wed, 4 May 2022 10:57:48 +0000 (10:57 +0000)]
Rewrite asn1_collect() and asn1_find_end() with CBS.

Use more readable variable and arguments names in the process.

ok tb@

2 years agoAvoid special handling of definite length before calling asn1_find_end().
jsing [Wed, 4 May 2022 10:53:26 +0000 (10:53 +0000)]
Avoid special handling of definite length before calling asn1_find_end().

The asn1_find_end() function handles definite length ASN.1, which means
that there is no point in the only caller having code to explicitly handle
definite length - it can just call the function.

ok tb@

2 years agoChange asn1_check_tag_cbs() out_len from long to size_t.
jsing [Wed, 4 May 2022 10:47:36 +0000 (10:47 +0000)]
Change asn1_check_tag_cbs() out_len from long to size_t.

The long vs size_t checks can be handled in the asn1_check_tag() wrapper
and this will help to avoid propagating long vs size_t issues into new
code.

ok tb@

2 years agoRemove extra empty line
claudio [Wed, 4 May 2022 10:17:16 +0000 (10:17 +0000)]
Remove extra empty line

2 years agoregen
jsg [Wed, 4 May 2022 08:11:11 +0000 (08:11 +0000)]
regen

2 years agoupdate Intel ADL-S graphics ids, add ADL-N RPL-S RPL-P
jsg [Wed, 4 May 2022 08:10:43 +0000 (08:10 +0000)]
update Intel ADL-S graphics ids, add ADL-N RPL-S RPL-P

2 years agomake sure stdout is non-blocking; ok djm@
markus [Wed, 4 May 2022 07:31:22 +0000 (07:31 +0000)]
make sure stdout is non-blocking; ok djm@

2 years agoAs found by n18fuhtm AT tutanota.com there are dhcp servers that send a
florian [Wed, 4 May 2022 05:57:18 +0000 (05:57 +0000)]
As found by n18fuhtm AT tutanota.com there are dhcp servers that send a
domain name option with length 1 and a single \0.
We strip trailing \0 and then end up with length 0.
This is a protocol violation, the minimum length for domain name option
is 1, and we ignore the lease.

Since we are not going to get this fixed this server side, we might as
well just pretend that we didn't receive a domain name (or host name).
We only ever care about them in the installer anyway. Not getting a
lease because of this corner case is not helpful.

OK deraadt

2 years agodrm/i915/adl-n: Enable ADL-N platform
jsg [Wed, 4 May 2022 05:25:28 +0000 (05:25 +0000)]
drm/i915/adl-n: Enable ADL-N platform

From Tejas Upadhyay
7e28d0b26759846485978ada860ef4a427e06c8f in mainline linux

2 years agodrm/i915/rpl-s: Add PCI IDS for Raptor Lake S
jsg [Wed, 4 May 2022 05:20:33 +0000 (05:20 +0000)]
drm/i915/rpl-s: Add PCI IDS for Raptor Lake S

From Anusha Srivatsa
52407c220c44c8dcc6aa8aa35ffc8a2db3c849a9 in mainline linux

2 years agodrm/i915/dg1: Add new PCI id
jsg [Wed, 4 May 2022 05:17:14 +0000 (05:17 +0000)]
drm/i915/dg1: Add new PCI id

From Jose Roberto de Souza
5f0d4214938db66969a50d4b1262307e39f4f2b2 in mainline linux

2 years agodrm/i915/adl_s: Update ADL-S PCI IDs
jsg [Wed, 4 May 2022 05:14:35 +0000 (05:14 +0000)]
drm/i915/adl_s: Update ADL-S PCI IDs

From Tejas Upadhyay
c79b846f892d64f169d3dba18fd2500a83805e3a in mainline linux

2 years agoMissed removing some memory scaling in vmm, vmctl.
dv [Wed, 4 May 2022 02:24:26 +0000 (02:24 +0000)]
Missed removing some memory scaling in vmm, vmctl.

Continuation of commitid RbITgDkOsW8SMssz removing use of megabytes
instead of bytes in vmm(4) and vmctl(8). Missed this spot that only
manifests after a vm is started and has its runtime details
inspected.

2 years agovmm/vmd/vmctl: standardize memory units to bytes
dv [Tue, 3 May 2022 21:39:18 +0000 (21:39 +0000)]
vmm/vmd/vmctl: standardize memory units to bytes

At different points in the vm lifecycle vmm(4), vmctl(8), and vmd(8)
refer to a vm's memory range sizes in either bytes or megabytes.
This is needlessly complex.

Switch to using bytes everywhere and adjust types and constants
accordingly. While this makes it possible to specify vm's with
memory in fractions of megabytes, the logic requiring whole
megabyte values remains.

Feedback from deraadt@, mlarkin@, and Matthew Martin.

ok mlarkin@

2 years agoRate limit uvn_flush error during pageout messages. They occur
bluhm [Tue, 3 May 2022 21:20:35 +0000 (21:20 +0000)]
Rate limit uvn_flush error during pageout messages.  They occur
when a memory mapped file cannot be written to disk, e.g. if the
file system is full.  Too much printf() during kernel relinking
slows down the system boot.
OK deraadt@

2 years agoMake pf(4) more paranoid about IGMP/MLP messages. MLD/IGMP messages
sashan [Tue, 3 May 2022 13:32:47 +0000 (13:32 +0000)]
Make pf(4) more paranoid about IGMP/MLP messages. MLD/IGMP messages
with ttl other than 1 will be discarded. Also MLD messages with
other than link-local source address will be discarded. IGMP
messages with destination address other than multicast class
will be discarded.

feedback and OK bluhm@, cluadio@

2 years agosioctl_onval(3) returns int not void
ratchov [Tue, 3 May 2022 13:03:30 +0000 (13:03 +0000)]
sioctl_onval(3) returns int not void

Fix from Carlin Bingham <cb at viennan.net>, thanks!