openbsd
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

21 months agoptrace reads/writes memory using uvm_io, which generates an temporary
deraadt [Tue, 24 Jan 2023 00:12:03 +0000 (00:12 +0000)]
ptrace reads/writes memory using uvm_io, which generates an temporary
alias mapping using uvm_map_extract.  With xonly now operational, this
alias mapping is created with minprot, which for text will be xonly, and
the kernel cannot read it (unless the architecture has implied read for
exec from kernel pov).
Pass UVM_IO_FIXPROT to create the alias with maxprot instead.
ok kettenis

21 months agoMake sure pmap_extract() doesn't incorrectly return success when invoked
miod [Mon, 23 Jan 2023 19:31:41 +0000 (19:31 +0000)]
Make sure pmap_extract() doesn't incorrectly return success when invoked
on behalf of an invalid but not page-aligned address.

ok kettenis@

21 months agoRemove "sb == &so->so_rcv || sb == &so->so_snd" assertion from
mvs [Mon, 23 Jan 2023 18:35:13 +0000 (18:35 +0000)]
Remove "sb == &so->so_rcv || sb == &so->so_snd" assertion from
sb_notify() and sbspace(). Now it's overkilling.

ok bluhm@

21 months agoMove SS_ISSENDING flag to `sb_state'. It should belong to the send
mvs [Mon, 23 Jan 2023 18:34:24 +0000 (18:34 +0000)]
Move SS_ISSENDING flag to `sb_state'. It should belong to the send
buffer as the SS_CANTSENDMORE flag.

ok bluhm@

21 months agoIn somove() rename `state' variable to `rcvstate' to make code more
mvs [Mon, 23 Jan 2023 18:33:34 +0000 (18:33 +0000)]
In somove() rename `state' variable to `rcvstate' to make code more
readable. No functional changes.

Proposed by and ok bluhm@

21 months agoChange include from _internal_s2n_bignum.h to s2n_bignum_internal.h.
jsing [Mon, 23 Jan 2023 18:26:56 +0000 (18:26 +0000)]
Change include from _internal_s2n_bignum.h to s2n_bignum_internal.h.

21 months agoInclude the ISC license from s2n-bignum's LICENSE file.
jsing [Mon, 23 Jan 2023 18:25:36 +0000 (18:25 +0000)]
Include the ISC license from s2n-bignum's LICENSE file.

21 months agoBring in various s2n-bignum functions for amd64.
jsing [Mon, 23 Jan 2023 18:22:15 +0000 (18:22 +0000)]
Bring in various s2n-bignum functions for amd64.

This brings in bignum_add(), bignum_cmadd(), bignum_cmul(), bignum_mul()
and bignum_sub(), along with bignum_{mul,sqr}_4_8_alt() and
bignum_{mul,sqr}_8_16_alt().

Discussed with tb@

21 months agomore comments, space and -- nits
kn [Mon, 23 Jan 2023 14:49:16 +0000 (14:49 +0000)]
more comments, space and -- nits

21 months agoMove bn_mul_add_words() and bn_mul_words() from bn_asm.c to bn_mul.c.
jsing [Mon, 23 Jan 2023 12:17:57 +0000 (12:17 +0000)]
Move bn_mul_add_words() and bn_mul_words() from bn_asm.c to bn_mul.c.

These are wrapped with #ifndef HAVE_BN_ADD_MUL_WORDS/HAVE_BN_MUL_WORDS,
which are defined for architectures that provide their own assembly
versions.

21 months agoMove bn_sqr_words from bn_asm.c to bn_sqr.c.
jsing [Mon, 23 Jan 2023 12:09:06 +0000 (12:09 +0000)]
Move bn_sqr_words from bn_asm.c to bn_sqr.c.

This is wrapped with #ifndef HAVE_BN_SQR_WORDS, which is then defined for
architectures that provide their own assembly versions.

21 months agoMove bn_div_words from bn_asm.c to bn_div.c.
jsing [Mon, 23 Jan 2023 12:02:48 +0000 (12:02 +0000)]
Move bn_div_words from bn_asm.c to bn_div.c.

This is wrapped with #ifndef HAVE_BN_DIV_WORDS, which are defined for
architectures that provide their own assembly versions.

21 months agoInclude bn_arch.h now that we're using defines from it.
jsing [Mon, 23 Jan 2023 10:34:21 +0000 (10:34 +0000)]
Include bn_arch.h now that we're using defines from it.

21 months agoMove bn_add_words() and bn_sub_words from bn_asm.c to bn_add.c.
jsing [Mon, 23 Jan 2023 10:31:03 +0000 (10:31 +0000)]
Move bn_add_words() and bn_sub_words from bn_asm.c to bn_add.c.

These are wrapped with #ifndef HAVE_BN_ADD_WORDS/HAVE_BN_SUB_WORDS, which
are defined for architectures that provide their own assembly versions.

21 months agoregen
jsg [Mon, 23 Jan 2023 10:14:15 +0000 (10:14 +0000)]
regen

21 months agoadd amdgpu device ids newly matched with 6.1 drm
jsg [Mon, 23 Jan 2023 10:13:46 +0000 (10:13 +0000)]
add amdgpu device ids newly matched with 6.1 drm
another Cyan Skillfish and Aldebaran/MI200

21 months agoRegen.
nicm [Mon, 23 Jan 2023 09:38:03 +0000 (09:38 +0000)]
Regen.

21 months agoAdd Backtab key, based on a change from Crystal Kolipe kolipe.c at
nicm [Mon, 23 Jan 2023 09:36:39 +0000 (09:36 +0000)]
Add Backtab key, based on a change from Crystal Kolipe kolipe.c at
exoticsilicon dot com.

ok miod

21 months agoToo many \s in example, GitHub issue 3445.
nicm [Mon, 23 Jan 2023 09:33:51 +0000 (09:33 +0000)]
Too many \s in example, GitHub issue 3445.

21 months agoregen
jsg [Mon, 23 Jan 2023 05:19:44 +0000 (05:19 +0000)]
regen

21 months agochange ATI "Yellow Carp" string to "Rembrandt"
jsg [Mon, 23 Jan 2023 05:19:10 +0000 (05:19 +0000)]
change ATI "Yellow Carp" string to "Rembrandt"

Yellow Carp is the codename used by drm and linux amdgpu firmware.
In product specifications AMD uses Rembrandt.

Mesa renamed last year in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16604

Ryzen 6000 Series / Rembrandt graphics are marketed as Radeon 660M and
Radeon 680M.  These share the same device id of 0x1681.

Ryzen 7035 Series / Rembrandt-R also use Radeon 660M and Radeon 680M.
It is unclear if they use a device id of 0x1681 or 0x164d.

21 months agoadd a placeholder for GC 11.0.4 device ids
jsg [Mon, 23 Jan 2023 03:01:52 +0000 (03:01 +0000)]
add a placeholder for GC 11.0.4 device ids

GC 11.0.4 support will be backported to linux 6.1.y at the request of
Mario Limonciello of AMD on the linux stable list.

Known to be an APU from amdgpu_discovery_set_ip_blocks().
Firmware not currently in linux-firmware git.

21 months agoFix pf_anchor_stackframe commit to revert pf rule matching to the
yasuoka [Sun, 22 Jan 2023 23:05:51 +0000 (23:05 +0000)]
Fix pf_anchor_stackframe commit to revert pf rule matching to the
previous behavior that stops when any rule matches within quick
anchors.

ok sasha kn

21 months agoFix list of possible values of MODRUBY_REV
tb [Sun, 22 Jan 2023 22:38:23 +0000 (22:38 +0000)]
Fix list of possible values of MODRUBY_REV

With Ruby 2.7 in the attic, MODRUBY_REV can no longer be set to 2.7.
It has been possible to set it to 3.2 for a while.

21 months agovmd(8): don't remove known vm's from the config on error.
dv [Sun, 22 Jan 2023 22:18:40 +0000 (22:18 +0000)]
vmd(8): don't remove known vm's from the config on error.

Multiple error paths, specifically the one related to if a guest
cannot allocate memory at start, resulted in a known vm (via
vm.conf(5)) being removed from the vm list. Adjust the error paths
to check if the failing vm is defined in the config before tearing
it down.

Tested with help from beck@ and Mischa Peters.

ok beck@

21 months agoUpdate documentation for removal of ruby27 FLAVOR
jeremy [Sun, 22 Jan 2023 20:57:21 +0000 (20:57 +0000)]
Update documentation for removal of ruby27 FLAVOR

21 months agoFix incorrect comparison. Restores ability to edit 'p'.
krw [Sun, 22 Jan 2023 19:57:25 +0000 (19:57 +0000)]
Fix incorrect comparison. Restores ability to edit 'p'.

21 months agogptimer(4): remove dead MD microtime(9) implementation
cheloha [Sun, 22 Jan 2023 18:36:38 +0000 (18:36 +0000)]
gptimer(4): remove dead MD microtime(9) implementation

21 months agoCope with xonly on amd64 by moving the testfly routine to the rodata
anton [Sun, 22 Jan 2023 16:38:36 +0000 (16:38 +0000)]
Cope with xonly on amd64 by moving the testfly routine to the rodata
section.

21 months agoSimplify the (so far unused) apm_record_event() function a bit and use it
kettenis [Sun, 22 Jan 2023 13:14:21 +0000 (13:14 +0000)]
Simplify the (so far unused) apm_record_event() function a bit and use it
to send a resume event to userland when we come out of suspend.

ok deraadt@

21 months agoMove SS_CANTRCVMORE and SS_RCVATMARK bits from `so_state' to `sb_state' of
mvs [Sun, 22 Jan 2023 12:05:44 +0000 (12:05 +0000)]
Move SS_CANTRCVMORE and SS_RCVATMARK bits from `so_state' to `sb_state' of
receive buffer. As it was done for SS_CANTSENDMORE bit, the definition
kept as is, but now these bits belongs to the `sb_state' of receive
buffer. `sb_state' ored with `so_state' when socket data exporting to the
userland.

ok bluhm@

21 months agoRemove dead/unused prototypes
miod [Sat, 21 Jan 2023 19:39:28 +0000 (19:39 +0000)]
Remove dead/unused prototypes

21 months agoIntroduce `rt_lock' rwlock(9) and use it instead of kernel lock to
mvs [Sat, 21 Jan 2023 17:35:01 +0000 (17:35 +0000)]
Introduce `rt_lock' rwlock(9) and use it instead of kernel lock to
serialize arpcache() and arpresolve(). In fact, net stack already has
sleep points, so the rwlock(9) is better here because we avoid
intersection with the rest of kernel locked paths. Also this new lock
assumed to use to route layer protection instead of netlock.

Hrvoje Popovski had tested this diff and found no visible performance
impact.

ok bluhm@

21 months agoEnable bn_sqr() on amd64.
jsing [Sat, 21 Jan 2023 17:30:50 +0000 (17:30 +0000)]
Enable bn_sqr() on amd64.

ok tb@

21 months agoProvide an implementation of bn_sqr() that calls s2n-bignum's bignum_sqr().
jsing [Sat, 21 Jan 2023 17:29:56 +0000 (17:29 +0000)]
Provide an implementation of bn_sqr() that calls s2n-bignum's bignum_sqr().

ok tb@

21 months agoFix include.
jsing [Sat, 21 Jan 2023 16:35:18 +0000 (16:35 +0000)]
Fix include.

21 months agoInclude the ISC license from s2n-bignum's LICENSE file.
jsing [Sat, 21 Jan 2023 16:30:57 +0000 (16:30 +0000)]
Include the ISC license from s2n-bignum's LICENSE file.

21 months agoBring in s2n-bignum's bignum_sqr() for amd64.
jsing [Sat, 21 Jan 2023 16:29:52 +0000 (16:29 +0000)]
Bring in s2n-bignum's bignum_sqr() for amd64.

ok tb@

21 months agoeditor_resize(), editor_change(), editor_modify() and
krw [Sat, 21 Jan 2023 16:20:25 +0000 (16:20 +0000)]
editor_resize(), editor_change(), editor_modify() and
editor_name() use identical logic to choose a partition to act
on, with some minor verbiage differences.

Extract getpartno() to contain/tighten this logic and shrink the
editor_* functions by using it.

No intentional functional change but for verbiage tweaks.

21 months agoInclude the ISC license from s2n-bignum's LICENSE file.
jsing [Sat, 21 Jan 2023 15:53:54 +0000 (15:53 +0000)]
Include the ISC license from s2n-bignum's LICENSE file.

21 months agoBring in the internal and "public" headers for s2n-bignum.
jsing [Sat, 21 Jan 2023 15:51:17 +0000 (15:51 +0000)]
Bring in the internal and "public" headers for s2n-bignum.

s2n-bignum provides a collection of bignum routines that are written in
pure machine code. Each function is written in constant-time style and
has a formal proof. We intend on making use of these for libcrypto's
bignum implementation on aarch64 and amd64.

ok tb@

21 months agoRefactor BN_mul().
jsing [Sat, 21 Jan 2023 15:40:13 +0000 (15:40 +0000)]
Refactor BN_mul().

This splits BN_mul() into two parts, one of which is a separate bn_mul()
function. This makes the code more readable and managable, while also
providing a better entry point for assembly optimisation. A separate
bn_mul() is provided for the BN_RECURSION implementation, to reduce
complexity.

This also enables bn_mul_comba4() for four word long bignums - this was
disabled for unknown reasons.

ok tb@

21 months agoenable --exec-only as default on AMD64. There will be a some ports fallout
deraadt [Sat, 21 Jan 2023 15:38:05 +0000 (15:38 +0000)]
enable --exec-only as default on AMD64.  There will be a some ports fallout
for a little while more (a few more data tables inside text), but they are
being handled quickly
ok tb naddy

21 months agoRefactor BN_sqr().
jsing [Sat, 21 Jan 2023 14:10:46 +0000 (14:10 +0000)]
Refactor BN_sqr().

This splits BN_sqr() into two parts, one of which is a separate bn_sqr()
function. This makes the code more readable and managable, while also
providing a better entry point for assembly optimisation.

ok tb@

21 months agoProvide basic benchmarks for BN_mul() and BN_sqr().
jsing [Sat, 21 Jan 2023 13:24:39 +0000 (13:24 +0000)]
Provide basic benchmarks for BN_mul() and BN_sqr().

21 months agoIntroduce per-sockbuf `sb_state' to use it with SS_CANTSENDMORE.
mvs [Sat, 21 Jan 2023 11:23:23 +0000 (11:23 +0000)]
Introduce per-sockbuf `sb_state' to use it with SS_CANTSENDMORE.

This time, socket's buffer lock requires solock() to be held. As a part of
socket buffers standalone locking work, move socket state bits which
represent its buffers state to per buffer state.

Opposing the previous reverted diff, the SS_CANTSENDMORE definition left
as is, but it used only with `sb_state'. `sb_state' ored with original
`so_state' when socket's data exported to the userland, so the ABI kept as
it was.

Inputs from deraadt@.

ok bluhm@

21 months agoThe Qualcomm UEFI Secure Application that handles EFI variables seems to
kettenis [Sat, 21 Jan 2023 10:34:49 +0000 (10:34 +0000)]
The Qualcomm UEFI Secure Application that handles EFI variables seems to
insist on shared memory in the low 4G of the physical address space.
Use bus_dmamem_alloc_range(9) to make sure this is the case.

Makes setting and getting the RTC time reliable.

ok patrick@, deraadt@, phessler@

21 months agoMake bus_dmamem_alloc_range(9) API available.
kettenis [Sat, 21 Jan 2023 10:30:11 +0000 (10:30 +0000)]
Make bus_dmamem_alloc_range(9) API available.

ok patrick@, deraadt@, phessler@

21 months agoReorder functions and drop unnessary static prototypes.
jsing [Sat, 21 Jan 2023 09:21:11 +0000 (09:21 +0000)]
Reorder functions and drop unnessary static prototypes.

No functional change.

21 months agosync EXTRACT_CASES and PATCH_CASES with reality
kn [Sat, 21 Jan 2023 09:01:55 +0000 (09:01 +0000)]
sync EXTRACT_CASES and PATCH_CASES with reality

xz handles .lz now, we deal with zstd patches by default, bzip2 and gzip
have command variables.

21 months agoRefactor x509v3_cache_extensions
job [Fri, 20 Jan 2023 22:00:47 +0000 (22:00 +0000)]
Refactor x509v3_cache_extensions

Simplify x509v3_cache_extensions() by using a wrapper to avoid
duplication of code for locking and checking the EXFLAG_INVALID flag.

OK tb@

21 months agoAdd a flag to display-menu to select the manu item chosen first, GitHub
nicm [Fri, 20 Jan 2023 21:36:00 +0000 (21:36 +0000)]
Add a flag to display-menu to select the manu item chosen first, GitHub
issue 3442.

21 months agoeditor_name() and get_mp() don't change the disklabel so
krw [Fri, 20 Jan 2023 17:47:07 +0000 (17:47 +0000)]
editor_name() and get_mp() don't change the disklabel so
const'ify some parameters and local variables.

21 months agoRemove various #ifndef BN_SQR_COMBA.
jsing [Fri, 20 Jan 2023 17:34:52 +0000 (17:34 +0000)]
Remove various #ifndef BN_SQR_COMBA.

bn_sqr_comba{4,8}() is now always available.

ok tb@

21 months agoMove bn_{mul,sqr}_comba{4,8}() from bn_asm.c to bn_mul.c/bn_sqr.c.
jsing [Fri, 20 Jan 2023 17:31:52 +0000 (17:31 +0000)]
Move bn_{mul,sqr}_comba{4,8}() from bn_asm.c to bn_mul.c/bn_sqr.c.

Wrap these in HAVE_BN_{MUL,SQR}_COMBA{4,8} defines. Add these defines to
bn_arch.h where the architecture currently provides its own version.

ok tb@

21 months agoMove {mul,sqr}_add_c{,2} macros from bn_asm.c to bn_local.h.
jsing [Fri, 20 Jan 2023 17:26:03 +0000 (17:26 +0000)]
Move {mul,sqr}_add_c{,2} macros from bn_asm.c to bn_local.h.

These depend on other macros that are in already in bn_local.h and this
makes them available to other source files. A lot more clean up will be
needed in the future.

Of course x86_64-gcc.c makes use of the same macro names - sprinkle some
undef in there for the time being.

ok tb@

21 months agoThe locale is ignored on OpenBSD, match the wording used in isalpha.3.
millert [Fri, 20 Jan 2023 17:21:12 +0000 (17:21 +0000)]
The locale is ignored on OpenBSD, match the wording used in isalpha.3.
OK schwarze@