openbsd
2 years agoadd SH-B0 0x00000f50 socket 940 family 0Fh Opteron
jsg [Sat, 24 Sep 2022 12:22:31 +0000 (12:22 +0000)]
add SH-B0 0x00000f50 socket 940 family 0Fh Opteron
we already had SH-B0 0x00000f40 socket 754 family 0Fh Athlon 64

SH-B0 is part of amd64_errata_set8[].  Used for:
Errata 89: Potential Deadlock With Locked Transactions

ok deraadt@

2 years agoAdjust dummy rde_generate_updates() to the new prototype.
claudio [Sat, 24 Sep 2022 11:29:16 +0000 (11:29 +0000)]
Adjust dummy rde_generate_updates() to the new prototype.

2 years agoFix detection of duplicate sticky-address in pf.conf parser.
bluhm [Fri, 23 Sep 2022 21:33:17 +0000 (21:33 +0000)]
Fix detection of duplicate sticky-address in pf.conf parser.
reported to FreeBSD by Franco Fichtner; from Kristof Provost

2 years agoSync to libunbound 1.16.3
florian [Fri, 23 Sep 2022 19:37:23 +0000 (19:37 +0000)]
Sync to libunbound 1.16.3

2 years agoXr to correct man page; from Josiah Frentsos, thanks!
florian [Fri, 23 Sep 2022 19:24:08 +0000 (19:24 +0000)]
Xr to correct man page; from  Josiah Frentsos, thanks!

2 years agoPOSIX timzone specs may contain '.' so only reject names containing '../'.
millert [Fri, 23 Sep 2022 17:29:22 +0000 (17:29 +0000)]
POSIX timzone specs may contain '.' so only reject names containing '../'.
Noted by pjanzen@ with input from deraadt@.

2 years agoSince tzset(3) ignores arbitrary files, we no longer need rpath
florian [Fri, 23 Sep 2022 16:58:33 +0000 (16:58 +0000)]
Since tzset(3) ignores arbitrary files, we no longer need rpath
and can depend on the /usr/share/zoneinfo bypass.

OK mestre, millert, deraadt

2 years agoDon't depend on RTLABEL_LEN but instead define our own ROUTELABEL_LEN.
claudio [Fri, 23 Sep 2022 15:50:41 +0000 (15:50 +0000)]
Don't depend on RTLABEL_LEN but instead define our own ROUTELABEL_LEN.
With this bgpd.h no longer depends on net/route.h
OK tb@

2 years agoImplement a special update generator for add-path send all.
claudio [Fri, 23 Sep 2022 15:49:20 +0000 (15:49 +0000)]
Implement a special update generator for add-path send all.

The generic add-path code up_generate_addpath() reevaluates everything
since this is the simplest way to select the announced paths. For add-path
all this is overkill since there is no dependency between prefixes and so
individual prefixes can be handled more efficently.

Extend rde_generate_updates() to pass the current newbest and oldbest
prefixes (for the selected best path) but now also include newpath and
oldpath (which is the prefix that is added/removed/modified).
If newpath or oldpath is set then a single prefix was altered and
up_generate_addpath_all() can just remove or add this prefix.
If newpath and oldpath are NULL than the full list based on newbest
needs to be inserted and any old path/prefix removed in the process.

This improves update generation performance on big route collectors using
add-path all substantially.

OK tb@

2 years agomerge unbound 1.16.3
sthen [Fri, 23 Sep 2022 14:20:01 +0000 (14:20 +0000)]
merge unbound 1.16.3

2 years agoDon't hardcode disk major device types inside DEBUG block. Use
krw [Fri, 23 Sep 2022 12:32:50 +0000 (12:32 +0000)]
Don't hardcode disk major device types inside DEBUG block. Use
findblkname() and DISKUNIT(). Allows all block devices, not just
sd* and vnd* to generate useful names in DEBUG output.

Cluebat by deraadt@

2 years agoDelete unused variables originally come from mvme88k.
aoyama [Fri, 23 Sep 2022 02:35:46 +0000 (02:35 +0000)]
Delete unused variables originally come from mvme88k.

2 years agoonly call printf the first time amd64_errata() is called
jsg [Fri, 23 Sep 2022 01:25:39 +0000 (01:25 +0000)]
only call printf the first time amd64_errata() is called
it may later be used from a resume path when we don't want to print

same change as amd64 amd64errata.c 1.11 by robert

ok robert@ deraadt@

2 years agoremove dup line; from j@bitminer
deraadt [Thu, 22 Sep 2022 17:44:20 +0000 (17:44 +0000)]
remove dup line; from j@bitminer

2 years agouse the always serializing RDTSCP instruction in tsc and usertc if available
robert [Thu, 22 Sep 2022 04:57:07 +0000 (04:57 +0000)]
use the always serializing RDTSCP instruction in tsc and usertc if available

tweaks from cheloha@; ok deraadt@, sthen@, cheloha@

2 years agoCall amd64_errata() from cpu_fix_msrs() instead of identifycpu() so that
robert [Thu, 22 Sep 2022 04:36:37 +0000 (04:36 +0000)]
Call amd64_errata() from cpu_fix_msrs() instead of identifycpu() so that
on resume, the errata is re-applied.
In addition make amd64_errata() print the information about the applied
errata only once for the first CPU.

input from jsg@ and deraadt@, ok deraadt@

2 years agoDistinguish between retransmit ok and nothing to retransmit. This makes
tobhe [Wed, 21 Sep 2022 22:32:10 +0000 (22:32 +0000)]
Distinguish between retransmit ok and nothing to retransmit.  This makes
sure ikes_retransmit_response events don't also increase the
ikes_msg_rcvd_busy counter.

ok markus@

2 years agoFix typo. From AlexanderStohr via github PR#343.
dtucker [Wed, 21 Sep 2022 22:26:50 +0000 (22:26 +0000)]
Fix typo.  From AlexanderStohr via github PR#343.

2 years agoThe values for fib_priority are OS dependent. To help portability move
claudio [Wed, 21 Sep 2022 21:12:03 +0000 (21:12 +0000)]
The values for fib_priority are OS dependent. To help portability move
the RTP_BGP and similar defines all into kroute.c and export them via
kr_default_prio() and kr_check_prio().
OK tb@

2 years agotzset: ignore TZ if it contains an absolute path or issetugid().
millert [Wed, 21 Sep 2022 15:57:49 +0000 (15:57 +0000)]
tzset: ignore TZ if it contains an absolute path or issetugid().
Reading time zone files from user-controlled paths can result in
pledge(2) or unveil(2) violations.  We also ignore files that contain
a '.' character to avoid paths containing ".." or hidden files.
Work with and OK deraadt@

2 years agoTweak symbols test in such a way that it would have caught the recent
tb [Wed, 21 Sep 2022 15:24:45 +0000 (15:24 +0000)]
Tweak symbols test in such a way that it would have caught the recent
Symbols.list mistake: undefine aliases (except _cfb block ciphers which
are aliases for historical reasons). Use -Wl,--no-allow-shlib-undefined.

2 years agoAdjust pathid_assign() to be much faster in the common case.
claudio [Wed, 21 Sep 2022 10:39:17 +0000 (10:39 +0000)]
Adjust pathid_assign() to be much faster in the common case.

Use a per peer path_id_tx to assign to paths received from none add-path
enabled peers. This skips two extra walks of the RIB prefix list and is
a big speed-up when there are many regular sessions. If the session uses
add-path recv then the old way of assigning random path_ids needs to be
used.

With input and OK tb@

2 years agoRevert UVM_VNODE_CANPERSIST removal, it exposes an issue on arm64.
mpi [Wed, 21 Sep 2022 07:32:59 +0000 (07:32 +0000)]
Revert UVM_VNODE_CANPERSIST removal, it exposes an issue on arm64.

Found the hardway by miod@ and deraadt@.

2 years agoDefault request message body size should be 0.
yasuoka [Wed, 21 Sep 2022 05:55:18 +0000 (05:55 +0000)]
Default request message body size should be 0.

ok claudio

2 years agoUpdate awk to Sep 12, 2022 version.
millert [Wed, 21 Sep 2022 01:42:58 +0000 (01:42 +0000)]
Update awk to Sep 12, 2022 version.
Fix undefined behavior and a use-after-free in cat().

2 years agoUpdate libexpat to 2.4.9. This fixes CVE-2022-40674. Relevant for
bluhm [Tue, 20 Sep 2022 23:00:52 +0000 (23:00 +0000)]
Update libexpat to 2.4.9.  This fixes CVE-2022-40674.  Relevant for
OpenBSD are security fixes #629 #640 and other changes #610 #643.
No library bump necessary.
OK deraadt@

2 years agoSplit out handling of cpu family specific MSRs from cpu_init_msrs()
robert [Tue, 20 Sep 2022 14:28:27 +0000 (14:28 +0000)]
Split out handling of cpu family specific MSRs from cpu_init_msrs()
to a separate function that gets called after identifycpu() so that
we have the required information to handle the correct MSRs for each
cpu.

Additionally, move the handling of the DE_CFG_SERIALIZE_LFENCE and
IA32_DEBUG_INTERFACE_LOCK MSRs out of identifycpu() to the new
function so that they get set again after a suspend/resume cycle as
well, which in fixes TSC sync failures.

discussed with and input from deraadt@, mlarkin@

2 years agodrm/amd/amdgpu: skip ucode loading if ucode_size == 0
jsg [Tue, 20 Sep 2022 12:04:35 +0000 (12:04 +0000)]
drm/amd/amdgpu: skip ucode loading if ucode_size == 0

From Chengming Gui
985a5d3d491d558f785b77cc5b86837bfa408587 in linux 5.15.y/5.15.69
39c84b8e929dbd4f63be7e04bf1a2bcd92b44177 in mainline linux

2 years agoRemove unused and unimplemented unp_drain().
mvs [Tue, 20 Sep 2022 10:10:11 +0000 (10:10 +0000)]
Remove unused and unimplemented unp_drain().

ok bluhm@

2 years agoFix line length trimming in -f mode
job [Tue, 20 Sep 2022 10:01:51 +0000 (10:01 +0000)]
Fix line length trimming in -f mode

Reported by Christian Weisgerber

OK kn@

2 years agoReword comment, no functional change
claudio [Tue, 20 Sep 2022 08:53:27 +0000 (08:53 +0000)]
Reword comment, no functional change

2 years agoremove HY_D1_G34R1 enum value and just use HY_D1
jsg [Tue, 20 Sep 2022 07:54:27 +0000 (07:54 +0000)]
remove HY_D1_G34R1 enum value and just use HY_D1

HY-D1 C32r1 (0x00100f81) and HY-D1 G34r1 (0x00100f91) have the same
errata and multiple cpuid values can map to a single enum value.

2 years agoadd RequiredRSASize to the list of keywords accepted by -o;
djm [Mon, 19 Sep 2022 21:39:16 +0000 (21:39 +0000)]
add RequiredRSASize to the list of keywords accepted by -o;
spotted by jmc@

2 years agoRemove now-unused connect_wait() function.
millert [Mon, 19 Sep 2022 21:14:38 +0000 (21:14 +0000)]
Remove now-unused connect_wait() function.

2 years agoAdd iked connection statistics for successful and failed connections, common
tobhe [Mon, 19 Sep 2022 20:54:02 +0000 (20:54 +0000)]
Add iked connection statistics for successful and failed connections, common
error types and other events that help analyze errors in larger setups.
The counters can be printed with 'ikectl show stats'.

ok bluhm@ patrick@
from and ok markus@

2 years agoChange OF_getnodebyname() such that looking up a node using just the name
patrick [Mon, 19 Sep 2022 16:12:19 +0000 (16:12 +0000)]
Change OF_getnodebyname() such that looking up a node using just the name
without a unit number (so without the @1234 bit) works as well.

This is a re-commit of the backed out change with the endless loop fixed.

2 years agoSymlink chosen time zone file to /etc/localtime so that we don't need
florian [Mon, 19 Sep 2022 15:40:36 +0000 (15:40 +0000)]
Symlink chosen time zone file to /etc/localtime so that we don't need
to use a time zone path that's not relative to /usr/share/zoneinfo.
Hopefully we can limit tzset(3) to only look at zone info files in
/usr/share/zoneinfo, soon.
OK millert, deraadt

2 years agoWhen setting time, date(1) pledges "wpath" for logwtmp(3). Restrict
florian [Mon, 19 Sep 2022 15:36:20 +0000 (15:36 +0000)]
When setting time, date(1) pledges "wpath" for logwtmp(3). Restrict
this using unveil(2), but ignore errors if /var/log doesn't exist. We
want to be able to set the time if the system is damanged or /var is
not mounted yet.
We also need to unveil everything for reading since we still allow
arbitrary locations of zone info files. Hopefully that will go away
soon.
OK deraadt

2 years agoadjust notes for linker set change
jsg [Mon, 19 Sep 2022 12:37:02 +0000 (12:37 +0000)]
adjust notes for linker set change
ok miod@ deraadt@

2 years agoRemove PKCS12_MAKE_{,SH}KEYBAG from Symbols.list
tb [Mon, 19 Sep 2022 12:25:52 +0000 (12:25 +0000)]
Remove PKCS12_MAKE_{,SH}KEYBAG from Symbols.list

These functions were renamed in the last bump

#define PKCS12_MAKE_KEYBAG      PKCS12_SAFEBAG_create0_p8inf                                        #define PKCS12_MAKE_SHKEYBAG    PKCS12_SAFEBAG_create_pkcs8_encrypt

They don't appear in the compiled library itself, so no further bump
required.

Fixes libressl-portable/portable#791

Found the hard way by vollkommenheit
ok deraadt jsing

2 years agouse users-groups-by-id@openssh.com sftp-server extension (when
djm [Mon, 19 Sep 2022 10:46:00 +0000 (10:46 +0000)]
use users-groups-by-id@openssh.com sftp-server extension (when
available) to fill in user/group names for directory listings.
Implement a client-side cache of see uid/gid=>user/group names.
ok markus@

2 years agosftp client library support for users-groups-by-id@openssh.com;
djm [Mon, 19 Sep 2022 10:43:12 +0000 (10:43 +0000)]
sftp client library support for users-groups-by-id@openssh.com;
ok markus@

2 years agoextend sftp-common.c:extend ls_file() to support supplied user/group
djm [Mon, 19 Sep 2022 10:41:58 +0000 (10:41 +0000)]
extend sftp-common.c:extend ls_file() to support supplied user/group
names; ok markus@

2 years agosftp-server(8): add a "users-groups-by-id@openssh.com" extension
djm [Mon, 19 Sep 2022 10:40:52 +0000 (10:40 +0000)]
sftp-server(8): add a "users-groups-by-id@openssh.com" extension
request that allows the client to obtain user/group names that
correspond to a set of uids/gids.

Will be used to make directory listings more useful and consistent
in sftp(1).

ok markus@

2 years agobetter debugging for connect_next()
djm [Mon, 19 Sep 2022 08:49:50 +0000 (08:49 +0000)]
better debugging for connect_next()

2 years agoupdate set sizes
jsg [Mon, 19 Sep 2022 04:29:55 +0000 (04:29 +0000)]
update set sizes

2 years agoDefine PMU_ADB_CMD and PMU_INT_ACK
gkoehler [Sun, 18 Sep 2022 21:36:41 +0000 (21:36 +0000)]
Define PMU_ADB_CMD and PMU_INT_ACK

Taking these definitions from NetBSD's pm_direct.h; most PMU_*
commands have the same names in the BSDs and Linux.

ok miod@ kettenis@

2 years agoFix a memory leak which was introduced by the previous commit.
mglocker [Sun, 18 Sep 2022 21:12:19 +0000 (21:12 +0000)]
Fix a memory leak which was introduced by the previous commit.

The issue was reported by Stephan Somogyi - Thanks!

2 years agotimecounting: tc_reset_quality: print notice if active counter changes
cheloha [Sun, 18 Sep 2022 20:47:09 +0000 (20:47 +0000)]
timecounting: tc_reset_quality: print notice if active counter changes

Give the user a hint as to what happened if they boot up and the TSC
is not the active counter.

"sure" deraadt@

2 years agotsc: make tsc_report_test_results() less noisy without TSC_DEBUG
cheloha [Sun, 18 Sep 2022 20:38:50 +0000 (20:38 +0000)]
tsc: make tsc_report_test_results() less noisy without TSC_DEBUG

By default, just say "tsc: cpu0/cpuN: sync test failed".  If you want
more information you need to recompile with TSC_DEBUG set.

While here, disable TSC_DEBUG.

"sure" deraadt@

2 years agoRevert previous it prevents the PinebookPro and the Rockpro64 to reach userland.
mpi [Sun, 18 Sep 2022 14:41:54 +0000 (14:41 +0000)]
Revert previous it prevents the PinebookPro and the Rockpro64 to reach userland.

Found by kn@ and myself, ok deraadt@

2 years agoAllow TLSv1.3 clients to send CCS without middlebox compatibility mode.
jsing [Sat, 17 Sep 2022 17:14:06 +0000 (17:14 +0000)]
Allow TLSv1.3 clients to send CCS without middlebox compatibility mode.

While RFC 8446 is clear about what legacy session identifiers can be sent
by a TLSv1.3 client and how middlebox compatibility mode is requested, it
is delightfully vague about the circumstances under which a client is
permitted to send CCS messages. While it does not make sense for a client
to send CCS messages when they are not requesting middlebox compatibility
mode, it is not strictly forbidden by the RFC and at least one (unknown)
TLSv1.3 stack has been observed to do this in the wild.

Revert part of the previous change and allow clients to send CCS messages,
even if they are not requesting middlebox compatibility mode.

Found the hard way by florian@

ok tb@

2 years agoLink to SSL_read_early_data(3)
kn [Sat, 17 Sep 2022 16:03:21 +0000 (16:03 +0000)]
Link to SSL_read_early_data(3)

OK tb

2 years agobind/connect is now expected to succeed
benno [Sat, 17 Sep 2022 12:51:23 +0000 (12:51 +0000)]
bind/connect is now expected to succeed

2 years agobind() to AF_UNIX will now require unveil "w". "w" may seem a little odd
deraadt [Sat, 17 Sep 2022 12:40:52 +0000 (12:40 +0000)]
bind() to AF_UNIX will now require unveil "w".  "w" may seem a little odd
(and it may seem it should be "r" to get access to the file to collect
the underlying socket, which is fully r/w in a non-file way).  But this
matches the POSIX spec that the file be 'writeable'.  The regress test
and daemons have been updated for this behaviour.
Gap discovered by martijn, long discussions with benno

2 years agoadd some notes on common pytest arguments
sthen [Sat, 17 Sep 2022 12:17:52 +0000 (12:17 +0000)]
add some notes on common pytest arguments

2 years agotweaks; from jan stary
jmc [Sat, 17 Sep 2022 11:39:09 +0000 (11:39 +0000)]
tweaks; from jan stary

2 years agoAdd RequiredRSASize for sshd(8); RSA keys that fall beneath this limit
djm [Sat, 17 Sep 2022 10:34:29 +0000 (10:34 +0000)]
Add RequiredRSASize for sshd(8); RSA keys that fall beneath this limit
will be ignored for user and host-based authentication.

Feedback deraadt@ ok markus@

2 years agoadd a RequiredRSASize for checking RSA key length in ssh(1).
djm [Sat, 17 Sep 2022 10:33:18 +0000 (10:33 +0000)]
add a RequiredRSASize for checking RSA key length in ssh(1).
User authentication keys that fall beneath this limit will be
ignored. If a host presents a host key beneath this limit then
the connection will be terminated (unfortunately there are no
fallbacks in the protocol for host authentication).

feedback deraadt, Dmitry Belyavskiy; ok markus@

2 years agoShow time zone name and offset in clock border if TZ environment
florian [Sat, 17 Sep 2022 10:32:05 +0000 (10:32 +0000)]
Show time zone name and offset in clock border if TZ environment
variable is set. This is useful when running multiple clocks in
different time zones.
From James Russell Stickney (jrs AT outband.net), tweaked by me.
Input & OK kn

2 years agoAdd a sshkey_check_rsa_length() call for checking the length of an
djm [Sat, 17 Sep 2022 10:30:45 +0000 (10:30 +0000)]
Add a sshkey_check_rsa_length() call for checking the length of an
RSA key; ok markus@

2 years agoactually hook up restrict_websafe; the command-line flag was
djm [Sat, 17 Sep 2022 10:11:29 +0000 (10:11 +0000)]
actually hook up restrict_websafe; the command-line flag was
never actually used. Spotted by Matthew Garrett

2 years agoHook up installboot unconditionally, skip on unsupported archs
kn [Sat, 17 Sep 2022 09:30:18 +0000 (09:30 +0000)]
Hook up installboot unconditionally, skip on unsupported archs

The list of not yet tested archs is smaller, so follow bsd.regress.mk(5)
advise and just print SKIPPED on those.

2 years agomove most of the key combination translation code out of ukbd(4)
robert [Fri, 16 Sep 2022 16:30:10 +0000 (16:30 +0000)]
move most of the key combination translation code out of ukbd(4)
to hidkbd so that it can be re-used by apldc(4) and aplhidev(4) as well

this also adds support for apple fn key combinations to aplhidev(4)

ok miod@

2 years agosemctl1 and msgctl were introduced for binary compatibility for OpenBSD 3.5.
mbuhl [Fri, 16 Sep 2022 15:57:23 +0000 (15:57 +0000)]
semctl1 and msgctl were introduced for binary compatibility for OpenBSD 3.5.
They are no longer needed.
OK bluhm@

2 years agoMake mfii(4) recover from firmware FAULT state on startup.
stsp [Fri, 16 Sep 2022 12:08:27 +0000 (12:08 +0000)]
Make mfii(4) recover from firmware FAULT state on startup.

In case firmware initially comes up in FAULT state, reset the device and
give it one more chance to attach successfully. The Linux megaraid_sas
driver applies the same workaround in this case. There seems to be a bug
in some firmware versions which can trigger this behaviour; see mainline
Linux commit 6431f5d7c6025f8b007af06ea090de308f7e6881

Problem observed by me with mfii(4) attached via KVM PCI-passthrough:
mfii0 at pci0 dev 2 function 0 "Symbios Logic MegaRAID SAS2208" rev 0x05: msi
mfii0: firmware fault

With this workaround in place, attachment succeeds and the device works:
mfii0 at pci0 dev 2 function 0 "Symbios Logic MegaRAID SAS2208" rev 0x05: msi
mfii0: firmware fault; attempting full device reset, this can take some time
mfii0: "RAID Ctrl SAS 6G 1GB (D3116C)", firmware 23.29.0-0019, 1024MB cache

Tested for regressions on bare metal by Hrvoje with two different adapters:
mfii0 at pci1 dev 0 function 0 "Symbios Logic MegaRAID SAS3508" rev 0x01: msi
mfii0: "PERC H740P Mini ", firmware 51.16.0-4076, 8192MB cache
mfii0 at pci4 dev 0 function 0 "Symbios Logic MegaRAID SAS2208" rev 0x05: msi
mfii0: "ServeRAID M5110", firmware 23.34.0-0023, 512MB cache

ok jmatthew@

2 years agocorrect error value
djm [Fri, 16 Sep 2022 06:55:37 +0000 (06:55 +0000)]
correct error value

2 years agosftp: Be a bit more clever about completions
djm [Fri, 16 Sep 2022 03:33:14 +0000 (03:33 +0000)]
sftp: Be a bit more clever about completions

There are commands (e.g. "get" or "put") that accept two
arguments, a local path and a remote path. However, the way
current completion is written doesn't take this distinction into
account and always completes remote or local paths.

By expanding CMD struct and "cmds" array this distinction can be
reflected and with small adjustment to completer code the correct
path can be completed.

By Michal Privoznik, ok dtucker@

2 years agosftp: Don't attempt to complete arguments for non-existent commands
djm [Fri, 16 Sep 2022 03:13:34 +0000 (03:13 +0000)]
sftp: Don't attempt to complete arguments for non-existent commands

If user entered a non-existent command (e.g. because they made a
typo) there is no point in trying to complete its arguments. Skip
calling complete_match() if that's the case.

From Michal Privoznik

2 years agodrm/i915: Implement WaEdpLinkRateDataReload
jsg [Fri, 16 Sep 2022 02:29:47 +0000 (02:29 +0000)]
drm/i915: Implement WaEdpLinkRateDataReload

From Ville Syrjala
d2ca79dd0b5487991dac52c6b679915dbd70ee4c in linux 5.15.y/5.15.68
672d6ca758651f0ec12cd0d59787067a5bde1c96 in mainline linux

2 years agodrm/amd/display: fix memory leak when using debugfs_lookup()
jsg [Fri, 16 Sep 2022 02:26:35 +0000 (02:26 +0000)]
drm/amd/display: fix memory leak when using debugfs_lookup()

From Greg Kroah-Hartman
58acd2ebae034db3bacf38708f508fbd12ae2e54 in linux 5.15.y/5.15.68
cbfac7fa491651c57926c99edeb7495c6c1aeac2 in mainline linux

2 years agodrm/amdgpu: mmVM_L2_CNTL3 register not initialized correctly
jsg [Fri, 16 Sep 2022 02:24:23 +0000 (02:24 +0000)]
drm/amdgpu: mmVM_L2_CNTL3 register not initialized correctly

From Qu Huang
ad5ef763dbbea8193bd2095a1401aeac6e8f74e8 in linux 5.15.y/5.15.68
b8983d42524f10ac6bf35bbce6a7cc8e45f61e04 in mainline linux

2 years agodrm/radeon: add a force flush to delay work when radeon
jsg [Fri, 16 Sep 2022 02:22:45 +0000 (02:22 +0000)]
drm/radeon: add a force flush to delay work when radeon

From Zhenneng Li
5a7a5b2edac4b05abd744eeaebda46d9dacd952d in linux 5.15.y/5.15.68
f461950fdc374a3ada5a63c669d997de4600dffe in mainline linux

2 years agodrm/amdgpu: Check num_gfx_rings for gfx v9_0 rb setup.
jsg [Fri, 16 Sep 2022 02:20:28 +0000 (02:20 +0000)]
drm/amdgpu: Check num_gfx_rings for gfx v9_0 rb setup.

From Candice Li
622a557b28b718d4da92ff3504d83af2310324d2 in linux 5.15.y/5.15.68
c351938350ab9b5e978dede2c321da43de7eb70c in mainline linux

2 years agodrm/amdgpu: Move psp_xgmi_terminate call from amdgpu_xgmi_remove_device to psp_hw_fini
jsg [Fri, 16 Sep 2022 02:18:48 +0000 (02:18 +0000)]
drm/amdgpu: Move psp_xgmi_terminate call from amdgpu_xgmi_remove_device to psp_hw_fini

From YiPeng Chai
c15c2c2c08964fd99d3366f80742129f8ae28eaa in linux 5.15.y/5.15.68
9d705d7741ae70764f3d6d87e67fad3b5c30ffd0 in mainline linux

2 years agodrm/gem: Fix GEM handle release errors
jsg [Fri, 16 Sep 2022 02:16:44 +0000 (02:16 +0000)]
drm/gem: Fix GEM handle release errors

From Jeffy Chen
1f574fbe9c2b831a8c3156260842a7abd280d59f in linux 5.15.y/5.15.68
ea2aa97ca37a9044ade001aef71dbc06318e8d44 in mainline linux

2 years agomask non-chain fence sequence numbers to 32-bit for comparisons
jsg [Fri, 16 Sep 2022 01:48:07 +0000 (01:48 +0000)]
mask non-chain fence sequence numbers to 32-bit for comparisons

Most of drm uses 32-bit sequence numbers in fences.
dma-fence-chain opts into 64-bit comparisons.

Wrapping is handled like i915_seqno_passed() except that if the sequence
numbers are the same one is not considered later than the other.

2 years agotsc: configure LFENCE to serialize dispatch before testing TSC sync
cheloha [Thu, 15 Sep 2022 19:30:51 +0000 (19:30 +0000)]
tsc: configure LFENCE to serialize dispatch before testing TSC sync

On AMD CPUs, LFENCE does not serialize instruction dispatch until MSR
C001_1029[1] is properly configured.  We do this in identifycpu(); see
amd64/identcpu.c,v 1.103.

The upshot is that the first TSC synchronization test is currently
invalid on most AMD CPUs because the LFENCE in the test loop does not
ensure that the AP loads the BP's latest TSC value before executing
RDTSC.  So the synchronization test is yielding false positives on AMD
CPUs where the TSCs are actually synchronized.

The simplest fix is to wait until after the secondary CPU runs
identifycpu() in cpu_hatch() to test TSC synchronization.

Moving the TSC sync test after CPU identification means that we can
remove the CPUID() calls from tsc.c: the CPU feature flags are set in
identifycpu() so we no longer need to test for IA32_TSC_ADJUST support
by hand.

While we are at it, we should also pass the correct cpu_info pointer
to tsc_test_sync_bp().  It was unused before, so the bug was harmless,
but we definitely need the BP's cpu_info pointer, not the AP's pointer.

Unfortunately, this change does not fix the TSC sync problems we've
been seeing on e.g. dv@'s and jmc@'s Ryzen 5 machines.  Hopefully the
problem on those machines is buggy firmware and not another
architectural misunderstanding on my part.

Prompted by robert@.  Problem diagnosed by brynet@.  With input from
robert@, brynet@, and deraadt@.  Tested by robert@, brynet@, dv@,
phessler@, and jmc@.

ok robert@ brynet@ sthen@

2 years agoEnable the keyboard on the Samsung Galaxy Book Go.
mglocker [Thu, 15 Sep 2022 18:03:52 +0000 (18:03 +0000)]
Enable the keyboard on the Samsung Galaxy Book Go.

Help from kettenis@, "Nice!" deraadt@

2 years agoShort names make for shorter and prettier lines.
krw [Thu, 15 Sep 2022 15:05:58 +0000 (15:05 +0000)]
Short names make for shorter and prettier lines.

2 years agoAdd support for Apple fn key combinations. Based on Apple fn key handling
tobhe [Thu, 15 Sep 2022 14:45:49 +0000 (14:45 +0000)]
Add support for Apple fn key combinations. Based on Apple fn key handling
in ukbd(4).

ok miod@

2 years agoUse non-blocking connect() with ppoll() and timeout instead of alarm().
millert [Thu, 15 Sep 2022 12:47:10 +0000 (12:47 +0000)]
Use non-blocking connect() with ppoll() and timeout instead of alarm().
For hosts with multiple IP addrs this makes it possible to fall
over from an unresponsive IP to another.  This also replaces the
other connect(2) + connect_wait() calls with timed_connect() so the
-w option now works for more that just http.  OK sthen@ deraadt@

2 years agoAdd GPTPARTATTR_MS_* defines for Microsoft basic data attributes
krw [Thu, 15 Sep 2022 10:10:14 +0000 (10:10 +0000)]
Add GPTPARTATTR_MS_* defines for Microsoft basic data attributes
and make 'fdisk -v' display their names (NoAutoMount, Hidden,
Shadow, ReadOnly).

Shift 1ULL instead of 1 to make it clear these are uint64_t
flags. Makes clang happier.

2 years agoRemove unneeded interim DPRINTF() verbiage. Make DEBUG compile
krw [Thu, 15 Sep 2022 09:08:29 +0000 (09:08 +0000)]
Remove unneeded interim DPRINTF() verbiage. Make DEBUG compile
again.

2 years agoAdd OID for RPKI signedTAL objects
job [Thu, 15 Sep 2022 08:20:34 +0000 (08:20 +0000)]
Add OID for RPKI signedTAL objects

IANA made a permanent registration in the SMI Security for S/MIME CMS
Content Type registry at
https://www.iana.org/assignments/smi-numbers/smi-numbers.xhtml#security-smime-1
for signed objects conforming to draft-ietf-sidrops-signed-tal.

OK tb@

2 years agoMake kroute_matchgw() also work with connected routes.
claudio [Thu, 15 Sep 2022 08:20:14 +0000 (08:20 +0000)]
Make kroute_matchgw() also work with connected routes.

Connected routes have no gateway set but only have ifindex set.
When an interface is deconfigured this makes sure the right route is
removed.
OK tb@

2 years agoIgnore error when we try to delete an address that's already gone.
florian [Thu, 15 Sep 2022 07:59:59 +0000 (07:59 +0000)]
Ignore error when we try to delete an address that's already gone.

This will happen when an address expires because the vltime drops to
zero. The kernel then deletes the address and slaacd tries to do so,
too. The correct fix is to track in slaacd that the kernel already
deleted the address for us, but that's too much work shortly before a
release so just hide the ugly warning for now, it's harmless.
Problem reported by semarie some time ago.
OK deraadt, benno

2 years agoUse LONG_MAX as the limit for ciphers with long based APIs.
jsing [Thu, 15 Sep 2022 07:04:19 +0000 (07:04 +0000)]
Use LONG_MAX as the limit for ciphers with long based APIs.

These ciphers have long based APIs, while EVP has a size_t based API. The
intent of these loops is to handle sizes that are bigger than LONG_MAX.
Rather than using the rather crazy EVP_MAXCHUNK construct, use LONG_MAX
rounded down to a large block size, ensuring that it is a block size
multiple. Revert the recently added overflow checks now that this is
handled more appropriately.

ok tb@

2 years agoregen
kmos [Thu, 15 Sep 2022 04:28:51 +0000 (04:28 +0000)]
regen

2 years agoAdd IDs for the JHL6240 Thunderbolt 3 controller found in my Thinkpad T490
kmos [Thu, 15 Sep 2022 04:28:07 +0000 (04:28 +0000)]
Add IDs for the JHL6240 Thunderbolt 3 controller found in my Thinkpad T490

ok jsg

2 years agorecognise Neoverse V2 (Demeter)
jsg [Thu, 15 Sep 2022 01:57:52 +0000 (01:57 +0000)]
recognise Neoverse V2 (Demeter)

2 years agoAF_UNIX bind() must use UNVEIL_CREATE for namei() because it is creating
deraadt [Wed, 14 Sep 2022 22:28:52 +0000 (22:28 +0000)]
AF_UNIX bind() must use UNVEIL_CREATE for namei() because it is creating
a file in the filesystem.  Spotted by martijn.  A review of AF_UNIX
binding programs has been done by benno, and we think it is worth commiting
this semantic change now and watching for fallout.

2 years agoBackout "Reflect script failure in exit code"
kn [Wed, 14 Sep 2022 16:43:00 +0000 (16:43 +0000)]
Backout "Reflect script failure in exit code"

amd64 install using (G)PT seems busted as reported by tb

2 years agoremove an extraneous empty line
tb [Wed, 14 Sep 2022 16:31:36 +0000 (16:31 +0000)]
remove an extraneous empty line

2 years agocloser to potential release date
deraadt [Wed, 14 Sep 2022 14:25:31 +0000 (14:25 +0000)]
closer to potential release date

2 years agoMerge common FORMAT_FDISK and USE_SOFTRAID default, simpler cleanup
kn [Wed, 14 Sep 2022 13:37:03 +0000 (13:37 +0000)]
Merge common FORMAT_FDISK and USE_SOFTRAID default, simpler cleanup

2 years agoCompare 'srcnat' when comparing policies. Fixes a bug where policy lookup could
tobhe [Wed, 14 Sep 2022 13:07:49 +0000 (13:07 +0000)]
Compare 'srcnat' when comparing policies.  Fixes a bug where policy lookup could
not differentiate between similar policies that only differ in srcnat.  Also
include srcnat when logging flows or policies.

ok markus@

2 years agoFold root disk setup targets into one
kn [Wed, 14 Sep 2022 10:09:48 +0000 (10:09 +0000)]
Fold root disk setup targets into one

2 years agoFold vnd disk setup targets into a single loop
kn [Wed, 14 Sep 2022 10:06:14 +0000 (10:06 +0000)]
Fold vnd disk setup targets into a single loop

2 years agoMake NDISKS an integer, simplify CLEANFILES with globbing
kn [Wed, 14 Sep 2022 09:57:47 +0000 (09:57 +0000)]
Make NDISKS an integer, simplify CLEANFILES with globbing

Testing with three softraid chunks now means NDISKS=3 as one would expect
and not NDISKS='1 2 3'.

This uses the powerful jot(1) -w and rs(1) -T commands and allows for more
simplifications in the Makefile.