openbsd
19 months agodrm/display/dp_mst: Add drm_atomic_get_old_mst_topology_state()
jsg [Mon, 27 Mar 2023 07:28:37 +0000 (07:28 +0000)]
drm/display/dp_mst: Add drm_atomic_get_old_mst_topology_state()

From Imre Deak
6130b22fb677430af8fe4a2ac4fbf2f5b8572d12 in linux-6.1.y/6.1.18
9ffdb67af0ee625ae127711845532f670cc6a4e7 in mainline linux

19 months agoRevert r1.1235, "simplify final MAKEDEV call"
tb [Mon, 27 Mar 2023 06:15:43 +0000 (06:15 +0000)]
Revert r1.1235, "simplify final MAKEDEV call"

While MAKEDEV accepts multiple args, it complains loudly on repeated args.
It is silent when trying to create a single already existing device.
This is probably a bug in MAKEDEV.

19 months agodrm/edid: fix parsing of 3D modes from HDMI VSDB
jsg [Mon, 27 Mar 2023 04:31:12 +0000 (04:31 +0000)]
drm/edid: fix parsing of 3D modes from HDMI VSDB

From Jani Nikula
f0f427f3858fda994fe26aacdb7a51815995f035 in linux-6.1.y/6.1.16
72794d16bd535a984e6653a18f5862405b49b5f9 in mainline linux

19 months agodrm/edid: fix AVI infoframe aspect ratio handling
jsg [Mon, 27 Mar 2023 04:29:05 +0000 (04:29 +0000)]
drm/edid: fix AVI infoframe aspect ratio handling

From Jani Nikula
26cbe4c63d1ed6b7e47ca196fd59f8a32ed353ca in linux-6.1.y/6.1.16
1cbc1f0d324ba6c4d1b10ac6362b5e0b029f63d5 in mainline linux

19 months agodrm/i915: Don't use BAR mappings for ring buffers with LLC
jsg [Mon, 27 Mar 2023 04:27:20 +0000 (04:27 +0000)]
drm/i915: Don't use BAR mappings for ring buffers with LLC

From John Harrison
be11d0d9c4eb7c2108ce9041b9e89c86856ca596 in linux-6.1.y/6.1.16
85636167e3206c3fbd52254fc432991cc4e90194 in mainline linux

19 months agodrm/i915: Don't use stolen memory for ring buffers with LLC
jsg [Mon, 27 Mar 2023 04:25:33 +0000 (04:25 +0000)]
drm/i915: Don't use stolen memory for ring buffers with LLC

From John Harrison
d805c28e11fc2a3043bb75aae098e576d746f625 in linux-6.1.y/6.1.16
690e0ec8e63da9a29b39fedc6ed5da09c7c82651 in mainline linux

19 months agodrm/radeon: Fix eDP for single-display iMac11,2
jsg [Mon, 27 Mar 2023 04:23:40 +0000 (04:23 +0000)]
drm/radeon: Fix eDP for single-display iMac11,2

From Mark Hawrylak
8551ddbff0c3cd9e68a58649820754f471ca49a7 in linux-6.1.y/6.1.16
05eacc198c68cbb35a7281ce4011f8899ee1cfb8 in mainline linux

19 months agodrm/i915/quirks: Add inverted backlight quirk for HP 14-r206nv
jsg [Mon, 27 Mar 2023 04:21:40 +0000 (04:21 +0000)]
drm/i915/quirks: Add inverted backlight quirk for HP 14-r206nv

From Mavroudis Chatzilaridis
c63e43906ba6b993090713453350bcddf6d32e59 in linux-6.1.y/6.1.16
5e438bf7f9a1705ebcae5fa89cdbfbc6932a7871 in mainline linux

19 months agodrm/amd: Fix initialization for nbio 7.5.1
jsg [Mon, 27 Mar 2023 04:19:29 +0000 (04:19 +0000)]
drm/amd: Fix initialization for nbio 7.5.1

From Mario Limonciello
749b249d1ba94d976b5f1e32fcd5059b45bc4c4a in linux-6.1.y/6.1.16
65a24000808f70ac69bd2a96381fa0c7341f20c0 in mainline linux

19 months agodrm/amd/display: Disable HUBP/DPP PG on DCN314 for now
jsg [Mon, 27 Mar 2023 04:17:00 +0000 (04:17 +0000)]
drm/amd/display: Disable HUBP/DPP PG on DCN314 for now

From Nicholas Kazlauskas
bea13417361a953729edef54cb3686dcc5301ff5 in linux-6.1.y/6.1.16
b7c67f72408b11b922f23f06c7df0f6743a2e89d in mainline linux

19 months agodrm: panel-orientation-quirks: Add quirk for Lenovo IdeaPad Duet 3 10IGL5
jsg [Mon, 27 Mar 2023 04:14:57 +0000 (04:14 +0000)]
drm: panel-orientation-quirks: Add quirk for Lenovo IdeaPad Duet 3 10IGL5

From Darrell Kavanagh
2435156aa7681dd38717a190cfad053a079c22de in linux-6.1.y/6.1.16
38b2d8efd03d2e56431b611e3523f0158306451d in mainline linux

19 months agodrm/amd/display: Enable P-state validation checks for DCN314
jsg [Mon, 27 Mar 2023 04:12:36 +0000 (04:12 +0000)]
drm/amd/display: Enable P-state validation checks for DCN314

From Nicholas Kazlauskas
42bbbd6594f7ad125163debda0c5a077b9c3295f in linux-6.1.y/6.1.16
37d184b548db0f64d4a878960b2c6988b38a3e7e in mainline linux

19 months agodrm/amd/display: Do not commit pipe when updating DRR
jsg [Mon, 27 Mar 2023 04:10:36 +0000 (04:10 +0000)]
drm/amd/display: Do not commit pipe when updating DRR

From Wesley Chalmers
d919f493bb7dc4d0b568039b728eb44ca961ebaa in linux-6.1.y/6.1.16
8f0d304d21b351d65e8c434c5399a40231876ba1 in mainline linux

19 months agodrm/amd/display: fix FCLK pstate change underflow
jsg [Mon, 27 Mar 2023 04:07:06 +0000 (04:07 +0000)]
drm/amd/display: fix FCLK pstate change underflow

From Vladimir Stempen
4bdfa48d74649898468a0bf5c8b8a48dded77b4a in linux-6.1.y/6.1.16
972243f973eb0821084e5833d5f7f4ed025f42da in mainline linux

19 months agoRevert "drm/amdgpu: TA unload messages are not actually sent to psp when amdgpu is...
jsg [Mon, 27 Mar 2023 04:05:13 +0000 (04:05 +0000)]
Revert "drm/amdgpu: TA unload messages are not actually sent to psp when amdgpu is uninstalled"

From Vitaly Prosyak
804bdc5fe05dbbcca6d998bf84c3dbafdcf3534d in linux-6.1.y/6.1.16
39934d3ed5725c5e3570ed1b67f612f1ea60ce03 in mainline linux

19 months agodrm/amd/display: Set hvm_enabled flag for S/G mode
jsg [Mon, 27 Mar 2023 04:02:50 +0000 (04:02 +0000)]
drm/amd/display: Set hvm_enabled flag for S/G mode

From Roman Li
8f720a79bc66a81b6373ba38a1b6b8fdea838143 in linux-6.1.y/6.1.16
40e9f3f067bc6fb47b878f8ba0a9cc7b93abbf49 in mainline linux

19 months agodrm/drm_print: correct format problem
jsg [Mon, 27 Mar 2023 04:00:43 +0000 (04:00 +0000)]
drm/drm_print: correct format problem

From Wayne Lin
214cdbe17923f5e1ed1ff7ba19bac0901fc887e4 in linux-6.1.y/6.1.16
d987150b539271b0394f24c1c648d2846662adb4 in mainline linux

19 months agodrm/amd/display: fix mapping to non-allocated address
jsg [Mon, 27 Mar 2023 03:57:03 +0000 (03:57 +0000)]
drm/amd/display: fix mapping to non-allocated address

From Brandon Syu
8ce8a443ddd9002861a4ee8a7e33a0c02717422f in linux-6.1.y/6.1.16
9190d4a263264eabf715f5fc1827da45e3fdc247 in mainline linux

19 months agoAdd RevokedHostKeys to percent expansion test.
dtucker [Mon, 27 Mar 2023 03:56:50 +0000 (03:56 +0000)]
Add RevokedHostKeys to percent expansion test.

19 months agoAdd tilde and environment variable expansion to RevokedHostKeys.
dtucker [Mon, 27 Mar 2023 03:56:11 +0000 (03:56 +0000)]
Add tilde and environment variable expansion to RevokedHostKeys.
bz#3552, ok djm@

19 months agodrm: amd: display: Fix memory leakage
jsg [Mon, 27 Mar 2023 03:55:01 +0000 (03:55 +0000)]
drm: amd: display: Fix memory leakage

From Konstantin Meskhidze
83ace0dd67ee386be1ddcf59dab49d6d9a54e62e in linux-6.1.y/6.1.16
6b8701be1f66064ca72733c5f6e13748cdbf8397 in mainline linux

19 months agodrm/amd: Avoid ASSERT for some message failures
jsg [Mon, 27 Mar 2023 03:52:40 +0000 (03:52 +0000)]
drm/amd: Avoid ASSERT for some message failures

From Mario Limonciello
a0f406db3ede83791940adfc6cb1d67486e31ff7 in linux-6.1.y/6.1.16
3e5019ee67760cd61b2a5fd605e1289c2f92d983 in mainline linux

19 months agodrm/amdkfd: Page aligned memory reserve size
jsg [Mon, 27 Mar 2023 03:51:04 +0000 (03:51 +0000)]
drm/amdkfd: Page aligned memory reserve size

From Philip Yang
82a6debd4e4b98dabd99ab26a23553276559d509 in linux-6.1.y/6.1.16
0c2dece8fb541ab07b68c3312a1065fa9c927a81 in mainline linux

19 months agodrm/amd: Avoid BUG() for case of SRIOV missing IP version
jsg [Mon, 27 Mar 2023 03:48:31 +0000 (03:48 +0000)]
drm/amd: Avoid BUG() for case of SRIOV missing IP version

From Mario Limonciello
12003ad0f35c946e8e05a8ed9069486ec36c6694 in linux-6.1.y/6.1.16
93fec4f8c158584065134b4d45e875499bf517c8 in mainline linux

19 months agodrm/radeon: free iio for atombios when driver shutdown
jsg [Mon, 27 Mar 2023 03:46:41 +0000 (03:46 +0000)]
drm/radeon: free iio for atombios when driver shutdown

From Liwei Song
107b8b542bb9dab4cbdc3276c85fbdd7f6782313 in linux-6.1.y/6.1.16
4773fadedca918faec443daaca5e4ea1c0ced144 in mainline linux

19 months agodrm/amd/display: Defer DIG FIFO disable after VID stream enable
jsg [Mon, 27 Mar 2023 03:44:58 +0000 (03:44 +0000)]
drm/amd/display: Defer DIG FIFO disable after VID stream enable

From Nicholas Kazlauskas
efb332a2037bdb3f49c42c0b895241383024c06b in linux-6.1.y/6.1.16
2d90a1c054831338d57b39aec4d273cf3e867590 in mainline linux

19 months agodrm/amd/display: Fix potential null-deref in dm_resume
jsg [Mon, 27 Mar 2023 03:43:02 +0000 (03:43 +0000)]
drm/amd/display: Fix potential null-deref in dm_resume

From Roman Li
8e365f1bd672cc9320a936f6ae6f8087aa40e9bc in linux-6.1.y/6.1.16
7a7175a2cd84b7874bebbf8e59f134557a34161b in mainline linux

19 months agodrm/amd/display: Revert Reduce delay when sink device not able to ACK 00340h write
jsg [Mon, 27 Mar 2023 03:41:10 +0000 (03:41 +0000)]
drm/amd/display: Revert Reduce delay when sink device not able to ACK 00340h write

From Ian Chen
223e365ac60aea701f00aefc24adb3cfd67db1d3 in linux-6.1.y/6.1.16
639f6ad6df7f47db48b59956b469a6917a136afb in mainline linux

19 months agodrm/amd/display: Reduce expected sdp bandwidth for dcn321
jsg [Mon, 27 Mar 2023 03:38:14 +0000 (03:38 +0000)]
drm/amd/display: Reduce expected sdp bandwidth for dcn321

From Dillon Varone
8e25eaae471d9d64acc627deaf42e989e5836647 in linux-6.1.y/6.1.16
6b81090d6d4cc0fd818c9ec9dbb6906f921ad396 in mainline linux

19 months agodrm: panel-orientation-quirks: Add quirk for DynaBook K50
jsg [Mon, 27 Mar 2023 03:36:31 +0000 (03:36 +0000)]
drm: panel-orientation-quirks: Add quirk for DynaBook K50

From Allen Ballway
d5b286daecb46292e1e229ff3dcc8a760afef759 in linux-6.1.y/6.1.16
a3caf7ea0c3d5872ed0f2c51f5476aee0c47a73a in mainline linux

19 months agodrm: panel-orientation-quirks: Add quirk for Lenovo Yoga Tab 3 X90F
jsg [Mon, 27 Mar 2023 03:34:57 +0000 (03:34 +0000)]
drm: panel-orientation-quirks: Add quirk for Lenovo Yoga Tab 3 X90F

From Hans de Goede
260bdc633d5e6cad666b72f9eae12f8b2c400096 in linux-6.1.y/6.1.16
8a238d7f7eea7592e0764bc3b9e79e7c6354b04c in mainline linux

19 months agodrm/amd/display: don't call dc_interrupt_set() for disabled crtcs
jsg [Mon, 27 Mar 2023 03:31:40 +0000 (03:31 +0000)]
drm/amd/display: don't call dc_interrupt_set() for disabled crtcs

From Hamza Mahfooz
062024bf77e9a2dddc1da801360565e6ce3f7199 in linux-6.1.y/6.1.16
4936458bf989d168f5a89015dd81067c4c2bdc64 in mainline linux

19 months agofix test: getnameinfo returns a non-zero value on error,
djm [Mon, 27 Mar 2023 03:31:05 +0000 (03:31 +0000)]
fix test: getnameinfo returns a non-zero value on error,
not (neccessarily) -1. From GHPR#384

19 months agodrm/amdgpu: fix enum odm_combine_mode mismatch
jsg [Mon, 27 Mar 2023 03:29:46 +0000 (03:29 +0000)]
drm/amdgpu: fix enum odm_combine_mode mismatch

From Arnd Bergmann
099bd0a7b363a17e6796896838708d957ef78463 in linux-6.1.y/6.1.16
087bad7eb1f6945f8232f132953ecc2bda8bd38d in mainline linux

19 months agodrm/mipi-dsi: Fix byte order of 16-bit DCS set/get brightness
jsg [Mon, 27 Mar 2023 03:27:34 +0000 (03:27 +0000)]
drm/mipi-dsi: Fix byte order of 16-bit DCS set/get brightness

From Daniel Mentz
a64eb25a291904a1736acfd85e5a4e3337f696c2 in linux-6.1.y/6.1.16
c9d27c6be518b4ef2966d9564654ef99292ea1b3 in mainline linux

19 months agoscp: when copying local->remote, check that source file exists before
djm [Mon, 27 Mar 2023 03:25:08 +0000 (03:25 +0000)]
scp: when copying local->remote, check that source file exists before
opening SFTP connection to the server. Based on GHPR#370
ok dtucker, markus

19 months agodrm/amdgpu: Use the sched from entity for amdgpu_cs trace
jsg [Mon, 27 Mar 2023 03:25:04 +0000 (03:25 +0000)]
drm/amdgpu: Use the sched from entity for amdgpu_cs trace

From Leo Liu
208680ccf7bff31fc08735c2a23fd3dd3c19b903 in linux-6.1.y/6.1.16
cf22ef78f22ce4df4757472c5dbd33c430c5b659 in mainline linux

19 months agodrm/fourcc: Add missing big-endian XRGB1555 and RGB565 formats
jsg [Mon, 27 Mar 2023 03:23:26 +0000 (03:23 +0000)]
drm/fourcc: Add missing big-endian XRGB1555 and RGB565 formats

From Geert Uytterhoeven
0de7fc4d9c0142a3e6e5ea28941447132105cb14 in linux-6.1.y/6.1.16
6fb6c979ca628583d4d0c59a0f8ff977e581ecc0 in mainline linux

19 months agodrm: Fix potential null-ptr-deref due to drmm_mode_config_init()
jsg [Mon, 27 Mar 2023 03:21:12 +0000 (03:21 +0000)]
drm: Fix potential null-ptr-deref due to drmm_mode_config_init()

From Shang XiaoJing
b14147464251f66e38fa39f0aae9780466db8610 in linux-6.1.y/6.1.16
834c23e4f798dcdc8af251b3c428ceef94741991 in mainline linux

19 months agoRemove the now almost empty and unused bn_mod_exp2_mont.c
tb [Sun, 26 Mar 2023 22:11:03 +0000 (22:11 +0000)]
Remove the now almost empty and unused bn_mod_exp2_mont.c

19 months agoUnhook bn_mod_exp2_mont test
tb [Sun, 26 Mar 2023 22:10:03 +0000 (22:10 +0000)]
Unhook bn_mod_exp2_mont test

19 months agoFold the small BN_mod_exp2_mont() crash test into bn_mod_exp.c
tb [Sun, 26 Mar 2023 22:09:08 +0000 (22:09 +0000)]
Fold the small BN_mod_exp2_mont() crash test into bn_mod_exp.c

19 months agoAparantly we must configure the RGMII interface (and possible the TX/RX
kettenis [Sun, 26 Mar 2023 21:44:46 +0000 (21:44 +0000)]
Aparantly we must configure the RGMII interface (and possible the TX/RX
delays) before taking the PHY out of reset.  Fixes dwqe(4) on several
boards that use rgephy(4).

ok patrick@

19 months agoTest negative modulus as well.
tb [Sun, 26 Mar 2023 20:13:26 +0000 (20:13 +0000)]
Test negative modulus as well.

Lower the number of rounds. These tests are expensive.

19 months agoAlign bn_mod_exp_zero_test() with bn_mod_exp_test()
tb [Sun, 26 Mar 2023 20:09:14 +0000 (20:09 +0000)]
Align bn_mod_exp_zero_test() with bn_mod_exp_test()

19 months agoFix copy-paste error
tb [Sun, 26 Mar 2023 19:56:28 +0000 (19:56 +0000)]
Fix copy-paste error

19 months agoReplace HASH_BLOCK_DATA_ORDER with sha1_block_data_order.
jsing [Sun, 26 Mar 2023 19:30:45 +0000 (19:30 +0000)]
Replace HASH_BLOCK_DATA_ORDER with sha1_block_data_order.

The only reason to use HASH_BLOCK_DATA_ORDER in the implementation is to
make the code harder to read.

19 months agoSimplify apple firmware copying
kn [Sun, 26 Mar 2023 19:25:16 +0000 (19:25 +0000)]
Simplify apple firmware copying

Less duplicate code, easier to add new firmware.

OK afresh1

19 months agoRemove unnecessary HIDDEN_DECLS.
jsing [Sun, 26 Mar 2023 19:22:35 +0000 (19:22 +0000)]
Remove unnecessary HIDDEN_DECLS.

19 months agoRemoves some unwanted spaces.
jsing [Sun, 26 Mar 2023 19:21:13 +0000 (19:21 +0000)]
Removes some unwanted spaces.

19 months agoWhack sha1dgst.c with the style(9) stick again.
jsing [Sun, 26 Mar 2023 19:19:28 +0000 (19:19 +0000)]
Whack sha1dgst.c with the style(9) stick again.

19 months agoAdd regress coverage for some BIO_f_asn1() bugs fixed before release
tb [Sun, 26 Mar 2023 19:14:11 +0000 (19:14 +0000)]
Add regress coverage for some BIO_f_asn1() bugs fixed before release

19 months agoMinor whitespace tidying
tb [Sun, 26 Mar 2023 19:09:42 +0000 (19:09 +0000)]
Minor whitespace tidying

19 months agoTidy up includes.
jsing [Sun, 26 Mar 2023 19:04:06 +0000 (19:04 +0000)]
Tidy up includes.

19 months agoInline sha_local.h in sha1dgst.c.
jsing [Sun, 26 Mar 2023 19:02:40 +0000 (19:02 +0000)]
Inline sha_local.h in sha1dgst.c.

Nothing other than sha1dst.c uses this header - pull it in to sha1dgst.c
directly (sha_local.h will be removed at a later date).

19 months agoFix a typo in dump_exp_results()
tb [Sun, 26 Mar 2023 19:01:59 +0000 (19:01 +0000)]
Fix a typo in dump_exp_results()

19 months agoAdd more extensive regress coverage for BN_mod_exp2_mont()
tb [Sun, 26 Mar 2023 19:01:15 +0000 (19:01 +0000)]
Add more extensive regress coverage for BN_mod_exp2_mont()

19 months agoRename dump_results() into dump_exp_results()
tb [Sun, 26 Mar 2023 18:57:04 +0000 (18:57 +0000)]
Rename dump_results() into dump_exp_results()

This prepares for consistency with an upcoming diff. While here fix an
argument order bug.

19 months agoMove the N_MOD_EXP_TESTS up to where it belongs
tb [Sun, 26 Mar 2023 18:54:08 +0000 (18:54 +0000)]
Move the N_MOD_EXP_TESTS up to where it belongs

19 months agoMake several calls to BN_nnmod() unconditional
tb [Sun, 26 Mar 2023 18:52:29 +0000 (18:52 +0000)]
Make several calls to BN_nnmod() unconditional

This removes a potential branch in a sensitive function and makes the
code a lot simpler. It is a really bad idea optimize here for what
davidben aptly calls "calculator" purposes.

ok jsing

19 months agoCorrectly reduce negative inpot to BN_mod_exp2_mont()
tb [Sun, 26 Mar 2023 18:49:48 +0000 (18:49 +0000)]
Correctly reduce negative inpot to BN_mod_exp2_mont()

Negative bases could result in a negative modulus being returned. This is
not strictly speaking incorrect but slightly surprising. This is all a
consequence of the shortcut of defining BN_mod() as a macro using BN_div().

Fixes ossfuzz #55997

ok jsing

19 months agoAdd regress coverage for an issue with BN_mod_exp2_mont() reported
tb [Sun, 26 Mar 2023 18:46:23 +0000 (18:46 +0000)]
Add regress coverage for an issue with BN_mod_exp2_mont() reported
by Guido Vranken in ossfuzz #55997. This test currently fails and
will be fixed momentarily.

This also checks sensible behavior with respect to zero exponents for
this functions.

19 months agobn_primes: there is no need to link this statically. It can pull the
tb [Sun, 26 Mar 2023 18:34:36 +0000 (18:34 +0000)]
bn_primes: there is no need to link this statically. It can pull the
primes table in directly.

19 months agoamd64: identify IBT capability in cpu(4) dmesg lines
mlarkin [Sun, 26 Mar 2023 18:12:45 +0000 (18:12 +0000)]
amd64: identify IBT capability in cpu(4) dmesg lines

requested by and ok deraadt@

19 months agoAnother missing #include <openssl/err.h>
tb [Sun, 26 Mar 2023 18:11:48 +0000 (18:11 +0000)]
Another missing #include <openssl/err.h>

19 months agoAdd missing #include <openssl/err.h>
tb [Sun, 26 Mar 2023 18:04:47 +0000 (18:04 +0000)]
Add missing #include <openssl/err.h>

19 months agoAdd license to sha256.c/sha512.c.
jsing [Sun, 26 Mar 2023 17:56:51 +0000 (17:56 +0000)]
Add license to sha256.c/sha512.c.

19 months agoUse multiple statements instead of comma separated expressions.
jsing [Sun, 26 Mar 2023 17:52:07 +0000 (17:52 +0000)]
Use multiple statements instead of comma separated expressions.

No change to generated assembly.

19 months agoThe slightly less deprecated spelling of ERR_remove_state(0) is
tb [Sun, 26 Mar 2023 17:51:25 +0000 (17:51 +0000)]
The slightly less deprecated spelling of ERR_remove_state(0) is
ERR_remove_thread_state(NULL).

19 months agoAdd blank lines for readability.
jsing [Sun, 26 Mar 2023 17:33:41 +0000 (17:33 +0000)]
Add blank lines for readability.

19 months agoAdd some blank lines for readability, along with some more style(9) tweaks.
jsing [Sun, 26 Mar 2023 17:06:14 +0000 (17:06 +0000)]
Add some blank lines for readability, along with some more style(9) tweaks.

19 months agoWhack sha with a style(9) stick.
jsing [Sun, 26 Mar 2023 16:40:07 +0000 (16:40 +0000)]
Whack sha with a style(9) stick.

No change in generated assembly.

19 months agoPass lbuf/lbuflen to PRT_print_[mbr|gpt]_menu() to allow changes
krw [Sun, 26 Mar 2023 16:23:58 +0000 (16:23 +0000)]
Pass lbuf/lbuflen to PRT_print_[mbr|gpt]_menu() to allow changes
to the original input. Just zap it for now.

No functional change.

19 months agobn_mod_exp_ret() fix stupid logic error
tb [Sun, 26 Mar 2023 14:50:23 +0000 (14:50 +0000)]
bn_mod_exp_ret() fix stupid logic error

19 months agoAdd EFI_SYSTEM_PARTITION_GUID #define and use it to check for
krw [Sun, 26 Mar 2023 13:12:33 +0000 (13:12 +0000)]
Add EFI_SYSTEM_PARTITION_GUID #define and use it to check for
protection.

No functional change.

19 months agoAdd MICROSOFT_BASIC_DATA_GUID #define to make clear what menu
krw [Sun, 26 Mar 2023 12:19:54 +0000 (12:19 +0000)]
Add MICROSOFT_BASIC_DATA_GUID #define to make clear what menu
items result in the same GUID. Easier to spot and more resistant
to simple typos in a 36 character hex string.

No functional change.

19 months agoAdd support for the RK3568 32k RTC clock. This clock uses a fractional
kettenis [Sun, 26 Mar 2023 10:41:42 +0000 (10:41 +0000)]
Add support for the RK3568 32k RTC clock.  This clock uses a fractional
divider so rework the RK3399 support for fractional dividers to be more
general and reuse it.

ok dlg@

19 months agofix memory leaks in error paths
jsg [Sun, 26 Mar 2023 09:39:46 +0000 (09:39 +0000)]
fix memory leaks in error paths
ok miod@

19 months agofix a memory leak
jsg [Sun, 26 Mar 2023 09:34:06 +0000 (09:34 +0000)]
fix a memory leak
feedback kettenis@ ok miod@

19 months agoallow out-of-class defaulting of comparison operators
robert [Sun, 26 Mar 2023 09:09:31 +0000 (09:09 +0000)]
allow out-of-class defaulting of comparison operators

ok deraadt@, mortimer@

this is backport of the following upstream commit:

commit 5fbe21a7748f91adbd1b16c95bbfe180642320a3
Author: Nathan Sidwell <nathan@acm.org>
Date:   Wed Jun 16 10:43:43 2021 -0700

    [clang] p2085 out-of-class comparison operator defaulting

    This implements p2085, allowing out-of-class defaulting of comparison
    operators, primarily so they need not be inline, IIUC intent. this was
    mostly straigh forward, but required reimplementing
    Sema::CheckExplicitlyDefaultedComparison, as now there's a case where
    we have no a priori clue as to what class a defaulted comparison may
    be for. We have to inspect the parameter types to find out. Eg:

    class X { ... };
    bool operator==(X, X) = default;

    Thus reimplemented the parameter type checking, and added 'is this a
    friend' functionality for the above case.

19 months agounifdef
jsg [Sun, 26 Mar 2023 08:45:27 +0000 (08:45 +0000)]
unifdef
ok stsp@

19 months agobn_prime.pl: fix shebang and a couple more whitespace tweaks
tb [Sun, 26 Mar 2023 08:04:57 +0000 (08:04 +0000)]
bn_prime.pl: fix shebang and a couple more whitespace tweaks

19 months agoAdd comments documenting possible sources for MBR partition types
krw [Sat, 25 Mar 2023 22:00:28 +0000 (22:00 +0000)]
Add comments documenting possible sources for MBR partition types
and GPT partition GUIDs.

No functional change.

19 months agoFix erroneous comment for the PT_OPENBSD_MUTABLE definition.
fcambus [Sat, 25 Mar 2023 21:02:21 +0000 (21:02 +0000)]
Fix erroneous comment for the PT_OPENBSD_MUTABLE definition.

19 months agoMove LINEBUFSZ to be with its friends in misc.h.
krw [Sat, 25 Mar 2023 20:34:28 +0000 (20:34 +0000)]
Move LINEBUFSZ to be with its friends in misc.h.

Nuke unused HELPBUFSZ.

No functional change.

19 months agoRename ascii_id() find_mbr_type(), make it a bit more like its
krw [Sat, 25 Mar 2023 19:37:34 +0000 (19:37 +0000)]
Rename ascii_id() find_mbr_type(), make it a bit more like its
sibling find_gpt_type(), tweaking PRT_print_part() as needed.

No functional change.

19 months agoLast arg is also a pointer, so pass NULL instead of 0; ok deraadt@
otto [Sat, 25 Mar 2023 19:16:34 +0000 (19:16 +0000)]
Last arg is also a pointer, so pass NULL instead of 0; ok deraadt@

19 months agopine64: Silence dd(1) properly
kn [Sat, 25 Mar 2023 18:29:37 +0000 (18:29 +0000)]
pine64: Silence dd(1) properly

We must not discard all errors, just disable informational messages.

OK tb

19 months agosimplify final MAKEDEV call
kn [Sat, 25 Mar 2023 18:27:28 +0000 (18:27 +0000)]
simplify final MAKEDEV call

No need to loop here, the script takes multiple args.

OK tb afresh1

19 months agosync nd6_resolve() EINVAL handling with arpresolve()
kn [Sat, 25 Mar 2023 16:01:37 +0000 (16:01 +0000)]
sync nd6_resolve() EINVAL handling with arpresolve()

Less diff between them;  merging three returns into one also reduces
upcoming unlock diffs.  OK bluhm

19 months agosync nd6_resolve() uptime handling with arpresolve()
kn [Sat, 25 Mar 2023 15:59:23 +0000 (15:59 +0000)]
sync nd6_resolve() uptime handling with arpresolve()

makes the two familiar functions look more alike; OK bluhm

19 months agoMake *_name fields char * instead of char[]. Specify desired
krw [Sat, 25 Mar 2023 15:58:44 +0000 (15:58 +0000)]
Make *_name fields char * instead of char[]. Specify desired
width of output in printf() rather than "%-*s" and sizeof(name) +
1.  Clearer, may even save some bytes as many names are shorter
than the max.

Rename PRT_print_mbrtypes() to PRT_print_mbrmenu() and
PRT_print_gpttypes() to PRT_print_gptmenu() to remove implied
completeness of list presented in menu.

No functional change.

19 months agoChange malloc chunk sizes to be fine grained.
otto [Sat, 25 Mar 2023 15:22:06 +0000 (15:22 +0000)]
Change malloc chunk sizes to be fine grained.

The basic idea is simple: one of the reasons the recent sshd bug
is potentially exploitable is that a (erroneously) freed malloc
chunk gets re-used in a different role. malloc has power of two
chunk sizes and so one page of chunks holds many different types
of allocations. Userland malloc has no knowledge of types, we only
know about sizes. So I changed that to use finer-grained chunk
sizes.

This has some performance impact as we need to allocate chunk pages
in more cases. Gain it back by allocation chunk_info pages in a
bundle, and use less buckets is !malloc option S. The chunk sizes
used are 16, 32, 48, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320,
384, 448, 512, 640, 768, 896, 1024, 1280, 1536, 1792, 2048 (and a
few more for sparc64 with its 8k sized pages and loongson with its
16k pages).

If malloc option S (or rather cache size 0) is used we use strict
multiple of 16 sized chunks, to get as many buckets as possible.
ssh(d) enabled malloc option S, in general security sensitive
programs should.

See the find_bucket() and bin_of() functions. Thanks to Tony Finch
for pointing me to code to compute nice bucket sizes.

ok tb@

19 months agothings will be ready a bit earlier
deraadt [Sat, 25 Mar 2023 15:07:19 +0000 (15:07 +0000)]
things will be ready a bit earlier

19 months agoRename *_sname fields/functions to *_name to remove implied
krw [Sat, 25 Mar 2023 15:05:45 +0000 (15:05 +0000)]
Rename *_sname fields/functions to *_name to remove implied
shortness of the names.

No functional change.

19 months agoUse strict and warnings
tb [Sat, 25 Mar 2023 11:35:02 +0000 (11:35 +0000)]
Use strict and warnings

19 months agoMake an attempt at reducing the eyebleed in bn_prime.pl
tb [Sat, 25 Mar 2023 11:28:55 +0000 (11:28 +0000)]
Make an attempt at reducing the eyebleed in bn_prime.pl

Use a style more resembling KNF and drop lots of parentheses. Simplify
a few things. No change in generated output on success.

19 months agoUse Eric Young's usual license in the proper place rather than a weird
tb [Sat, 25 Mar 2023 11:09:58 +0000 (11:09 +0000)]
Use Eric Young's usual license in the proper place rather than a weird
commented-out license stub in a HERE document.

19 months agoAdd RCSID
tb [Sat, 25 Mar 2023 11:03:45 +0000 (11:03 +0000)]
Add RCSID

19 months agoAdd checks to ensure the uint16_t array isn't overflowed when this
tb [Sat, 25 Mar 2023 11:02:26 +0000 (11:02 +0000)]
Add checks to ensure the uint16_t array isn't overflowed when this
script is run. This is more of an issue with uint16_t now than it
was with prime_t aka BN_ULONG before r1.6.