openbsd
21 months agoSupport -1 without -N for list-keys.
nicm [Tue, 17 Jan 2023 10:40:51 +0000 (10:40 +0000)]
Support -1 without -N for list-keys.

21 months agoalso check that an active session inhibits UnusedConnectionTimeout
djm [Tue, 17 Jan 2023 10:15:10 +0000 (10:15 +0000)]
also check that an active session inhibits UnusedConnectionTimeout
idea markus@

21 months agoremove elansc(4) driver for AMD Elan SC520 System Controller
jsg [Tue, 17 Jan 2023 10:10:10 +0000 (10:10 +0000)]
remove elansc(4) driver for AMD Elan SC520 System Controller

AMD Elan SC520 has a Am5x86, 486-class processor.  We require a
586-class processor.

feedback from jmc@ ok miod@

21 months agoregression test for UnusedConnectionTimeout
djm [Tue, 17 Jan 2023 10:02:34 +0000 (10:02 +0000)]
regression test for UnusedConnectionTimeout

21 months agoAdd a sshd_config UnusedConnectionTimeout option to terminate
djm [Tue, 17 Jan 2023 09:44:48 +0000 (09:44 +0000)]
Add a sshd_config UnusedConnectionTimeout option to terminate
client connections that have no open channels for some length
of time. This complements the recently-added ChannelTimeout
option that terminates inactive channels after a timeout.

ok markus@

21 months agoOn amd64 machines without the NX feature enabled, we can't distinguish
kettenis [Tue, 17 Jan 2023 08:03:51 +0000 (08:03 +0000)]
On amd64 machines without the NX feature enabled, we can't distinguish
between page faults as a result of instruction fetches or normal data
access.  Handle this in the same way as we do on landisk: if handling
the fault with access type PROT_READ fails, retry with PROT_EXEC.
Fortunately we know whether NX is enabled or nor so only do this when
it isn't.  Nobody should be running an amd64 machine without NX!

ok deraadt@, miod@

21 months agoUpdate palette when moving a pane, GitHub issue 3437.
nicm [Tue, 17 Jan 2023 06:50:55 +0000 (06:50 +0000)]
Update palette when moving a pane, GitHub issue 3437.

21 months agofix typo in package name
anton [Tue, 17 Jan 2023 06:33:49 +0000 (06:33 +0000)]
fix typo in package name

21 months agocope with ktrace "(via syscall)" changes
anton [Tue, 17 Jan 2023 06:33:25 +0000 (06:33 +0000)]
cope with ktrace "(via syscall)" changes

21 months agoagtimer(4/armv7): switch to clockintr
cheloha [Tue, 17 Jan 2023 02:58:22 +0000 (02:58 +0000)]
agtimer(4/armv7): switch to clockintr

- Strip out custom hardclock/statclock scheduling code.
- Remove debug evcount code.  We can no longer differentiate between
  hardclock and statclock in the driver.
- Wire up agtimer_intrclock.

With tweaks from miod@ and jca@.  Tested by jca@ and kettenis@.

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

21 months agoamptimer(4): switch to clockintr
cheloha [Tue, 17 Jan 2023 02:47:55 +0000 (02:47 +0000)]
amptimer(4): switch to clockintr

- Strip out custom hardclock/statclock scheduling code.
- Wire up amptimer_intrclock.
- Remove debug evcounts.  All interrupts are now counted with
  the evcount in the interrupt handler.
- Remove apparently dead USE_GTIMER_CMP code.

Debugged with jca@.  Tested by jca@.

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

21 months agosxitimer(4): switch to clockintr
cheloha [Tue, 17 Jan 2023 02:38:59 +0000 (02:38 +0000)]
sxitimer(4): switch to clockintr

- Strip out custom hardclock/statclock scheduling code.
- Stop using STATTIMER.  We can multiplex TICKTIMER to handle all
  clock interrupts.
- Wire up sxitimer_intrclock.
- For parity with other platforms, change stathz from 128 to hz and
  change profhz from 1024 to (stathz * 10).

Tested by kettenis@.

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

21 months agodmtimer(4): switch to clockintr
cheloha [Tue, 17 Jan 2023 02:32:07 +0000 (02:32 +0000)]
dmtimer(4): switch to clockintr

- Strip out custom hardclock/statclock scheduling code.
- Wire up dmtimer_intrclock.
- For convenience, add dmtimer_reset_tisr(); we do the "clear interrupt
  bits" dance in multiple places, may as well put it in a function.
- For parity with other platforms, change stathz from 128 to 100 and
  profhz from 1024 to 1000.

Testing by stuge@ and jsg@.

v1: https://marc.info/?l=openbsd-tech&m=167060320326851&w=2
v2: https://marc.info/?l=openbsd-tech&m=167340009006972&w=2

ok mlarkin@ kettenis@

21 months agoarm, armv7: add clockintr support
cheloha [Tue, 17 Jan 2023 02:27:14 +0000 (02:27 +0000)]
arm, armv7: add clockintr support

The interrupt clock drivers need these pieces to be in place first.

ok mlarkin@ kettenis@

21 months agoMention riscv64 boot support
kn [Mon, 16 Jan 2023 23:07:47 +0000 (23:07 +0000)]
Mention riscv64 boot support

efiboot could always boot from CRYPTO and RAID 1, since version 1.5 RAID 1C
also works.

installboot was enabled just now, so only new installations work out of the
box without manual intervention.

21 months agoEnable softraid(4) support in installboot(8)
kn [Mon, 16 Jan 2023 22:59:41 +0000 (22:59 +0000)]
Enable softraid(4) support in installboot(8)

riscv64 efiboot already supports booting from softraid volumes.

These installboot bits make sure that the boot loader will be installed on
chunk devices rather than the volume for root on softraid installations,
i.e. full boot support for riscv64, just like amd64, arm64 and sparc64.

regress is happy.

OK kettenis

21 months agoFix transmit queue selection based on frame type. I introduced an error
jmatthew [Mon, 16 Jan 2023 22:08:50 +0000 (22:08 +0000)]
Fix transmit queue selection based on frame type.  I introduced an error
here when I split up urtwn_tx() to add support for RTL8192EU devices.

from Mikhail (mp395990 at gmail)
ok stsp@

21 months agobump minor after RAID 1C support synced form arm64
kn [Mon, 16 Jan 2023 21:32:12 +0000 (21:32 +0000)]
bump minor after RAID 1C support synced form arm64

21 months agoSync with original arm64 copy to get RAID 1C bits, fix include guard
kn [Mon, 16 Jan 2023 21:30:46 +0000 (21:30 +0000)]
Sync with original arm64 copy to get RAID 1C bits, fix include guard

OK kettenis

21 months agoManage RTC offset through UEFI variables handled by a TEE application that
patrick [Mon, 16 Jan 2023 20:12:38 +0000 (20:12 +0000)]
Manage RTC offset through UEFI variables handled by a TEE application that
can be interacted with using SMC calls.

ok kettenis@

21 months agoAttach drivers on nodes under /firmware.
patrick [Mon, 16 Jan 2023 20:07:48 +0000 (20:07 +0000)]
Attach drivers on nodes under /firmware.

ok kettenis@

21 months agosome kernel prototypes should also be made available to _STANDALONE
deraadt [Mon, 16 Jan 2023 18:41:53 +0000 (18:41 +0000)]
some kernel prototypes should also be made available to _STANDALONE

21 months agoMove BN_sqr() to the bottom of the file.
jsing [Mon, 16 Jan 2023 17:56:25 +0000 (17:56 +0000)]
Move BN_sqr() to the bottom of the file.

This will simplify review/upcoming changes.

No functional change.

21 months agoMop up debug code that escaped previously.
jsing [Mon, 16 Jan 2023 16:53:19 +0000 (16:53 +0000)]
Mop up debug code that escaped previously.

This is the result of `unifdef -m -U BN_COUNT'.

21 months agoUse size of largest chunk of free space, not total of all chunks
krw [Mon, 16 Jan 2023 16:49:16 +0000 (16:49 +0000)]
Use size of largest chunk of free space, not total of all chunks
of free space, when checking for sufficient space to add a
partition. As a side-benefit the list of free chunks only needs
to be built once.

21 months agosync
deraadt [Mon, 16 Jan 2023 15:34:54 +0000 (15:34 +0000)]
sync

21 months agoMark keys sent by command and skip paste handling for them.
nicm [Mon, 16 Jan 2023 11:26:14 +0000 (11:26 +0000)]
Mark keys sent by command and skip paste handling for them.

21 months agoFix bad MP logic in the route refresh handling.
claudio [Mon, 16 Jan 2023 10:37:08 +0000 (10:37 +0000)]
Fix bad MP logic in the route refresh handling.
Found by and fix provided by Zenon Mousmoulas (@zmousm)

21 months agoDon't put data in .text.
kettenis [Mon, 16 Jan 2023 10:11:39 +0000 (10:11 +0000)]
Don't put data in .text.

ok deraadt@, miod@

21 months agoroughly cleanup terrible pre-ansi practices
deraadt [Mon, 16 Jan 2023 07:29:32 +0000 (07:29 +0000)]
roughly cleanup terrible pre-ansi practices
ok miod

21 months agoCurrently we disable kbind(2) for static program from libc.a's
guenther [Mon, 16 Jan 2023 07:09:11 +0000 (07:09 +0000)]
Currently we disable kbind(2) for static program from libc.a's
preinit hook.  Delete that and instead have the kernel disable kbind
at exec-time if the program doesn't have an ELF interpreter.  For
now, permit userland calls to disable it when already disabled so
existing static programs continue to work.

prompted by deraadt@ questioning about the call in libc.a

ok deraadt@ miod@

21 months agowe spent far too long debugging a weird go library problem (incorrect
deraadt [Mon, 16 Jan 2023 05:32:04 +0000 (05:32 +0000)]
we spent far too long debugging a weird go library problem (incorrect
arguments to mmap) because it was using syscall(2) and that callpath
is invisible in ktrace.  make it visible, it will now show "(via syscall)"
and such.
ok guenther

21 months agounbreak test: cannot access shell positional parameters past $9 without
djm [Mon, 16 Jan 2023 04:11:29 +0000 (04:11 +0000)]
unbreak test: cannot access shell positional parameters past $9 without
wrapping the position in braces (i.e. need ${10}, etc.)

21 months agoexport PGK_VALUE so that .S files can use it
deraadt [Mon, 16 Jan 2023 00:05:18 +0000 (00:05 +0000)]
export PGK_VALUE so that .S files can use it

21 months ago3 new defines: he PTE protection key mask, the specific key value we use
deraadt [Mon, 16 Jan 2023 00:04:47 +0000 (00:04 +0000)]
3 new defines: he PTE protection key mask, the specific key value we use
for execute-only, and the PKU value used by userland to use that key.

21 months agoadapt to ed25519 changes in src/usr.bin/ssh
djm [Sun, 15 Jan 2023 23:35:10 +0000 (23:35 +0000)]
adapt to ed25519 changes in src/usr.bin/ssh

21 months agoupdate OpenSSH's Ed25519 code to the last version of SUPERCOP (20221122)
djm [Sun, 15 Jan 2023 23:05:32 +0000 (23:05 +0000)]
update OpenSSH's Ed25519 code to the last version of SUPERCOP (20221122)
and change the import approach to the same one we use for Streamlined
NTRUPrime: use a shell script to extract the bits we need from SUPERCOP,
make some minor adjustments and squish them all into a single file.

ok tb@ tobhe@

21 months agogost: add missing BN_CTX_{start,end}() pair
tb [Sun, 15 Jan 2023 13:58:44 +0000 (13:58 +0000)]
gost: add missing BN_CTX_{start,end}() pair

The new BN_CTX code enforces that the context be started before a BIGNUM
can be obtained from it via BN_CTX_get(), tests for ssl/interop and the
openssl app broke, implying missing test coverage in libcrypto itself.
Add the obviously missing bits.

reported by anton
ok jsing

21 months agorestore strscpy() paths to reduce diff to linux
jsg [Sun, 15 Jan 2023 13:51:59 +0000 (13:51 +0000)]
restore strscpy() paths to reduce diff to linux

21 months agofix text error; from jan stary
jmc [Sun, 15 Jan 2023 06:55:12 +0000 (06:55 +0000)]
fix text error; from jan stary

21 months agosync
deraadt [Sun, 15 Jan 2023 02:18:06 +0000 (02:18 +0000)]
sync

21 months agoChange suspend idle loop from WFE to WFI. This avoids spurious wakeups
kettenis [Sat, 14 Jan 2023 23:38:23 +0000 (23:38 +0000)]
Change suspend idle loop from WFE to WFI.  This avoids spurious wakeups
while other CPUs are still active.  And prepares us for deeper sleep states
which require an interrupt for wakeup anyway.

ok patrick@

21 months agoAssign (stereo) channel numbers based on "sound-name-prefix" properties.
kettenis [Sat, 14 Jan 2023 23:35:09 +0000 (23:35 +0000)]
Assign (stereo) channel numbers based on "sound-name-prefix" properties.

ok patrick@, ratchov@

21 months agoOnly open /dev/vmm once in vmd(8).
dv [Sat, 14 Jan 2023 20:55:55 +0000 (20:55 +0000)]
Only open /dev/vmm once in vmd(8).

Have the parent process open /dev/vmm and send the fd to the vmm
child process. Only the vmm process and its resulting children
(guest vms) need it for ioctl calls.

ok kn@

21 months agoReplace comparisons/assignments to '3' with equivalent comparisons to RAW_PART
krw [Sat, 14 Jan 2023 18:21:46 +0000 (18:21 +0000)]
Replace comparisons/assignments to '3' with equivalent comparisons to RAW_PART
and assignment to RAW_PART + 1.

21 months agosync
deraadt [Sat, 14 Jan 2023 18:16:24 +0000 (18:16 +0000)]
sync

21 months agoAdd support for "enhanced descriptor" mode found on some variants of the
kettenis [Sat, 14 Jan 2023 17:02:57 +0000 (17:02 +0000)]
Add support for "enhanced descriptor" mode found on some variants of the
Synopsys DesignWare GMAC.

ok mlarkin@

21 months agoMove constants out of text segment into rodata to prepare for xonly support
deraadt [Sat, 14 Jan 2023 16:58:55 +0000 (16:58 +0000)]
Move constants out of text segment into rodata to prepare for xonly support
on amd64.  no pic handling is neccessary since amd64 has full reach.
ok kettenis

21 months agoUpdate the list of architectures where clang will accept the
deraadt [Sat, 14 Jan 2023 16:20:32 +0000 (16:20 +0000)]
Update the list of architectures where clang will accept the
--execute-only option, and also indicate which ones have enabled by
default now (in our naming convention, that is arm64 and riscv64)

21 months agoAllow people to try --execute-only on amd64 and sparc64. the default is
deraadt [Sat, 14 Jan 2023 16:15:43 +0000 (16:15 +0000)]
Allow people to try --execute-only on amd64 and sparc64.  the default is
changed.

21 months agoRemove unused Elliptic Curve code.
jsing [Sat, 14 Jan 2023 15:45:43 +0000 (15:45 +0000)]
Remove unused Elliptic Curve code.

For various reasons, the ecp_nistp* and ecp_nistz* code is unused. While
ecp_nistp* was being compiled, it is disabled due to
OPENSSL_NO_EC_NISTP_64_GCC_128 being defined. On the other hand,
ecp_nistz* was not even being built.

We will bring in new versions or alternative versions of such code, if we
end up enabling it in the future. For now it is just causing complexity
(and grep noise) while trying to improve the EC code.

Discussed with tb@

21 months agoRewrite BN_CTX.
jsing [Sat, 14 Jan 2023 15:23:27 +0000 (15:23 +0000)]
Rewrite BN_CTX.

The current BN_CTX implementation is an incredibly overengineered piece of
code, which even includes its own debug system.

Rewrite BN_CTX from scratch, simplifying things things considerably by
having a "stack" of BIGNUM pointers and a matching array of group
assignments. This means that BN_CTX_start() and BN_CTX_end() effectively
do not fail. Unlike the previous implementation, if a failure occurs
nothing will work and the BN_CTX must be freed/recreated, instead of
trying to pick up at the point where the failure occurred (which does
not make sense given its intended usage).

Additionally, it has long been documented that BN_CTX_start() must be
called before BN_CTX_get() can be used, however the previous implementation
did not actually enforce this. Now that missing BN_CTX_start() and
BN_CTX_end() calls have been added to DSA and EC, we can actually make
this a hard requirement.

ok tb@

21 months agoGreatly simplify bn_expand_internal().
jsing [Sat, 14 Jan 2023 15:12:27 +0000 (15:12 +0000)]
Greatly simplify bn_expand_internal().

We have a function called recallocarray() - make use of it rather than
handrolling a version of it. Also have bn_expand() call bn_wexpand(),
which avoids some duplication.

ok tb@

21 months agoClean up and simplify EC_KEY handling, mostly from a BN_CTX perspective.
jsing [Sat, 14 Jan 2023 15:10:45 +0000 (15:10 +0000)]
Clean up and simplify EC_KEY handling, mostly from a BN_CTX perspective.

If we have a BN_CTX available, make use of it rather than calling BN_new().
Always allocate a new priv_key and pub_key, rather than having complex
reuse dances on entry and exit. Add missing BN_CTX_start()/BN_CTX_end()
calls.

ok tb@

21 months agoregen
kettenis [Sat, 14 Jan 2023 12:19:11 +0000 (12:19 +0000)]
regen

21 months agoCreate /dev/efi on amd64 and arm64.
kettenis [Sat, 14 Jan 2023 12:15:12 +0000 (12:15 +0000)]
Create /dev/efi on amd64 and arm64.

ok yasuoka@

21 months agoImplement access to EFI variables and ESRT through an ioctl(2) interface
kettenis [Sat, 14 Jan 2023 12:11:10 +0000 (12:11 +0000)]
Implement access to EFI variables and ESRT through an ioctl(2) interface
that is compatible with what FreeBSD and NetBSD have.  Setting EFI
variables is only allowed at securelevel 0 and below.

Heavily based on work done by Sergii Dmytruk.

ok yasuoka@

21 months agoShell syntax fix. From ren mingshuai vi github PR#369.
dtucker [Sat, 14 Jan 2023 10:05:54 +0000 (10:05 +0000)]
Shell syntax fix.  From ren mingshuai vi github PR#369.

21 months agoInstead of skipping the all-tokens test if we don't have OpenSSL (since
dtucker [Sat, 14 Jan 2023 09:57:08 +0000 (09:57 +0000)]
Instead of skipping the all-tokens test if we don't have OpenSSL (since
we use it to compute the hash), put the hash at the end and just omit it
if we don't have it.  Prompted by bz#3521.

21 months agoAdd missing void to function definition
tb [Sat, 14 Jan 2023 07:36:16 +0000 (07:36 +0000)]
Add missing void to function definition

21 months agoadd protection-key violation error code for page-fault exceptions
jsg [Sat, 14 Jan 2023 03:37:13 +0000 (03:37 +0000)]
add protection-key violation error code for page-fault exceptions
ok deraadt@

21 months agorecognise protection keys for supervisor-mode (PKS) in cpuid
jsg [Sat, 14 Jan 2023 03:28:51 +0000 (03:28 +0000)]
recognise protection keys for supervisor-mode (PKS) in cpuid
ok deraadt@

21 months agosync cr4 and xcr0 bits with intel dec 2022 sdm
jsg [Sat, 14 Jan 2023 03:21:17 +0000 (03:21 +0000)]
sync cr4 and xcr0 bits with intel dec 2022 sdm
ok deraadt@

21 months agouse the notice from 4.4BSD-Lite
jsg [Sat, 14 Jan 2023 03:12:15 +0000 (03:12 +0000)]
use the notice from 4.4BSD-Lite
ok deraadt@ miod@

21 months agosysctl(2): KERN_CPUSTATS: zero struct cpustats before copyout
cheloha [Sat, 14 Jan 2023 01:04:55 +0000 (01:04 +0000)]
sysctl(2): KERN_CPUSTATS: zero struct cpustats before copyout

21 months agoSince the signal trampoline is now execute-only we no longer write it
kettenis [Fri, 13 Jan 2023 23:02:43 +0000 (23:02 +0000)]
Since the signal trampoline is now execute-only we no longer write it
into core dumps.  As a result backtraces through signal handlers no
longer work in gdb and other debuggers.

Fix this by keeping a read-only mapping of the signal trampoline in the
kernel and writing it into the core dump at the virtual address where it
is mapped in the process.

ok deraadt@, tb@

21 months agosync
deraadt [Fri, 13 Jan 2023 18:26:29 +0000 (18:26 +0000)]
sync

21 months agoDrop PICCY_SET() and RODATA() macros now that libc no longer needs them.
miod [Fri, 13 Jan 2023 17:53:30 +0000 (17:53 +0000)]
Drop PICCY_SET() and RODATA() macros now that libc no longer needs them.

ok kettenis@

21 months agoMove all data from .text section to .rodata, and update the code to
miod [Fri, 13 Jan 2023 17:52:08 +0000 (17:52 +0000)]
Move all data from .text section to .rodata, and update the code to
fetch them correctly when building PIC.

ok kettenis@

21 months agoMove all data tables from .text section to .rodata, and update the code to
miod [Fri, 13 Jan 2023 17:27:25 +0000 (17:27 +0000)]
Move all data tables from .text section to .rodata, and update the code to
fetch them correctly when building PIC. Also drop unused data, and remove
--no-execute-only from linker flags.

ok kettenis@

21 months agoMove all data tables from .text section to .rodata, and update the code to
miod [Fri, 13 Jan 2023 17:11:41 +0000 (17:11 +0000)]
Move all data tables from .text section to .rodata, and update the code to
fetch them correctly when building PIC. Also drop unused data, and remove
--no-execute-only from linker flags.

ok jsing@ kettenis@

21 months agoput man page in the right place
deraadt [Fri, 13 Jan 2023 15:49:26 +0000 (15:49 +0000)]
put man page in the right place

21 months agoUse extended header format for .wav files.
ratchov [Fri, 13 Jan 2023 15:14:24 +0000 (15:14 +0000)]
Use extended header format for .wav files.

According to Microsoft docs, it is needed if bits > 16 or if there are
more than 2 channels, which aucat supports and is the defaut. Fixes
errors reported by audio/sox port when trying to play .wav files
generated by aucat.

Reported by John Rigg <obsd at jrigg.co.uk> and others on misc@

21 months agoPrevent 1-byte out-of-bounds read in i2c_ASN1_BIT_STRING
tb [Fri, 13 Jan 2023 14:46:08 +0000 (14:46 +0000)]
Prevent 1-byte out-of-bounds read in i2c_ASN1_BIT_STRING

If an ASN.1 BIT STRING a of length > 0 contains only zero bytes in a->data,
this old code would end up reading from a->data[-1]. This may or may not
crash. Luckily, anton observed two openssl-ruby regress test failures in
the last few days, which could eventually be traced back to this (after a
lot of painful digging due to coredumps not working properly).

ok jsing

21 months agoFix a couple of auto allocation corner cases.
krw [Fri, 13 Jan 2023 14:24:17 +0000 (14:24 +0000)]
Fix a couple of auto allocation corner cases.

Don't stop counting free partitions just because a spoofed
partition is encountered.

Always check for (end - start) underflow after rounding
start/end to cylinder boundaries.

21 months agoRetake kernel lock in error paths of vmmioctl.
dv [Fri, 13 Jan 2023 14:15:49 +0000 (14:15 +0000)]
Retake kernel lock in error paths of vmmioctl.

From Christian Ludwig.

21 months agoAdd aspa-set to openbgpd config output.
claudio [Fri, 13 Jan 2023 08:58:36 +0000 (08:58 +0000)]
Add aspa-set to openbgpd config output.

Change the way the validated ASPA tree is built since OpenBGPD config
follows more the ASPA profile and puts the optional AFI to each provider
ASnum instead of duplicated everything into an IPv4 and IPv6 tree.
The JSON output of ASPA is still the same.

The inclusion of the aspa-set can currently be disabled by the -A flag.
OK tb@

21 months agofix double phrase in previous;
jmc [Fri, 13 Jan 2023 07:13:40 +0000 (07:13 +0000)]
fix double phrase in previous;

21 months agoshutdown(8): sig_atomic_t variables should be qualified 'volatile'
cheloha [Fri, 13 Jan 2023 07:02:16 +0000 (07:02 +0000)]
shutdown(8): sig_atomic_t variables should be qualified 'volatile'

21 months agotimeout(1): sig_atomic_t variables must also be 'volatile'; ok job@
cheloha [Fri, 13 Jan 2023 06:53:04 +0000 (06:53 +0000)]
timeout(1): sig_atomic_t variables must also be 'volatile'; ok job@

21 months agoMove scp path setting to a helper function.
dtucker [Fri, 13 Jan 2023 04:47:34 +0000 (04:47 +0000)]
Move scp path setting to a helper function.
The previous commit to add scp to the test sshd's path causes the t-envpass
test to fail when the test scp is given using a fully qualified path.  Put
this in a helper function and only call it from the scp tests.

21 months agoAdd scp's path to test sshd's PATH.
dtucker [Fri, 13 Jan 2023 04:23:00 +0000 (04:23 +0000)]
Add scp's path to test sshd's PATH.
If the scp we're testing is fully qualified (eg it's not in the system
PATH) then add its path to the under-test sshd's PATH so we can find it.
Prompted by bz#3518.

21 months agosparc64: switch to clockintr
cheloha [Fri, 13 Jan 2023 03:22:18 +0000 (03:22 +0000)]
sparc64: switch to clockintr

- Remove all use of timer(4/sparc64) from sparc64/clock.c.
- Don't map interrupts in timer_match(), effectively disabling
  timer(4/sparc64).  The driver will be completely removed in a
  later commit.
- Wire up tick_intrclock, stick_intrclock, and sys_tick_intrclock.
- All sparc64 machines now have a randomized statclock; stathz = hz,
  profhz = stathz * 10.

Very special thanks to miod@, without whom this would have been impossible.

sun4v testing by kmos@, mlarkin@, and kn@.  sun4u testing (%tick and the
oddball USIIe %stick) by miod@.  With input from miod@, mlarkin@, and
kettenis@.

v1: https://marc.info/?l=openbsd-tech&m=166776418803680&w=2
v2: https://marc.info/?l=openbsd-tech&m=167287772220176&w=2
v3: https://marc.info/?l=openbsd-tech&m=167322011602530&w=2

ok mlarkin@ kettenis@ miod@

21 months agoDocument "UserKnownHostsFile none". ok djm@
dtucker [Fri, 13 Jan 2023 03:16:29 +0000 (03:16 +0000)]
Document "UserKnownHostsFile none".  ok djm@

21 months agoAdd a "Host" line to the output of ssh -G showing the original host arg.
dtucker [Fri, 13 Jan 2023 02:58:20 +0000 (02:58 +0000)]
Add a "Host" line to the output of ssh -G showing the original host arg.
Inspired by patch from vincent at bernat.ch via bz#3343, ok djm@

21 months agoavoid printf("%s", NULL) if using ssh -oUserKnownHostsFile=none
djm [Fri, 13 Jan 2023 02:44:02 +0000 (02:44 +0000)]
avoid printf("%s", NULL) if using ssh -oUserKnownHostsFile=none
and a hostkey in one of the system known hosts file changes;
ok dtucker@

21 months agodrm/i915/dsi: fix MIPI_BKLT_EN_1 native GPIO index
jsg [Fri, 13 Jan 2023 02:03:06 +0000 (02:03 +0000)]
drm/i915/dsi: fix MIPI_BKLT_EN_1 native GPIO index

From Jani Nikula
0c84b7de26588f4032992ee2a1df6c3d367be829 in linux-6.1.y/6.1.5
6217e9f05a74df48c77ee68993d587cdfdb1feb7 in mainline linux

21 months agodrm/i915/dsi: add support for ICL+ native MIPI GPIO sequence
jsg [Fri, 13 Jan 2023 02:01:14 +0000 (02:01 +0000)]
drm/i915/dsi: add support for ICL+ native MIPI GPIO sequence

From Jani Nikula
c7229577d93d53870fd77e961143305aeec97a7b in linux-6.1.y/6.1.5
963bbdb32b47cfa67a449e715e1dcc525fbd01fc in mainline linux

21 months agodrm/amd/display: Uninitialized variables causing 4k60 UCLK to stay at DPM1 and not...
jsg [Fri, 13 Jan 2023 01:58:55 +0000 (01:58 +0000)]
drm/amd/display: Uninitialized variables causing 4k60 UCLK to stay at DPM1 and not DPM0

From Samson Tam
d179f9d27f1e31fdcf6b02c4f1658dd69985f602 in linux-6.1.y/6.1.5
f3c23bea598ab7e8e4b8c5ca66598921310f718e in mainline linux

21 months agodrm/amd/display: Add check for DET fetch latency hiding for dcn32
jsg [Fri, 13 Jan 2023 01:56:44 +0000 (01:56 +0000)]
drm/amd/display: Add check for DET fetch latency hiding for dcn32

From Dillon Varone
4ac1437d64efdd2788f8c511276243f594e946fd in linux-6.1.y/6.1.5
6d4727c80947de0e6fad58b196a9d215e3b32608 in mainline linux

21 months agodrm/i915/gvt: fix vgpu debugfs clean in remove
jsg [Fri, 13 Jan 2023 01:54:11 +0000 (01:54 +0000)]
drm/i915/gvt: fix vgpu debugfs clean in remove

From Zhenyu Wang
44c0e07e3972e3f2609d69ad873d4f342f8a68ec in linux-6.1.y/6.1.5
704f3384f322b40ba24d958473edfb1c9750c8fd in mainline linux

21 months agodrm/i915/gvt: fix gvt debugfs destroy
jsg [Fri, 13 Jan 2023 01:52:52 +0000 (01:52 +0000)]
drm/i915/gvt: fix gvt debugfs destroy

From Zhenyu Wang
fe340500baf84b6531c9fc508b167525b9bf6446 in linux-6.1.y/6.1.5
c4b850d1f448a901fbf4f7f36dec38c84009b489 in mainline linux

21 months agodrm/amdkfd: Fix kernel warning during topology setup
jsg [Fri, 13 Jan 2023 01:50:53 +0000 (01:50 +0000)]
drm/amdkfd: Fix kernel warning during topology setup

From Mukul Joshi
306888b1246bf44e703b6f1ccc746c2746c1a981 in linux-6.1.y/6.1.5
cf97eb7e47d4671084c7e114c5d88a3d0540ecbd in mainline linux

21 months agodrm/plane-helper: Add the missing declaration of drm_atomic_state
jsg [Fri, 13 Jan 2023 01:49:06 +0000 (01:49 +0000)]
drm/plane-helper: Add the missing declaration of drm_atomic_state

From Ma Jun
c7041ec41036f64db5104f33348c45a1aedcf098 in linux-6.1.y/6.1.5
4e699e34f923188175986ad8a74ab99f7034075e in mainline linux

21 months agoRevert "drm/amd/display: Enable Freesync Video Mode by default"
jsg [Fri, 13 Jan 2023 01:46:41 +0000 (01:46 +0000)]
Revert "drm/amd/display: Enable Freesync Video Mode by default"

From Michel Daenzer
d54f66bc9c371e4765d78144c8dac568a59a31dd in linux-6.1.y/6.1.5
6fe6ece398f7431784847e922a2c8c385dc58a35 in mainline linux

21 months agodrm/amd/display: Report to ACPI video if no panels were found
jsg [Fri, 13 Jan 2023 01:42:45 +0000 (01:42 +0000)]
drm/amd/display: Report to ACPI video if no panels were found

From Mario Limonciello
adaf41b56803fe7a9a4ac625c7e41615ef23591f in linux-6.1.y/6.1.5
c573e240609ff781a0246c0c8c8351abd0475287 in mainline linux

21 months agodrm/amdkfd: Fix double release compute pasid
jsg [Fri, 13 Jan 2023 01:40:51 +0000 (01:40 +0000)]
drm/amdkfd: Fix double release compute pasid

From Philip Yang
a02c07b619899179384fde06f951530438a3512d in linux-6.1.y/6.1.5
1a799c4c190ea9f0e81028e3eb3037ed0ab17ff5 in mainline linux

21 months agodrm/amdkfd: Fix kfd_process_device_init_vm error handling
jsg [Fri, 13 Jan 2023 01:38:35 +0000 (01:38 +0000)]
drm/amdkfd: Fix kfd_process_device_init_vm error handling

From Philip Yang
9d74d1f52e16d8e07f7fbe52e96d6391418a2fe9 in linux-6.1.y/6.1.5
29d48b87db64b6697ddad007548e51d032081c59 in mainline linux

21 months agodrm/amdgpu: Fix size validation for non-exclusive domains (v4)
jsg [Fri, 13 Jan 2023 01:37:01 +0000 (01:37 +0000)]
drm/amdgpu: Fix size validation for non-exclusive domains (v4)

From Luben Tuikov
8ba7c55e112f4ffd2a95b99be1cb1c891ef08ba1 in linux-6.1.y/6.1.5
7554886daa31eacc8e7fac9e15bbce67d10b8f1f in mainline linux

21 months agodrm/i915/gvt: fix double free bug in split_2MB_gtt_entry
jsg [Fri, 13 Jan 2023 01:34:34 +0000 (01:34 +0000)]
drm/i915/gvt: fix double free bug in split_2MB_gtt_entry

From Zheng Wang
1022519da69d99d455c58ca181a6c499c562c70e in linux-6.1.y/6.1.5
4a61648af68f5ba4884f0e3b494ee1cabc4b6620 in mainline linux