openbsd
2 years agoList SIMCom SIM8262E-M2 as supported for umb(4)
kevlo [Sat, 8 Oct 2022 17:08:55 +0000 (17:08 +0000)]
List SIMCom SIM8262E-M2 as supported for umb(4)

ok jmc@

2 years agoThe stack can also be marked immutable, because we expect no sane program
deraadt [Sat, 8 Oct 2022 17:03:09 +0000 (17:03 +0000)]
The stack can also be marked immutable, because we expect no sane program
to try to change the permissions of it.  We won't know who's trying that
until we enable it and see what breaks.
A tricky piece relating to setrlimit stack size changing was previously commited.
ok kettenis

2 years agoThe signal trampoline and timekeep regions can be marked immutable at
deraadt [Sat, 8 Oct 2022 16:58:34 +0000 (16:58 +0000)]
The signal trampoline and timekeep regions can be marked immutable at
execve() time
ok kettenis

2 years agoSince the PF_MUTABLE flag is an OpenBSD-specific flag, rename it to
kettenis [Sat, 8 Oct 2022 16:42:41 +0000 (16:42 +0000)]
Since the PF_MUTABLE flag is an OpenBSD-specific flag, rename it to
PF_OPENBSD_MUTABLE.  While there, add the missing PF_MASKOS, which makes
it obvious this bit is indeed in the space reserved for OS-specific bits.

ok deraadt@

2 years agoregen
mglocker [Sat, 8 Oct 2022 06:55:49 +0000 (06:55 +0000)]
regen

2 years agoAdd Wacom One M CTL-672 USB tablet.
mglocker [Sat, 8 Oct 2022 06:53:06 +0000 (06:53 +0000)]
Add Wacom One M CTL-672 USB tablet.

2 years agoFix some error output, replacing some silly 'warnx("\n...")' with
krw [Fri, 7 Oct 2022 19:59:19 +0000 (19:59 +0000)]
Fix some error output, replacing some silly 'warnx("\n...")' with
fprintf(stderr, "\n...").

Reported by Michael Siegel via bugs@. ok tb@ (with some further suggestions)

2 years agoNuke GPTDOSACTIVE which specified the wrong bit. It was superseded by
krw [Fri, 7 Oct 2022 19:34:40 +0000 (19:34 +0000)]
Nuke GPTDOSACTIVE which specified the wrong bit. It was superseded by
GPTPARTATTR_BOOTABLE which specifies the correct one.

Reminded by drahn@

2 years agosort SEE ALSO;
jmc [Fri, 7 Oct 2022 16:31:36 +0000 (16:31 +0000)]
sort SEE ALSO;

2 years agosync
deraadt [Fri, 7 Oct 2022 15:43:41 +0000 (15:43 +0000)]
sync

2 years agoShow the entry immutable bit in the various output formats.
deraadt [Fri, 7 Oct 2022 15:22:10 +0000 (15:22 +0000)]
Show the entry immutable bit in the various output formats.

2 years agoAdd mimmutable(2) libc stub, add & adjust manual pages, and crank the minor.
deraadt [Fri, 7 Oct 2022 15:21:04 +0000 (15:21 +0000)]
Add mimmutable(2) libc stub, add & adjust manual pages, and crank the minor.
ok kettenis

2 years agoIn the linkers, collect objects in section "openbsd.mutable" and place
deraadt [Fri, 7 Oct 2022 15:04:51 +0000 (15:04 +0000)]
In the linkers, collect objects in section "openbsd.mutable" and place
them into a page-aligned region in the bss, with the right markers for
kernel/ld.so to identify the region and skip making it immutable.
While here, fix readelf/objdump versions to show all of this.
ok miod kettenis

2 years agosync
deraadt [Fri, 7 Oct 2022 15:00:12 +0000 (15:00 +0000)]
sync

2 years agoAdd mimmutable(2) system call which locks the permissions (PROT_*) of
deraadt [Fri, 7 Oct 2022 14:59:39 +0000 (14:59 +0000)]
Add mimmutable(2) system call which locks the permissions (PROT_*) of
memory mappings so they cannot be changed by a later mmap(), mprotect(),
or munmap(), which will error with EPERM instead.
ok kettenis

2 years agoKill extra space in ext community ovs output.
claudio [Fri, 7 Oct 2022 09:20:30 +0000 (09:20 +0000)]
Kill extra space in ext community ovs output.
Noticed by job@, OK tb@

2 years agossh-agent.1:
jmc [Fri, 7 Oct 2022 06:00:58 +0000 (06:00 +0000)]
ssh-agent.1:
- use Nm not Xr for self-ref
- while here, wrap a long line

ssh-agent.c:
- add -O to usage()

2 years agonew UVM_ET_IMMUTABLE flag marks a uvm entry as immutable.
deraadt [Fri, 7 Oct 2022 05:01:44 +0000 (05:01 +0000)]
new UVM_ET_IMMUTABLE flag marks a uvm entry as immutable.

2 years agodocument "-O no-restrict-websafe"; spotted by Ross L Richardson
djm [Fri, 7 Oct 2022 04:06:26 +0000 (04:06 +0000)]
document "-O no-restrict-websafe"; spotted by Ross L Richardson

2 years agoAdd identifiers for the new "mutable bss" section, ".openbsd.mutable" is
deraadt [Fri, 7 Oct 2022 03:20:58 +0000 (03:20 +0000)]
Add identifiers for the new "mutable bss" section, ".openbsd.mutable" is
0x65a3dbe5.  Also add PF_MUTABLE as a segment flag for later use.

2 years agounstub intel_guc_send_busy_loop() ct_send()
jsg [Fri, 7 Oct 2022 03:12:22 +0000 (03:12 +0000)]
unstub intel_guc_send_busy_loop() ct_send()

2 years agoadd msleep_interruptible()
jsg [Fri, 7 Oct 2022 03:09:26 +0000 (03:09 +0000)]
add msleep_interruptible()

2 years agounstub guc_ct_buffer_reset() h2g_has_room()
jsg [Fri, 7 Oct 2022 03:05:28 +0000 (03:05 +0000)]
unstub guc_ct_buffer_reset() h2g_has_room()

2 years agoadd CIRC_SPACE()
jsg [Fri, 7 Oct 2022 03:00:44 +0000 (03:00 +0000)]
add CIRC_SPACE()

2 years agounstub guc_mmio_reg_add()
jsg [Fri, 7 Oct 2022 02:59:25 +0000 (02:59 +0000)]
unstub guc_mmio_reg_add()

2 years agoadd bsearch() from libc
jsg [Fri, 7 Oct 2022 02:58:01 +0000 (02:58 +0000)]
add bsearch() from libc

2 years agounstub i915_gem_object_create_shmem_from_data()
jsg [Fri, 7 Oct 2022 02:52:46 +0000 (02:52 +0000)]
unstub i915_gem_object_create_shmem_from_data()

2 years agoBuild CRC calc/static block decode tables when needed to fix netboot
kn [Thu, 6 Oct 2022 23:32:17 +0000 (23:32 +0000)]
Build CRC calc/static block decode tables when needed to fix netboot

The last libz update broke sparc64's ofwboot.net on at least T4-2 machines
running OpenBoot 4.38.16 as bootblocks grew too big for OBP to load:

# size ofwboot.net.*
60684   596     2472    63752   f908    ofwboot.net.71
71340   596     2472    74408   122a8   ofwboot.net.snap

{0} ok boot net
Boot device: /virtual-devices@100/channel-devices@200/network@0  File and args:
TFTP: Transfer timed out

As suggested by tb, adapt b7dd453d18bbd69c3a22e9c7e44e83163348942a to make
OBP load and execute ofwboot.net over TFTP again on at least T4-2 and T5220
where ofwboot off disk keeps loading and both bootblocks boot plain and
gzipped kernels before.

Overall size is now smaller that 7.1 release:
-current
71340   596     2472    74408   122a8   ofwboot.net/obj/ofwboot.net
119580  532     2512    122624  1df00   ofwboot/obj/ofwboot
71140   532     2472    74144   121a0   ofwbootfd/obj/ofwbootfd
-current with -DDYNAMIC_CRC_TABLE -DBUILDFIXED
59788   608     15040   75436   126ac   ofwboot.net/obj/ofwboot.net
108028  544     15080   123652  1e304   ofwboot/obj/ofwboot
59588   544     15040   75172   125a4   ofwbootfd/obj/ofwbootfd

happy kettenis
OK tb

2 years agohonour user's umask if it is more restrictive then the ssh default
djm [Thu, 6 Oct 2022 22:42:37 +0000 (22:42 +0000)]
honour user's umask if it is more restrictive then the ssh default
(022); based on patch from Alex Henrie, ok dtucker@ deraadt@

2 years agoregen after vdsp(4) crank
kn [Thu, 6 Oct 2022 21:43:32 +0000 (21:43 +0000)]
regen after vdsp(4) crank

2 years agocrank vdsp(4) to 24
kn [Thu, 6 Oct 2022 21:43:01 +0000 (21:43 +0000)]
crank vdsp(4) to 24

With eight domains and two or more disks per domain it is easy to exceed the
current number of 16 virtual disks.

I pass at least one miniroot and one root/data disk to every guest, one
domain has additional disk for softraid testing, making >16 disks already.

OK kettenis

2 years agoaccept iodevices as NACs as well
kn [Thu, 6 Oct 2022 21:35:52 +0000 (21:35 +0000)]
accept iodevices as NACs as well

Assignable PCIe devices have a root complex path and a more descriptive
I/O slot path;  example output from a T4-2:

# ldomctl list-io | head -n2
PATH             NAME
/@400/@2/@0/@8   /SYS/MB/PCIE0

ldom.conf(5) `iodevice' currently accepts PATH values, which are cryptic and
completely hardware specific, whereas NAME values are obvious (partially
same across machines) and match physical slot labels ("0 PCIe2 x8") besides
information from ILOM:
    /System/PCI_Devices/Add-on/Device_0 location = PCIE0 (PCIe Slot 0).

Make ldom.conf `iodevice' accept either value;  internally nothing changes.

Rename struct iodev's path member to dev to clarify this further.

OK kettenis

2 years agoRemove a lot of old (dead) code that's either been superseded, or moved to
martijn [Thu, 6 Oct 2022 14:41:08 +0000 (14:41 +0000)]
Remove a lot of old (dead) code that's either been superseded, or moved to
snmpd_metrics.

OK benno@ sthen@

2 years agounwrap two lines for readability
tb [Wed, 5 Oct 2022 21:16:14 +0000 (21:16 +0000)]
unwrap two lines for readability

2 years agoGet rid of useless/confusing subshell
kn [Wed, 5 Oct 2022 19:30:47 +0000 (19:30 +0000)]
Get rid of useless/confusing subshell

This function's style is a bit off:  it wraps the body in a subshell to
discard all stdout/err at once, but still uses return inside it.

1. A command list (using {}) would be enough here as it groups like a
   subshell but avoids spawning another shell;
2. discarding stdout/err at the end of an if block works the same
   (effecting both condition and body) and saves one level of indent;
3. return inside a subshell inside a function does NOT return from the
   function but merely exits the subshell;  this is easily misread.

Saving a fork and indent and improving readability boils down to this
(cvs diff -wU1):

|@@ -3320,3 +3317,2 @@ check_unattendedupgrade() {
|  _d=${_d%% *}
|- (
|  if [[ -n $_d ]]; then
|@@ -3331,5 +3327,5 @@ check_unattendedupgrade() {
|  rm -f /dev/{r,}$_d?
|- fi
|+ fi >/dev/null 2>&1
|+
|  return $_rc
|- ) > /dev/null 2>&1
| }

OK halex

2 years agoSkip softraid(4) keydisks
kn [Wed, 5 Oct 2022 09:58:43 +0000 (09:58 +0000)]
Skip softraid(4) keydisks

Keydisks appear as chunks internally (with special properties) and
installboot(8) thus treated them like actual data chunks.

Most users probably don't hit this as their keydisk is detached and thus
appears "offline" and gets skipped.

Installing to online keydisks may work but is neither expected nor intended
to work, so properly skip them.

Odd setups like keydisk and CRYPTO chunk on the same physical disk would
end up installing getting bootblocks installed twice.

Pointed out by Mikolaj Kucharski <mikolaj AT kucharski DOT name> who also
provided the actual diff (minor wording tweaks by me)

OK jsing

2 years agosort options list;
jmc [Wed, 5 Oct 2022 05:40:16 +0000 (05:40 +0000)]
sort options list;

2 years agoRemove REQUIRE_TFTPBOOT left-over
kn [Tue, 4 Oct 2022 23:58:09 +0000 (23:58 +0000)]
Remove REQUIRE_TFTPBOOT left-over

-t succeeded this macro in 2004.

2 years agoSwitch default to read-only, add -w for write access (previous default)
kn [Tue, 4 Oct 2022 23:33:22 +0000 (23:33 +0000)]
Switch default to read-only, add -w for write access (previous default)

Write access seems less often required these days and other ways to ensure
effective read-only access are mere workarounds;  worst case malicious users
can fill up the server's disk by writing to existing files.

diskless(8) only ever needs to read and running with "stdio rpath dns inet"
by default is much safer for a network daemon without any authentication.

Initially proposed as a new -R flag for read-only mode
new default suggestion dlg deraadt
"looks great" millert
OK sthen dlg

2 years agoCorrectly check for DH_compute_key() error
tb [Tue, 4 Oct 2022 20:46:13 +0000 (20:46 +0000)]
Correctly check for DH_compute_key() error

DH_size() only gives an upper bound for the size of the key. The key can be
shorter.

Found after anton reported sporadic regress test failures

ok jsing

2 years agoReplace temporary file with variable
kn [Tue, 4 Oct 2022 19:59:10 +0000 (19:59 +0000)]
Replace temporary file with variable

On supported -release systems, syspatch(8) -c is run from rc.firsttime(8)
and the list of patches it pretty-printed if non-empty.

-c output fits into a shell variable, not needing a temporary file, which
is also what usr.sbin/syspatch/syspatch.sh does internally.

OK millert

2 years agoOn CPUs that support the Data Independent Timing feature, enable this feature
kettenis [Tue, 4 Oct 2022 19:41:21 +0000 (19:41 +0000)]
On CPUs that support the Data Independent Timing feature, enable this feature
by default in both the kernel and userland.  At this point, this feature has
only been seen on Apple's CPU cores, where turning it on has no measurable
impact on performance.  Turning this feature on should help to mitigate
timing side-channel attacks.

ok deraadt@, beck@

2 years agoRepair Apple-specific translation support broken by mistake in 1.88; reported
miod [Tue, 4 Oct 2022 19:38:20 +0000 (19:38 +0000)]
Repair Apple-specific translation support broken by mistake in 1.88; reported
by Leonardo Moreno

2 years agoAdd a few more PSTATE bits.
kettenis [Tue, 4 Oct 2022 19:36:20 +0000 (19:36 +0000)]
Add a few more PSTATE bits.

ok deraadt@

2 years agosh(1) is not make(1), use newlines inside double quotes
kn [Tue, 4 Oct 2022 19:34:44 +0000 (19:34 +0000)]
sh(1) is not make(1), use newlines inside double quotes

sh(1) happily accepts newlines inside double quotes just like in scripts:

        $ sh -c "echo foo
echo bar"
foo
bar

So no need to squash things into a single line as usually done inside make
targets where each makefile line is considered its own script unless
continued with trailing backslashes.

OK millert

2 years agofix an obvious thinko without serious consequences in the display of e
espie [Tue, 4 Oct 2022 15:31:02 +0000 (15:31 +0000)]
fix an obvious thinko without serious consequences in the display of e
for rsa and friends.

okay tb@

2 years agoBetter path handling description, also document tzname, timezone daylight.
millert [Tue, 4 Oct 2022 13:33:57 +0000 (13:33 +0000)]
Better path handling description, also document tzname, timezone daylight.
Explicitly mention that most programs do not need to call tzset() directly.
OK deraadt@ jmc@ benno@

2 years agoSort commands in help output, add help to manual
kn [Tue, 4 Oct 2022 08:03:26 +0000 (08:03 +0000)]
Sort commands in help output, add help to manual

OK millert
Feedback OK jmc

2 years agoDrop cpath promise unless file creation is allowed
kn [Tue, 4 Oct 2022 07:05:28 +0000 (07:05 +0000)]
Drop cpath promise unless file creation is allowed

OK millert

2 years agoOnly print prompt in interactive usage
kn [Tue, 4 Oct 2022 07:03:27 +0000 (07:03 +0000)]
Only print prompt in interactive usage

Scripting tftp(1) makes it non-interactive, yet the prompt is still
printed and may mess up the shell's PS1:
$ echo put nonexistent | tftp localhost
tftp> tftp: open: nonexistent: No such file or directory
tftp> $

The fix seems easy and works as expected for multiple commands as well:
$ echo 'verbose\nput nonexistent' | ./obj/tftp localhost
Verbose mode on.
tftp: open: nonexistent: No such file or directory
$

OK millert

2 years agoUnveil /tftpboot only if needed
kn [Tue, 4 Oct 2022 07:01:38 +0000 (07:01 +0000)]
Unveil /tftpboot only if needed

Unless -t is used, this directory is not accessed in any way.

OK millert

2 years agoDon't print device when passed as an argument
kn [Tue, 4 Oct 2022 06:52:52 +0000 (06:52 +0000)]
Don't print device when passed as an argument

r1.11 "Don't print device name on failure" made it print unconditionally,
which contradicts what the manual says.

Report + diff from Brin Conway <bconway AT rcesoftware DOT com>, thanks.

From Brian Conway

2 years agosync
deraadt [Tue, 4 Oct 2022 02:58:41 +0000 (02:58 +0000)]
sync

2 years agodapmic(4): support clean shutdown with the power button
jca [Mon, 3 Oct 2022 21:02:02 +0000 (21:02 +0000)]
dapmic(4): support clean shutdown with the power button

Register an interrupt handler and look for nONKEY events.
Mask off all other events.  Also clear the FAULT_LOG register at
startup, but don't attempt to acknowledge its contents at runtime.  This
lets the user force a shutdown with a long power button press.  Some
events in EVENT_* or FAULT_LOG may benefit from more graceful handling.

This makes it possible to cleanly shutdown my Hifive Unmatched using
the power button.

Thanks to kettenis@ who wrote sfgpio(4) to handle dapmic(4) interrupts
on the Unmatched.  ok kettenis@

2 years agoReorganize the EFI code a bit. Move the efi.h header from dev/acpi to
kettenis [Mon, 3 Oct 2022 19:32:22 +0000 (19:32 +0000)]
Reorganize the EFI code a bit.  Move the efi.h header from dev/acpi to
dev/efi and rename the arm64 efi.c to efi_machdep.c, preparing the way
for MI EFI code and an amd64 implementation of EFI runtime support.

ok deraadt@, mlarkin@

2 years agoSystem calls should not fail due to temporary memory shortage in
bluhm [Mon, 3 Oct 2022 16:43:52 +0000 (16:43 +0000)]
System calls should not fail due to temporary memory shortage in
malloc(9) or pool_get(9).
Pass down a wait flag to pru_attach().  During syscall socket(2)
it is ok to wait, this logic was missing for internet pcb.  Pfkey
and route sockets were already waiting.
sonewconn() must not wait when called during TCP 3-way handshake.
This logic has been preserved.  Unix domain stream socket connect(2)
can wait until the other side has created the socket to accept.
OK mvs@

2 years agoAllow TZ to contain absolutes paths starting with /usr/share/zoneinfo/
millert [Mon, 3 Oct 2022 15:34:39 +0000 (15:34 +0000)]
Allow TZ to contain absolutes paths starting with /usr/share/zoneinfo/
Other absolutes paths are still rejected.

2 years agoAdd a second membar producer into counters_zero(). Now it is
bluhm [Mon, 3 Oct 2022 14:10:53 +0000 (14:10 +0000)]
Add a second membar producer into counters_zero().  Now it is
symmetric to counters_read().
OK jmatthew@

2 years agodrm/amdgpu: don't register a dirty callback for non-atomic
jsg [Mon, 3 Oct 2022 12:02:12 +0000 (12:02 +0000)]
drm/amdgpu: don't register a dirty callback for non-atomic

From Alex Deucher
21b0301f2234112fbe5cfc1e13968f0a12f0f2d2 in linux 5.15.y/5.15.71
abbc7a3dafb91b9d4ec56b70ec9a7520f8e13334 in mainline linux

2 years agodrm/amd/display: Mark dml30's UseMinimumDCFCLK() as noinline for stack usage
jsg [Mon, 3 Oct 2022 11:59:53 +0000 (11:59 +0000)]
drm/amd/display: Mark dml30's UseMinimumDCFCLK() as noinline for stack usage

From Nathan Chancellor
1c26968caf181add92bbf556e3eb3c14ccbe7fa2 in linux 5.15.y/5.15.71
41012d715d5d7b9751ae84b8fb255e404ac9c5d0 in mainline linux

2 years agodrm/amd/display: Reduce number of arguments of dml31's CalculateFlipSchedule()
jsg [Mon, 3 Oct 2022 11:57:51 +0000 (11:57 +0000)]
drm/amd/display: Reduce number of arguments of dml31's CalculateFlipSchedule()

From Nathan Chancellor
492db4ffcff3c3bac1f36bbb100e45c9fe718e34 in linux 5.15.y/5.15.71
21485d3da659b66c37d99071623af83ee1c6733d in mainline linux

2 years agodrm/amd/display: Reduce number of arguments of dml31's CalculateWatermarksAndDRAMSpee...
jsg [Mon, 3 Oct 2022 11:56:02 +0000 (11:56 +0000)]
drm/amd/display: Reduce number of arguments of dml31's CalculateWatermarksAndDRAMSpeedChangeSupport()

From Nathan Chancellor
9539cfc744933198318eb061ffce87964559ff87 in linux 5.15.y/5.15.71
37934d4118e22bceb80141804391975078f31734 in mainline linux

2 years agodrm/amd/display: Limit user regamma to a valid value
jsg [Mon, 3 Oct 2022 11:52:57 +0000 (11:52 +0000)]
drm/amd/display: Limit user regamma to a valid value

From Yao Wang1
a541c011181823494c53b15020fae5c3b45f5ec2 in linux 5.15.y/5.15.71
3601d620f22e37740cf73f8278eabf9f2aa19eb7 in mainline linux

2 years agodrm/amdgpu: use dirty framebuffer helper
jsg [Mon, 3 Oct 2022 11:50:34 +0000 (11:50 +0000)]
drm/amdgpu: use dirty framebuffer helper

From Hamza Mahfooz
33b128f790b6df7e44e4435c6b9387b257637d15 in linux 5.15.y/5.15.71
66f99628eb24409cb8feb5061f78283c8b65f820 in mainline linux

2 years agodrm/amd/pm: disable BACO entry/exit completely on several sienna cichlid cards
jsg [Mon, 3 Oct 2022 11:48:47 +0000 (11:48 +0000)]
drm/amd/pm: disable BACO entry/exit completely on several sienna cichlid cards

From Guchun Chen
f76d6f309a685d24a32703b4d5c5a71e76f4b793 in linux 5.15.y/5.15.71
7c6fb61a400bf3218c6504cb2d48858f98822c9d in mainline linux

2 years agodrm/amd/amdgpu: fixing read wrong pf2vf data in SRIOV
jsg [Mon, 3 Oct 2022 11:46:17 +0000 (11:46 +0000)]
drm/amd/amdgpu: fixing read wrong pf2vf data in SRIOV

From Jingwen Chen
5f270b61ee8b01ab410e3e6ee4f4cc0b32300605 in linux 5.15.y/5.15.71
9a458402fb69bda886aa6cbe067311b6e3d9c52a in mainline linux

2 years agodrm/amdgpu: make sure to init common IP before gmc
jsg [Mon, 3 Oct 2022 11:42:42 +0000 (11:42 +0000)]
drm/amdgpu: make sure to init common IP before gmc

From Alex Deucher
55653c548612d7ffbb21cf05ebff6d14f79cc913 in linux 5.15.y/5.15.71
a8671493d2074950553da3cf07d1be43185ef6c6 in mainline linux

2 years agodrm/amdgpu: Separate vf2pf work item init from virt data exchange
jsg [Mon, 3 Oct 2022 11:39:40 +0000 (11:39 +0000)]
drm/amdgpu: Separate vf2pf work item init from virt data exchange

From Victor Skvortsov
25a90a11036b6fd385ee75536b78659fc481d529 in linux 5.15.y/5.15.71
892deb48269c65376f3eeb5b4c032ff2c2979bd7 in mainline linux

2 years agoadd noinline_for_stack for 5.15.71 drm
jsg [Mon, 3 Oct 2022 11:30:27 +0000 (11:30 +0000)]
add noinline_for_stack for 5.15.71 drm

2 years agodrm/amdgpu: move nbio sdma_doorbell_range() into sdma code for vega
jsg [Mon, 3 Oct 2022 10:18:28 +0000 (10:18 +0000)]
drm/amdgpu: move nbio sdma_doorbell_range() into sdma code for vega

From Alex Deucher
8c2bbfb0ded3f41e2985a7856da56f130288d926 in linux 5.15.y/5.15.70
e3163bc8ffdfdb405e10530b140135b2ee487f89 in mainline linux

2 years agodrm/amdgpu: move nbio ih_doorbell_range() into ih code for vega
jsg [Mon, 3 Oct 2022 10:16:12 +0000 (10:16 +0000)]
drm/amdgpu: move nbio ih_doorbell_range() into ih code for vega

From Alex Deucher
0a7d86f156fad2a4420404c1f71c9ee79970ab0c in linux 5.15.y/5.15.70
dc1d85cb790f2091eea074cee24a704b2d6c4a06 in mainline linux

2 years agodrm/amdgpu: Don't enable LTR if not supported
jsg [Mon, 3 Oct 2022 10:13:23 +0000 (10:13 +0000)]
drm/amdgpu: Don't enable LTR if not supported

From Lijo Lazar
dcef16f64969eefb83c8711173fd025611f258f8 in linux 5.15.y/5.15.70
6c20490663553cd7e07d8de8af482012329ab9d6 in mainline linux

2 years agodefine CONFIG_PCIEASPM, add ltr_path to struct pci_dev for 5.15.70 drm
jsg [Mon, 3 Oct 2022 10:07:01 +0000 (10:07 +0000)]
define CONFIG_PCIEASPM, add ltr_path to struct pci_dev for 5.15.70 drm

2 years agoregen
jsg [Mon, 3 Oct 2022 05:39:59 +0000 (05:39 +0000)]
regen

2 years agoadd id for Raphael, Ryzen 7000 GPU (gfx1036, GC 10.3.6?)
jsg [Mon, 3 Oct 2022 05:39:07 +0000 (05:39 +0000)]
add id for Raphael, Ryzen 7000 GPU (gfx1036, GC 10.3.6?)

2 years agoFetch vendor and product IDs from the keyboard/touchpad controller.
kettenis [Sun, 2 Oct 2022 19:00:46 +0000 (19:00 +0000)]
Fetch vendor and product IDs from the keyboard/touchpad controller.
To be used in a future diff to handle machines with touchbar a bit better.

ok robert@

2 years agoDynamically link libssl for QUIC regress.
jsing [Sun, 2 Oct 2022 16:40:56 +0000 (16:40 +0000)]
Dynamically link libssl for QUIC regress.

Now that the QUIC API is public, we can stop linking this statically.

2 years agoRemove unused headers.
jsing [Sun, 2 Oct 2022 16:39:39 +0000 (16:39 +0000)]
Remove unused headers.

2 years agoRevise for SSL_CTX_INTERNAL and SSL_INTERNAL removal.
jsing [Sun, 2 Oct 2022 16:38:23 +0000 (16:38 +0000)]
Revise for SSL_CTX_INTERNAL and SSL_INTERNAL removal.

2 years agoGet rid of SSL_CTX_INTERNAL and SSL_INTERNAL.
jsing [Sun, 2 Oct 2022 16:36:41 +0000 (16:36 +0000)]
Get rid of SSL_CTX_INTERNAL and SSL_INTERNAL.

These are no longer necessary due to SSL_CTX and SSL now being fully
opaque. Merge SSL_CTX_INTERNAL back into SSL_CTX and SSL_INTERNAL back
into SSL.

Prompted by tb@

2 years agoRemove unused DEBUG_LINE define.
mpi [Sun, 2 Oct 2022 11:56:43 +0000 (11:56 +0000)]
Remove unused DEBUG_LINE define.

2 years agoThe syscall table generation awk script was also used by compat layers
deraadt [Sat, 1 Oct 2022 23:49:38 +0000 (23:49 +0000)]
The syscall table generation awk script was also used by compat layers
in the past, but those compat layers are gone.  Remove support for the
"config file"
ok miod millert

2 years agoMove handshake message handling functions from ssl_both.c to client/server.
jsing [Sat, 1 Oct 2022 16:23:15 +0000 (16:23 +0000)]
Move handshake message handling functions from ssl_both.c to client/server.

Currently, ssl_both.c contains several functions that are used by both the
legacy client and legacy server. This interwines the client and server,
making it harder to make progressive changes. While it does deduplicate
some code, it also ends up with code that is conditioned on s->server and
forces the caller to pass in SSL3_ST_* values.

Move these functions from ssl_both.c into ssl_clnt.c and ssl_srvr.c,
renaming as appropriate and removing the s->server conditionals. Also move
the client and server function prototypes from ssl_locl.h into the .c
files, making them static in the process.

ok tb@

2 years agore-enable POOL_DEBUG
jsg [Fri, 30 Sep 2022 02:56:23 +0000 (02:56 +0000)]
re-enable POOL_DEBUG
ok deraadt@

2 years agoFILES:
jmc [Thu, 29 Sep 2022 16:52:31 +0000 (16:52 +0000)]
FILES:
- fix the crazy list width
- since there's only one item, -compact makes no sense

2 years agoThere no longer is any KVM_ET_* to keep in sync with UVM_ET_*, so
deraadt [Thu, 29 Sep 2022 04:10:27 +0000 (04:10 +0000)]
There no longer is any KVM_ET_* to keep in sync with UVM_ET_*, so
comment can be deleted.

2 years agouse Fn rather than Nm for swab(); from josiah frentsos
jmc [Wed, 28 Sep 2022 20:27:12 +0000 (20:27 +0000)]
use Fn rather than Nm for swab(); from josiah frentsos

2 years agoFix incorrect range check for size in setvbuf
gnezdo [Wed, 28 Sep 2022 16:44:14 +0000 (16:44 +0000)]
Fix incorrect range check for size in setvbuf

From enh AT google.com:

The existing test is wrong for LP64, where size_t has twice as many
relevant bits as int, not just one. (Found by inspection by
rprichard.)

Looks good to deraadt@ and millert@

2 years agoFix memory corruptions with sysv semaphores due to sleeps in copyin,
mbuhl [Wed, 28 Sep 2022 13:21:13 +0000 (13:21 +0000)]
Fix memory corruptions with sysv semaphores due to sleeps in copyin,
copyout and malloc.  During a sleep another thread could delete the
semaphore (and possibly allocate another one at the same location
with different permissions) which would lead to an invalid access
after wake up.  Therefore check the semaphore pointer, the sequence,
the permissions and some values in seminfo after each sleep.
OK bluhm@
Reported-by: syzbot+60ba811fe2e8a6b0f975@syzkaller.appspotmail.com
2 years agoAdd scroll-top and scroll-bottom commands to scroll so cursor is at top
nicm [Wed, 28 Sep 2022 07:59:50 +0000 (07:59 +0000)]
Add scroll-top and scroll-bottom commands to scroll so cursor is at top
or bottom. From Anindya Mukherjee, GitHub issue 3334.

2 years agoAdd a -T flag to capture-pane to stop at the last used cell instead of
nicm [Wed, 28 Sep 2022 07:55:29 +0000 (07:55 +0000)]
Add a -T flag to capture-pane to stop at the last used cell instead of
the full width. Restore the previous behaviour by making it default to
off unless -J is used (the only time it matters). Fixes mosh unit tests;
GitHub issue 3339.

2 years agocomplete bootparamd -> rpc.bootparamd
kn [Tue, 27 Sep 2022 13:30:36 +0000 (13:30 +0000)]
complete bootparamd -> rpc.bootparamd

reminded by jmc

2 years agoAvoid escaping inside here documents
kn [Tue, 27 Sep 2022 12:28:25 +0000 (12:28 +0000)]
Avoid escaping inside here documents

The delimiter can be quoted (single or double) to disable parameter, command
and arithmetic expansion inside the here document:

$ cat <<__EOT
echo $(echo foo)
__EOT
echo foo

$ cat <<'__EOT'
echo $(echo foo)
__EOT
echo $(echo foo)

Do the latter to be able to write the here document/file content exactly as
it would end up in output/rc.firsttime, making it easier to read.

To be more consistent and explicit, switch the remaining here documents with
pure plain text (no shell expansion, etc.) to quoted delimiters.

OK millert

2 years agosimpler ftplist[0-9].o.o removal
kn [Tue, 27 Sep 2022 12:22:29 +0000 (12:22 +0000)]
simpler ftplist[0-9].o.o removal

We read /tmp/i/hosts line-wise to fill /mnt/etc/hosts and remove the tmp
file immediately afterwards, so just skip ftplist entries inside the loop
with a slightly easier to read ksh pattern rather than purge the tmp file
up-front with sed(1).

This is also a tiny bit more robust should the ftplist entries ever be added
with a tab as separator instead of a space and/or an alias since the sed
one-liner hardcodes a single space and expects no alias whereas ksh's read
takes any amount of whitespace between _addr and _hn while not caring about
optional aliases.

Comment is obvious so zap it.

OK millert

2 years agoZap .Nm bootparamd
kn [Tue, 27 Sep 2022 11:52:29 +0000 (11:52 +0000)]
Zap .Nm bootparamd

Match rpc.{lock,stat}d(8) only having their proper name.

OK deraadt

2 years agofix passing explicit stage files
kn [Tue, 27 Sep 2022 11:48:57 +0000 (11:48 +0000)]
fix passing explicit stage files

This fixes installboot regress on octeon; same diff as
macppc_installboot.c r1.6, powerpc64_installboot r1.7 and
octeon_installboot r1.8.

loongson was the last architecture requiring this fix.  I don't have a
machine to test it myself (loongson isn't built anymore, anyway) but given
the same diff works on four other architectures, this should just work.

2 years agofix passing explicit stage files
kn [Tue, 27 Sep 2022 11:42:16 +0000 (11:42 +0000)]
fix passing explicit stage files

This fixes installboot regress on octeon;  same diff as
macppc_installboot.c r1.6 and powerpc64_installboot r1.7.

2 years agofix passing explicit stage files
kn [Tue, 27 Sep 2022 11:31:46 +0000 (11:31 +0000)]
fix passing explicit stage files

This fixes installboot regress on powerpc64.

The exact same diff already landed for macppc;  efi also has the same fix
for md_init() but without the string handling cleanup that entails.

macppc_installboot.c r1.6 "Fix passing explicit stage files":

Using `stage1' leads to a bit more cleanup since early MI installboot.c
handles `-r', i.e. write_filesystem() no longer has needs to do the
fileprefix() dance itself.

OK gkoehler

2 years ago- no more /usr/include/objc; confirmed by miod
jmc [Tue, 27 Sep 2022 05:53:32 +0000 (05:53 +0000)]
- no more /usr/include/objc; confirmed by miod
- add /var/agentx; text from martijn

2 years agotyping ^C and seeing "terminated by signal %d" is so ... I don't
deraadt [Tue, 27 Sep 2022 03:01:42 +0000 (03:01 +0000)]
typing ^C and seeing "terminated by signal %d" is so ... I don't
have the words
ok florian