openbsd
21 months agocreate enough wskbd* device nodes at runtime in the ramdisk so we can set
phessler [Sat, 28 Jan 2023 18:44:31 +0000 (18:44 +0000)]
create enough wskbd* device nodes at runtime in the ramdisk so we can set
the keyboard layout on all of them during install.

tested with a Thinkpad X13s with a silly amount of kezboards connected.

OK miod@ kn@

21 months agoinstall sbin/kbd on arm64's ramdisk, so a user can set a keyboard layout if
phessler [Sat, 28 Jan 2023 18:40:53 +0000 (18:40 +0000)]
install sbin/kbd on arm64's ramdisk, so a user can set a keyboard layout if
they are using a glass console and kezboard.

tested with a Thinkpad X13s with a DE kezboard.

OK deraadt@ miod@ kn@

21 months agoPermit the --exec-only option on i386 also. This does not make it the default.
deraadt [Sat, 28 Jan 2023 17:58:58 +0000 (17:58 +0000)]
Permit the --exec-only option on i386 also.  This does not make it the default.

I wonder if we should allow --exec-only option on all architectures
(but not as default), because this pre-check list now covers all
architectures, and we haven't seen a ld.lld problem.  We only switch
an architecture to --exec-only default when other aspects (mostly
compiler or .S files), that is a seperate switch block.

Even though i386 has no mmu means to enforce xonly, uvm will fail a
memcpy read of region which hasn't been previously faulted (by
executing code in the region). This definately blocks reads of
"contigious entire libc text", because very few programs "execute code
in all libc code pages", even with uvm_fault's behaviour of wide
faulting a 32K region.  The random relinking also means an attacker
cannot know what subset of libc text can be read because pre-faulted
chunks are unknown, but now they can't copy it all (if they could find
the location and bounds).  This neat behaviour applies to all
architectures.  It seems we should try to always hint text segment
permission as PROT_EXEC-only to the kernel and be happy that blocks a
read, even if that blocking isn't 100% reliable.

note: unfortunately binutils --exec-only isn't bug-free yet on most
architectures, taking the same approach there will take longer.

21 months agoRemove comment referencing bn_depr.c.
jsing [Sat, 28 Jan 2023 17:13:26 +0000 (17:13 +0000)]
Remove comment referencing bn_depr.c.

21 months agoMove the three functions that are in bn_depr.c back to bn_prime.c.
jsing [Sat, 28 Jan 2023 17:09:00 +0000 (17:09 +0000)]
Move the three functions that are in bn_depr.c back to bn_prime.c.

They should go away, but they have not yet disappeared and this
consolidates the source files.

Discussed with tb@

21 months agoMove the more readable version of bn_mul_mont() from bn_asm.c to bn_mont.c.
jsing [Sat, 28 Jan 2023 17:07:02 +0000 (17:07 +0000)]
Move the more readable version of bn_mul_mont() from bn_asm.c to bn_mont.c.

Nothing actually uses this code, as OPENSSL_BN_ASM_MONT is not defined
unless there is an assembly implementation available (not to mention that
defining both OPENSSL_NO_ASM and OPENSSL_BN_ASM_MONT at the same time is
extra strange).

Discussed with tb@

21 months agoFix previous.
jsing [Sat, 28 Jan 2023 16:58:24 +0000 (16:58 +0000)]
Fix previous.

21 months agoProvide bn_div_rem_words() and make use of it.
jsing [Sat, 28 Jan 2023 16:33:34 +0000 (16:33 +0000)]
Provide bn_div_rem_words() and make use of it.

Provide a function that divides a double word (h:l) by d, returning the
quotient q and the remainder r, such that q * d + r is equal to the
numerator. Call this from the three places that currently implement this
themselves.

This is implemented with some slight indirection, which allows for per
architecture implementations, replacing the define/macro tangle, which
messes with variables that are not passed to it.

Also remove a duplicate of bn_div_words() for the BN_ULLONG && BN_DIV2W
case - this is already handled.

ok tb@

21 months agoMove some header definitions from vmm(4) to vmd(8).
dv [Sat, 28 Jan 2023 14:40:53 +0000 (14:40 +0000)]
Move some header definitions from vmm(4) to vmd(8).

Part of an ongoing effort to move userland-specific information out
of a kernel header and directly into vmd(8). No functional change.

ok mlarkin@

21 months agoNuke unused variable.
krw [Sat, 28 Jan 2023 13:14:01 +0000 (13:14 +0000)]
Nuke unused variable.

21 months agosync
deraadt [Sat, 28 Jan 2023 11:47:25 +0000 (11:47 +0000)]
sync

21 months agoMake --execute-only the default on powerpc64. Sort case statements in
kettenis [Sat, 28 Jan 2023 11:13:59 +0000 (11:13 +0000)]
Make --execute-only the default on powerpc64.  Sort case statements in
alphabetical order while I'm there.

ok deraadt@

21 months agoUpdate the number of default wskbd entries
phessler [Sat, 28 Jan 2023 11:04:47 +0000 (11:04 +0000)]
Update the number of default wskbd entries

OK deraadt@

21 months agoRevert the `rt_lock' rwlock(9) diff to fix the recursive
mvs [Sat, 28 Jan 2023 10:17:16 +0000 (10:17 +0000)]
Revert the `rt_lock' rwlock(9) diff to fix the recursive
rwlock(9) acquisition.

Reported-by: syzbot+fbe3acb4886adeef31e0@syzkaller.appspotmail.com
21 months agotypo in comment
deraadt [Sat, 28 Jan 2023 05:58:47 +0000 (05:58 +0000)]
typo in comment

21 months agoOnly use the CPU_OFF PSCI call if SYSTEM_SUSPEND is supported. This means
kettenis [Fri, 27 Jan 2023 23:11:59 +0000 (23:11 +0000)]
Only use the CPU_OFF PSCI call if SYSTEM_SUSPEND is supported.  This means
that secondary CPUs will get parked in a WFI loop like we already do on
Apple Silicon systems.  This requires some small changes in agintc(4) to
make sure we ack the "halt" IPI such that we can send a "wakeup" IPI later.

ok patrick@

21 months agodmtimer(4): initialize stathz, profhz as other drivers, platforms do
cheloha [Fri, 27 Jan 2023 22:16:52 +0000 (22:16 +0000)]
dmtimer(4): initialize stathz, profhz as other drivers, platforms do

Don't hardcode stathz to 100 and profhz to 1000.  Instead, set stathz
to hz and profhz to (stathz * 10).  This is what we do in all other
armv7 clock interrupt drivers and most other platforms.

Link: https://marc.info/?l=openbsd-tech&m=167479021815637&w=2
ok kettenis@

21 months agopowerpc64: initialize stathz, profhz as on other platforms
cheloha [Fri, 27 Jan 2023 22:14:43 +0000 (22:14 +0000)]
powerpc64: initialize stathz, profhz as on other platforms

Don't hardcode stathz to 100 and profhz to 1000.  Instead, set stathz
to hz and profhz to (stathz * 10).  This is what we do on most other
platforms.

Link: https://marc.info/?l=openbsd-tech&m=167479021815637&w=2
ok kettenis@

21 months agomacppc: initialize stathz, profhz as on other platforms
cheloha [Fri, 27 Jan 2023 22:13:48 +0000 (22:13 +0000)]
macppc: initialize stathz, profhz as on other platforms

Don't hardcode stathz to 100 and profhz to 1000.  Instead, set stathz
to hz and profhz to (stathz * 10).  This is what we do on most other
platforms.

Link: https://marc.info/?l=openbsd-tech&m=167479021815637&w=2
ok kettenis@

21 months agoRecommit the switch to use llvm-strip on architectures that use ld.lld.
kettenis [Fri, 27 Jan 2023 22:01:02 +0000 (22:01 +0000)]
Recommit the switch to use llvm-strip on architectures that use ld.lld.

ok naddy@, sthen@

21 months agoChange the emitted .glink stub on powerpc64 to use an instruction sequence
kettenis [Fri, 27 Jan 2023 21:35:02 +0000 (21:35 +0000)]
Change the emitted .glink stub on powerpc64 to use an instruction sequence
to compose the offset to the PLT instead of having a constant pool in .text.
Make --execute-only work on powerpc64.

ok miod@

21 months agoPush solock() down to sogetopt(). It is not required for the most cases.
mvs [Fri, 27 Jan 2023 21:01:59 +0000 (21:01 +0000)]
Push solock() down to sogetopt(). It is not required for the most cases.
Also, some cases could be protected with solock_shared().

ok bluhm@

21 months agoReplace selinfo structure by klist in sockbuf. No reason to keep it,
mvs [Fri, 27 Jan 2023 18:46:34 +0000 (18:46 +0000)]
Replace selinfo structure by klist in sockbuf. No reason to keep it,
selinfo is just wrapper to klist. netstat(1) and libkvm use socket
structure, but don't touch so_{snd,rcv}.sb_sel.

ok visa@

21 months agoUse the same inline assembly constraints as for libc fp*(), when operating
miod [Fri, 27 Jan 2023 16:43:33 +0000 (16:43 +0000)]
Use the same inline assembly constraints as for libc fp*(), when operating
on the floating-point control register.

21 months agoRemove fast round(3) implementation for hppa. It is a nice idea, but does not
miod [Fri, 27 Jan 2023 16:42:03 +0000 (16:42 +0000)]
Remove fast round(3) implementation for hppa. It is a nice idea, but does not
round in the right direction for halfway values.
(noticed in the perl test results thanks to afresh1@)

21 months agoTest the behaviour of round() on halfway values.
miod [Fri, 27 Jan 2023 16:39:58 +0000 (16:39 +0000)]
Test the behaviour of round() on halfway values.

21 months agoAdd a few more -fno-builtin to make sure we test libm, not the compiler.
miod [Fri, 27 Jan 2023 16:39:22 +0000 (16:39 +0000)]
Add a few more -fno-builtin to make sure we test libm, not the compiler.

21 months agoriscv64: initialize stathz, profhz like other platforms do
cheloha [Fri, 27 Jan 2023 15:37:16 +0000 (15:37 +0000)]
riscv64: initialize stathz, profhz like other platforms do

Don't hardcode 100 and 1000.  Use hz(9) for stathz, compute profhz
using stathz, just like most other platforms.

Link: https://marc.info/?l=openbsd-tech&m=167479021815637&w=2
ok jca@

21 months agoDelete get_plane_numbers() function.
aoyama [Fri, 27 Jan 2023 13:58:17 +0000 (13:58 +0000)]
Delete get_plane_numbers() function.

Different from original LUNA(68k), the number of planes is directly
stored as an integer value on LUNA-88K.

Tested on LUNA-88K2 by me.

21 months agoUse stricter constraints in the assembly statements in fpset{mask,round,sticky}
miod [Fri, 27 Jan 2023 11:25:16 +0000 (11:25 +0000)]
Use stricter constraints in the assembly statements in fpset{mask,round,sticky}
and make them behave as intended again.
The existing constraints are too weak; this used to work in older days, but
got broken when the system compiler was updated to gcc 4 (or maybe even gcc 3).

21 months agoAdd openssl 3.0 interop tests
tb [Fri, 27 Jan 2023 08:28:36 +0000 (08:28 +0000)]
Add openssl 3.0 interop tests

The plan is to retire the 1.0.2 interop tests soon so as to be able to
drop the dead and dangerous OpenSSL 1.0.2 port.

The cert part is extremely slow on arm64: the whole interop test on an m1
is about 10x slower (~45 min!) than on a modern amd64 laptop, so people
running regress may want to wait a bit with adding OpenSSL 3 to their test
boxes until this is sorted out.

21 months agosync
deraadt [Fri, 27 Jan 2023 02:48:39 +0000 (02:48 +0000)]
sync

21 months agoRework the secondary CPU spinup code to take advantage of the context
kettenis [Thu, 26 Jan 2023 13:09:18 +0000 (13:09 +0000)]
Rework the secondary CPU spinup code to take advantage of the context
parameter that PSCI gives us.

ok patrick@

21 months agodelete repeated word
deraadt [Thu, 26 Jan 2023 07:44:31 +0000 (07:44 +0000)]
delete repeated word

21 months agobacking "consolidate mbuf header parsing on device driver layer"
deraadt [Thu, 26 Jan 2023 07:32:39 +0000 (07:32 +0000)]
backing "consolidate mbuf header parsing on device driver layer"
easily repeatable ASSERT happens seconds after starting compiles over nfs.

21 months agoIn the previous commit, FIXPROT would upgrade a PROT_NONE mapping too far.
deraadt [Wed, 25 Jan 2023 23:42:03 +0000 (23:42 +0000)]
In the previous commit, FIXPROT would upgrade a PROT_NONE mapping too far.
Correct the logic, still blocking PROT_EXEC
ok anton kettenis

21 months agoUse getpartno() in editor_delete(), enhancing getpartno() to
krw [Wed, 25 Jan 2023 21:44:08 +0000 (21:44 +0000)]
Use getpartno() in editor_delete(), enhancing getpartno() to
allow '*' to select all partitions when the action is 'delete'.

No intentional functional change.

21 months agoFix CVE-2023-24056, unbounded variable expansion in pkg-config.
millert [Wed, 25 Jan 2023 19:06:50 +0000 (19:06 +0000)]
Fix CVE-2023-24056, unbounded variable expansion in pkg-config.
We now die with an error when trying to expand a variable that is
already longer than 64K.  This was never a buffer overflow in our
pkg-config, but rather an unbounded memory allocation that would
eventually run up against resource limits.  OK sthen@ jasper@

21 months agogptimer(4): switch to clockintr
cheloha [Wed, 25 Jan 2023 14:14:39 +0000 (14:14 +0000)]
gptimer(4): switch to clockintr

- Remove custom clock interrupt scheduling code.
- Remove local evcount structs.
- Wire up gptimer_intrclock.
- Switch stathz from 128 to hz
- Switch profhz from 1024 to (stathz * 10).

This change is untested.  Nobody seems to have hardware that actually uses
the gptimer(4) as an interrupt clock.  If this patch doesn't work, the driver
is probably not too distant from a working state.

Compile-tested by jca@.  Discussed with kettenis@, jca@, drahn@, patrick@,
jsg@, and uwe@.

Link: https://marc.info/?l=openbsd-tech&m=167451333419815&w=2
ok patrick@ kettenis@

21 months agochange naming convention for the lru "save history" cache, so that
espie [Wed, 25 Jan 2023 13:25:07 +0000 (13:25 +0000)]
change naming convention for the lru "save history" cache, so that
ports like "lang/chicken/core" do generate files like lang.chicken.core.lru
instead of lang.chicken.core (which can create confusion in people's mind)

do so transparently by reading the old file if need be, and removing it
afterwards.

Funny thing noticed by tb@

ok tb@, sthen@

21 months agoDelete TAB only line.
asou [Wed, 25 Jan 2023 10:53:15 +0000 (10:53 +0000)]
Delete TAB only line.

21 months agoImplement execute-only mappings by using the Virtual Page Class Key
kettenis [Wed, 25 Jan 2023 09:53:53 +0000 (09:53 +0000)]
Implement execute-only mappings by using the Virtual Page Class Key
Protection mechanism provided by modern POWER CPUs.  This is implemented
in a way data allows us to use the Data Address Compare mechanism that
was available on older versions of the architecture if we ever add support
for these older CPUs (e.g. the PowerPC 970 aka G5).

Special thanks to gkoehler@ for spotting the bug in my initial
implementation that made this not work at all.

ok deraadt@, gkoehler@

21 months agodrm/amdgpu: correct MEC number for gfx11 APUs
jsg [Wed, 25 Jan 2023 02:46:45 +0000 (02:46 +0000)]
drm/amdgpu: correct MEC number for gfx11 APUs

From Lang Yu
6da17ac15e354ce483044c924c801a1b25ec8e4a in linux-6.1.y/6.1.8
0ddadc3a2208aedb1b27dbb76d0b4e722b5b527a in mainline linux

21 months agodrm/amdgpu: add tmz support for GC IP v11.0.4
jsg [Wed, 25 Jan 2023 02:44:50 +0000 (02:44 +0000)]
drm/amdgpu: add tmz support for GC IP v11.0.4

From Tim Huang
40a66b6ca4781cb65449ff0794924fc39f599d74 in linux-6.1.y/6.1.8
2aecbe492a3c0bf4c21f78c099a6f6c205fab0c7 in mainline linux

21 months agodrm/amdgpu: add tmz support for GC 11.0.1
jsg [Wed, 25 Jan 2023 02:43:17 +0000 (02:43 +0000)]
drm/amdgpu: add tmz support for GC 11.0.1

From Yifan Zhang
a63bd0539bf395bd57ad7bb2fb6d7581bc19bff0 in linux-6.1.y/6.1.8
97074216917b4188f0af3e52cc5b3f2b277bbbca in mainline linux

21 months agodrm/amdgpu: enable GFX Clock Gating control for GC IP v11.0.4
jsg [Wed, 25 Jan 2023 02:42:07 +0000 (02:42 +0000)]
drm/amdgpu: enable GFX Clock Gating control for GC IP v11.0.4

From Tim Huang
a74805429d38775ac5cc24a8b04df74afe449ffb in linux-6.1.y/6.1.8
f9caa237372b106b5e70ba1a4bfd4222eb79ec71 in mainline linux

21 months agodrm/amdgpu: enable GFX Power Gating for GC IP v11.0.4
jsg [Wed, 25 Jan 2023 02:40:03 +0000 (02:40 +0000)]
drm/amdgpu: enable GFX Power Gating for GC IP v11.0.4

From Tim Huang
834a9142586542f7de693135caf9cc43c0b1e1b2 in linux-6.1.y/6.1.8
a89e2965da6e644729a8ee9c318b7fa9a2990353 in mainline linux

21 months agodrm/amdgpu: enable GFX IP v11.0.4 CG support
jsg [Wed, 25 Jan 2023 02:38:08 +0000 (02:38 +0000)]
drm/amdgpu: enable GFX IP v11.0.4 CG support

From Tim Huang
09af1ee53ced112a69b2a8f5d3b0c0e3818fcb4e in linux-6.1.y/6.1.8
f2b91e5a7cc0368709964994ca253781b51a486a in mainline linux

21 months agodrm/amdgpu: enable PSP IP v13.0.11 support
jsg [Wed, 25 Jan 2023 02:35:51 +0000 (02:35 +0000)]
drm/amdgpu: enable PSP IP v13.0.11 support

From Tim Huang
8cbe04b2e0a1a0197a47e14fbbbcf0ef18299bce in linux-6.1.y/6.1.8
2c83e3fd928b9cb1e35340e58d4b1bd2eea23ed6 in mainline linux

21 months agodrm/amdgpu/discovery: enable nbio support for NBIO v7.7.1
jsg [Wed, 25 Jan 2023 02:33:28 +0000 (02:33 +0000)]
drm/amdgpu/discovery: enable nbio support for NBIO v7.7.1

From Yifan Zhang
11ffb993373095468936788ecdec3cd237f8983d in linux-6.1.y/6.1.8
7308ceb44663f40bf9e7373c3b1aa4f7f433d625 in mainline linux

21 months agodrm/amdgpu/pm: use the specific mailbox registers only for SMU IP v13.0.4
jsg [Wed, 25 Jan 2023 02:31:13 +0000 (02:31 +0000)]
drm/amdgpu/pm: use the specific mailbox registers only for SMU IP v13.0.4

From Tim Huang
703011b41c4f0d333e731edbb632eab62c0e1810 in linux-6.1.y/6.1.8
069a5af97ce3a1448a3566ce8b63b60e51e19958 in mainline linux

21 months agodrm/amdgpu/soc21: add mode2 asic reset for SMU IP v13.0.11
jsg [Wed, 25 Jan 2023 02:29:27 +0000 (02:29 +0000)]
drm/amdgpu/soc21: add mode2 asic reset for SMU IP v13.0.11

From Tim Huang
fe4d9fb3326ecac3d2cdd1acbc0011013b1d7a94 in linux-6.1.y/6.1.8
18ad18853cf2d8b94cef0112ba94f7a7535a9e89 in mainline linux

21 months agodrm/amdgpu/pm: add GFXOFF control IP version check for SMU IP v13.0.11
jsg [Wed, 25 Jan 2023 02:27:48 +0000 (02:27 +0000)]
drm/amdgpu/pm: add GFXOFF control IP version check for SMU IP v13.0.11

From Yifan Zhang
c776433afefde3f0dd74d43fb2cc5791bbd1caaf in linux-6.1.y/6.1.8
9f83e61201bb21957e4993736532edad7a11c7fa in mainline linux

21 months agodrm/amdgpu: add smu 13 support for smu 13.0.11
jsg [Wed, 25 Jan 2023 02:25:26 +0000 (02:25 +0000)]
drm/amdgpu: add smu 13 support for smu 13.0.11

From Yifan Zhang
6ed56b86918d27f72b2cf283dcec6bb822813bc5 in linux-6.1.y/6.1.8
51e7a2168769c2f46edd93a18d4cba4a6d4adb13 in mainline linux

21 months agodrm/amdgpu/pm: enable swsmu for SMU IP v13.0.11
jsg [Wed, 25 Jan 2023 02:23:18 +0000 (02:23 +0000)]
drm/amdgpu/pm: enable swsmu for SMU IP v13.0.11

From Yifan Zhang
bb856053b7d7526784e596cf3be16e9d047ccb99 in linux-6.1.y/6.1.8
16412a94364d1dcebded9217ecb693c9659eaabc in mainline linux

21 months agodrm/amdgpu/discovery: add PSP IP v13.0.11 support
jsg [Wed, 25 Jan 2023 02:20:44 +0000 (02:20 +0000)]
drm/amdgpu/discovery: add PSP IP v13.0.11 support

From Tim Huang
3ed03b0b42c4077806d652c8ced1acc7ff0ac001 in linux-6.1.y/6.1.8
7c1389f1b1228b96e621815e63eaa2e89b9f7511 in mainline linux

21 months agodrm/amdgpu: add gmc v11 support for GC 11.0.4
jsg [Wed, 25 Jan 2023 02:18:53 +0000 (02:18 +0000)]
drm/amdgpu: add gmc v11 support for GC 11.0.4

From Yifan Zhang
7d1e2273f21fd756bfc673e3e6244dc7912d83c2 in linux-6.1.y/6.1.8
d0ca8248999e4c5b02ac64f40536ff46dc14dda7 in mainline linux

21 months agodrm/amdgpu: add gfx support for GC 11.0.4
jsg [Wed, 25 Jan 2023 02:16:42 +0000 (02:16 +0000)]
drm/amdgpu: add gfx support for GC 11.0.4

From Yifan Zhang
ea8f7acc35e2eb548c4ab56df22eccae69a660e6 in linux-6.1.y/6.1.8
1763cb65e870e783e26d2dc9def4edbeadcb1050 in mainline linux

21 months agodrm/amdgpu/discovery: set the APU flag for GC 11.0.4
jsg [Wed, 25 Jan 2023 02:15:15 +0000 (02:15 +0000)]
drm/amdgpu/discovery: set the APU flag for GC 11.0.4

From Yifan Zhang
09157e804d9e578c3bc8eff4d1ac4712f6e0fc1d in linux-6.1.y/6.1.8
dd2d9c7fd7716838d477e257f43facd68c53d3a9 in mainline linux

21 months agodrm/amdgpu: set GC 11.0.4 family
jsg [Wed, 25 Jan 2023 02:13:53 +0000 (02:13 +0000)]
drm/amdgpu: set GC 11.0.4 family

From Yifan Zhang
333814dd71d88c1b0fe6afb1147c8493f9dc116c in linux-6.1.y/6.1.8
94ab70685844227b5c9cb9027a5c4acd3b0e4564 in mainline linux

21 months agodrm/amdgpu/discovery: enable mes support for GC v11.0.4
jsg [Wed, 25 Jan 2023 02:12:15 +0000 (02:12 +0000)]
drm/amdgpu/discovery: enable mes support for GC v11.0.4

From Yifan Zhang
2ecc26293852b3a6d093b49857f309ba7497a6be in linux-6.1.y/6.1.8
6a6af77570add4e58721386be429dbd02cd4b9dd in mainline linux

21 months agodrm/amdgpu/discovery: enable gfx v11 for GC 11.0.4
jsg [Wed, 25 Jan 2023 02:10:31 +0000 (02:10 +0000)]
drm/amdgpu/discovery: enable gfx v11 for GC 11.0.4

From Yifan Zhang
db4fa3b2d7d4eb0a5e05e477d2087c84eade50a6 in linux-6.1.y/6.1.8
b952d6b3d3ff3c1570fab77f2137d5e5280a0e57 in mainline linux

21 months agodrm/amdgpu/discovery: enable gmc v11 for GC 11.0.4
jsg [Wed, 25 Jan 2023 02:09:05 +0000 (02:09 +0000)]
drm/amdgpu/discovery: enable gmc v11 for GC 11.0.4

From Yifan Zhang
907d5b697d850a548e6a226fef6e84f1b665bbb3 in linux-6.1.y/6.1.8
d5fd8c89ed206b2df3933bc4ea129401b2b60869 in mainline linux

21 months agodrm/amdgpu/discovery: enable soc21 common for GC 11.0.4
jsg [Wed, 25 Jan 2023 02:07:45 +0000 (02:07 +0000)]
drm/amdgpu/discovery: enable soc21 common for GC 11.0.4

From Yifan Zhang
708509058b79aa584d4303fcfcfa397790bf657e in linux-6.1.y/6.1.8
69dc98bbd44160930b6b3ca9ca558f89435d2702 in mainline linux

21 months agodrm/amd/display: disable S/G display on DCN 3.1.4
jsg [Wed, 25 Jan 2023 02:06:05 +0000 (02:06 +0000)]
drm/amd/display: disable S/G display on DCN 3.1.4

From Alex Deucher
bf9261e4536f1165e67572ffbdd768c90f8eebef in linux-6.1.y/6.1.8
a52287d66dfa1cca32e6273623b63ba39d87f126 in mainline linux

21 months agodrm/amd/display: disable S/G display on DCN 3.1.5
jsg [Wed, 25 Jan 2023 02:04:34 +0000 (02:04 +0000)]
drm/amd/display: disable S/G display on DCN 3.1.5

From Alex Deucher
3ad10fc4ad37be5adfb02f6d493d092dec9b4c55 in linux-6.1.y/6.1.8
e78cc6a4c7486f50c2786d91dd7d9649a87d1dcb in mainline linux

21 months agodrm/amd/display: Fix COLOR_SPACE_YCBCR2020_TYPE matrix
jsg [Wed, 25 Jan 2023 02:03:02 +0000 (02:03 +0000)]
drm/amd/display: Fix COLOR_SPACE_YCBCR2020_TYPE matrix

From Joshua Ashton
b105b79ea05029ba7f55d826e6c0493a45620573 in linux-6.1.y/6.1.8
973a9c810c785ac270a6d50d8cf862b0c1643a10 in mainline linux

21 months agodrm/amd/display: Calculate output_color_space after pixel encoding adjustment
jsg [Wed, 25 Jan 2023 02:01:03 +0000 (02:01 +0000)]
drm/amd/display: Calculate output_color_space after pixel encoding adjustment

From Joshua Ashton
87e84d0ff97cf8d508910d793866083a918d8cab in linux-6.1.y/6.1.8
79601b894849cb6f6d6122e6590f1887ac4a66b3 in mainline linux

21 months agodrm/amd/display: Fix set scaling doesn's work
jsg [Wed, 25 Jan 2023 01:58:44 +0000 (01:58 +0000)]
drm/amd/display: Fix set scaling doesn's work

From hongao
032cebdff71e92d6aa6fd2a8550eb7c9898553e0 in linux-6.1.y/6.1.8
040625ab82ce6dca7772cb3867fe5c9eb279a344 in mainline linux

21 months agodrm/i915: Remove unused variable
jsg [Wed, 25 Jan 2023 01:56:39 +0000 (01:56 +0000)]
drm/i915: Remove unused variable

From Nirmoy Das
92c39d6995923103f952c94ba0e9b859e182d2a8 in linux-6.1.y/6.1.8
2293a73ad4f3b6c37c06713ff1b67659d92ef43d in mainline linux

21 months agodrm/i915: Allow switching away via vga-switcheroo if uninitialized
jsg [Wed, 25 Jan 2023 01:55:14 +0000 (01:55 +0000)]
drm/i915: Allow switching away via vga-switcheroo if uninitialized

From Thomas Zimmermann
4397bcbd729dd79af4cc53615bdca59f80e74643 in linux-6.1.y/6.1.8
a273e95721e96885971a05f1b34cb6d093904d9d in mainline linux

21 months agodrm/i915/display: Check source height is > 0
jsg [Wed, 25 Jan 2023 01:53:30 +0000 (01:53 +0000)]
drm/i915/display: Check source height is > 0

From Drew Davenport
597747eb58a7c8deb131f89aad7e136dbb63ef7a in linux-6.1.y/6.1.8
8565c502e7c156d190d8e6d36e443f51b257f165 in mainline linux

21 months agodrm/i915: re-disable RC6p on Sandy Bridge
jsg [Wed, 25 Jan 2023 01:51:59 +0000 (01:51 +0000)]
drm/i915: re-disable RC6p on Sandy Bridge

From Sasa Dragic
38a9b17d3b58a3163bc031e96c94fc2d800e02b7 in linux-6.1.y/6.1.8
67b0b4ed259e425b7eed09da75b42c80682ca003 in mainline linux

21 months agodrm/amdgpu: Correct the power calcultion for Renior/Cezanne.
jsg [Wed, 25 Jan 2023 01:50:20 +0000 (01:50 +0000)]
drm/amdgpu: Correct the power calcultion for Renior/Cezanne.

From jie1zhan
8dabe4e0daa999b2f11e354a0f67934420e095b4 in linux-6.1.y/6.1.8
c7bae4aaa5609c1fa9761c35dbcc5fcc92915222 in mainline linux

21 months agodrm/amdgpu: allow multipipe policy on ASICs with one MEC
jsg [Wed, 25 Jan 2023 01:48:33 +0000 (01:48 +0000)]
drm/amdgpu: allow multipipe policy on ASICs with one MEC

From Lang Yu
d693fdf73eb296081523e18d1ac3bc38787e7cab in linux-6.1.y/6.1.8
dc88063b87775971be564d79dc1b05f7b8b5c135 in mainline linux

21 months agodrm/amdgpu: fix amdgpu_job_free_resources v2
jsg [Wed, 25 Jan 2023 01:46:56 +0000 (01:46 +0000)]
drm/amdgpu: fix amdgpu_job_free_resources v2

From Christian Koenig
af4a3c274a92ee0545d65b9102b398fb75d7cc9a in linux-6.1.y/6.1.8
74ea8e78ab349514c9f4df0be1189d91267d750d in mainline linux

21 months agopermit -execute-only on ppc64 (not default)
deraadt [Tue, 24 Jan 2023 23:16:14 +0000 (23:16 +0000)]
permit -execute-only on ppc64 (not default)

21 months agoconsolidate mbuf header parsing on device driver layer
jan [Tue, 24 Jan 2023 22:35:46 +0000 (22:35 +0000)]
consolidate mbuf header parsing on device driver layer

with tweaks from mvs@, mpi@ and dlg@

ok mvs@, dlg@

21 months agoParallels Desktop 17 emulates an azalia audio device, add it
jcs [Tue, 24 Jan 2023 21:48:04 +0000 (21:48 +0000)]
Parallels Desktop 17 emulates an azalia audio device, add it

azalia0 at pci0 dev 1 function 0 "Intel 82801I HD Audio" rev 0x00: msi
azalia0: codecs: Parallels/0x0001

ok patrick

21 months agoRefactor nd6_options() a bit more. Rewrite the loop to be a proper loop
claudio [Tue, 24 Jan 2023 20:06:16 +0000 (20:06 +0000)]
Refactor nd6_options() a bit more. Rewrite the loop to be a proper loop
and not some endless loop with some gotos.
OK kn@

21 months agoMake sure pmap_page_protect() does the right thing for execute-only
kettenis [Tue, 24 Jan 2023 16:51:05 +0000 (16:51 +0000)]
Make sure pmap_page_protect() does the right thing for execute-only
mappings and enforce this with a KASSERT like we do on amd64.  Bring
the pmap_protect() inline in line with the amd64 version.

ok miod@, deraadt@

21 months agoFix a crash in iwx(4) when connecting to WEP networks via ifconfig join.
stsp [Tue, 24 Jan 2023 16:18:22 +0000 (16:18 +0000)]
Fix a crash in iwx(4) when connecting to WEP networks via ifconfig join.

In if_iwx.c r1.63 / CVS commit ID QzTzJtyPl10L63Yi, I fixed a problem with
connecting to WPA1/TKIP networks. This change introduced a deference of
the 'ni' pointer passed to ic_set_key(). This pointer will be passed in
as NULL in certain situations, such as when WEP is used. Add the missing
NULL check.

reported by and fix tested by matthieu@

21 months agoAdd ASPA to STANDARDS section
job [Tue, 24 Jan 2023 15:52:46 +0000 (15:52 +0000)]
Add ASPA to STANDARDS section

21 months agoFix typo
job [Tue, 24 Jan 2023 15:50:10 +0000 (15:50 +0000)]
Fix typo

21 months agoUse getpartno() in editor_add(), enhancing getpartno() to find
krw [Tue, 24 Jan 2023 15:47:10 +0000 (15:47 +0000)]
Use getpartno() in editor_add(), enhancing getpartno() to find
the default partition and allow selection of partitions up to
MAXPARTITION.

No intentional functional change.

21 months agoImplmement `bgpctl show rib avs invalid` and firends.
claudio [Tue, 24 Jan 2023 14:14:15 +0000 (14:14 +0000)]
Implmement `bgpctl show rib avs invalid` and firends.
This will show all invalid ASPA paths.
OK tb@

21 months agoImplement filter and control message matching for ASAP.
claudio [Tue, 24 Jan 2023 14:13:11 +0000 (14:13 +0000)]
Implement filter and control message matching for ASAP.

This adds avs (ASPA validation state) which can be 'unknown', 'valid'
or 'invalid'. It behaves similar to ovs but the ASPA validation state
of paths from iBGP sessions is 'unknown' and the role of the ebgp session
is important to get the right validation state.

OK tb@

21 months agosync
jca [Tue, 24 Jan 2023 13:31:47 +0000 (13:31 +0000)]
sync

21 months agoProvide /dev/ujoy/[0-3]
jca [Tue, 24 Jan 2023 13:30:44 +0000 (13:30 +0000)]
Provide /dev/ujoy/[0-3]

ok deraadt@ miod@

21 months agoEnable access to usb(4), ugen(4), ulpt(4), ucom(4) and ujoy(4)
jca [Tue, 24 Jan 2023 13:29:51 +0000 (13:29 +0000)]
Enable access to usb(4), ugen(4), ulpt(4), ucom(4) and ujoy(4)

Input kettenis@, ok deraadt@ miod@

21 months agoHook up the same USB device drivers as arm64/conf/GENERIC
jca [Tue, 24 Jan 2023 13:28:31 +0000 (13:28 +0000)]
Hook up the same USB device drivers as arm64/conf/GENERIC

Input from kettenis@, ok deraadt@ miod@

21 months agoAdjust various test results to the new bgpctl show rib output including
claudio [Tue, 24 Jan 2023 11:32:13 +0000 (11:32 +0000)]
Adjust various test results to the new bgpctl show rib output including
ASPA validation state.
OK tb@

21 months agoAdjust the ASPA test to match the new code which is AFI independent.
claudio [Tue, 24 Jan 2023 11:31:13 +0000 (11:31 +0000)]
Adjust the ASPA test to match the new code which is AFI independent.
OK tb@

21 months agoPrint the ASPA validation state (avs) in various show rib outputs.
claudio [Tue, 24 Jan 2023 11:29:34 +0000 (11:29 +0000)]
Print the ASPA validation state (avs) in various show rib outputs.
OK tb@

21 months agoImplement ASPA validation and reload logic on ASPA set changes.
claudio [Tue, 24 Jan 2023 11:28:41 +0000 (11:28 +0000)]
Implement ASPA validation and reload logic on ASPA set changes.

For this use the validation state (vstate) in struct prefix and
struct filterstate to store both the ASPA and ROA validity.
Introduce helper functions to set and get the various states for
struct prefix and make sure struct filterstate is also setup properly.
Change the ASPA state in rde_aspath to be AFI/AID and role independent
by storing all 4 possible outcomes. Also add a ASPA generation count
which is used to update the rde_aspath ASPA state cache on reloads.
Rework the rde_aspa.c code to be AFI/AID and role independent. Doing
this for roles is trivial but AFI switch goes deep and is so unnecessary.
The reload is combined with the ROA reload logic and renamed to RPKI
softreload.

OK tb@

21 months agoCheck return value of X509_digest
job [Tue, 24 Jan 2023 09:48:57 +0000 (09:48 +0000)]
Check return value of X509_digest

OK tb@

21 months agoAdd and use a specific routine to fetch instructions from userland when
miod [Tue, 24 Jan 2023 07:26:33 +0000 (07:26 +0000)]
Add and use a specific routine to fetch instructions from userland when
doing floating-point emulation, as copyin will fail on exec-only mappings
now.
ok deraadt@ kettenis@

21 months agomatch unknown ATI display devices as amdgpu in fw_update
jsg [Tue, 24 Jan 2023 01:40:22 +0000 (01:40 +0000)]
match unknown ATI display devices as amdgpu in fw_update

For recent devices amdgpu matches via the hardware ip discovery table,
not with a table of pci vendor and product ids.

So amdgpu_devlist.h and pcidevs do not cover all devices that amdgpu
may match.

in dmesg amdgpu with an unknown product takes the form:

ramdisk kernel, bios/mbr:
vga1 at pci12 dev 0 function 0 vendor "ATI", unknown product 0x687f rev 0xc3

ramdisk kernel, efi or non-x86 arch:
vendor "ATI", unknown product 0x687f (class display subclass VGA, rev 0x03) at pci12 dev 0 function 0 not configured

non-ramdisk kernel:
amdgpu0 at pci12 dev 0 function 0 vendor "ATI", unknown product 0x687f rev 0xc3

ok deraadt@ on an earlier version

21 months agooops, a silly typo
deraadt [Tue, 24 Jan 2023 00:16:08 +0000 (00:16 +0000)]
oops, a silly typo

21 months agouvm_map_extract() UVM_EXTRACT_FIXPROT alias mappings are only used for
deraadt [Tue, 24 Jan 2023 00:14:30 +0000 (00:14 +0000)]
uvm_map_extract() UVM_EXTRACT_FIXPROT alias mappings are only used for
read/write operations, so mask out PROT_EXEC to avoid creating an pointless
exec mapping in the kernel.
We probably need this masking upon minprot (for the non-UVM_EXTRACT_FIXPROT
case) also, but I haven't done a test yet.
ok kettenis