openbsd
18 months agofix double words in comments
jsg [Tue, 11 Apr 2023 00:45:06 +0000 (00:45 +0000)]
fix double words in comments
feedback and ok jmc@ miod, ok millert@

18 months agoadd missing write of SAB_DAFO
jsg [Mon, 10 Apr 2023 23:18:08 +0000 (23:18 +0000)]
add missing write of SAB_DAFO
ok miod@ who tested on Ultra 5

18 months agoSome more cleanup in bn_to_string
tb [Mon, 10 Apr 2023 21:00:16 +0000 (21:00 +0000)]
Some more cleanup in bn_to_string

18 months agoDrop BN_NO_DEPRECATED dance from bn_test
tb [Mon, 10 Apr 2023 20:59:33 +0000 (20:59 +0000)]
Drop BN_NO_DEPRECATED dance from bn_test

18 months agoMake GPT display of menu hex octet the same as the MBR display.
krw [Mon, 10 Apr 2023 19:44:43 +0000 (19:44 +0000)]
Make GPT display of menu hex octet the same as the MBR display.
i.e.  two digits.

18 months agoProvide benchmarks for BN_copy()
jsing [Mon, 10 Apr 2023 19:02:30 +0000 (19:02 +0000)]
Provide benchmarks for BN_copy()

18 months agoFix indentation of structs and unions in x509v3.h
tb [Mon, 10 Apr 2023 16:46:00 +0000 (16:46 +0000)]
Fix indentation of structs and unions in x509v3.h

No change according to diff -w

18 months agoEnable caps lock LED on modern Apple laptop keyboards.
tobhe [Mon, 10 Apr 2023 15:14:04 +0000 (15:14 +0000)]
Enable caps lock LED on modern Apple laptop keyboards.

ok kettenis@ patrick@

18 months agoMake bn_to_string() static
tb [Mon, 10 Apr 2023 14:10:26 +0000 (14:10 +0000)]
Make bn_to_string() static

This function is no longer used directly by regress, so it can now be local
to this file.

18 months agobn_to_string no longer needs to be linked statically
tb [Mon, 10 Apr 2023 13:57:57 +0000 (13:57 +0000)]
bn_to_string no longer needs to be linked statically

18 months agoRework the bn_to_string() to use public API
tb [Mon, 10 Apr 2023 13:57:32 +0000 (13:57 +0000)]
Rework the bn_to_string() to use public API

We can use the undocumented functions {i2s,s2i}_ASN1_INTEGER(3) to
exercise bn_to_string(). This way we use public API and remove the
need of linking statically.

18 months agoVarious wording tweaks for clarity and precision, and a few for conciseness.
schwarze [Mon, 10 Apr 2023 13:40:16 +0000 (13:40 +0000)]
Various wording tweaks for clarity and precision, and a few for conciseness.
OK jmc@ and Ted Bullock

18 months agoMore deduplication: talk about environment variable in one place, not two.
schwarze [Mon, 10 Apr 2023 13:32:29 +0000 (13:32 +0000)]
More deduplication: talk about environment variable in one place, not two.
Clarify that the variables only affect the event_base structure currently
being created.  They do not disable "library support" as a whole.
Sort the variables alphabetically.

OK jmc@ and Ted Bullock

18 months agofix 'in in'
jsg [Mon, 10 Apr 2023 12:57:15 +0000 (12:57 +0000)]
fix 'in in'

18 months agofix setting parity bits
jsg [Mon, 10 Apr 2023 12:11:22 +0000 (12:11 +0000)]
fix setting parity bits
ok mglocker@

18 months agospelling
jsg [Mon, 10 Apr 2023 04:21:19 +0000 (04:21 +0000)]
spelling

18 months agoTreat symlinks better in $ORIGIN determination in ld.so
gnezdo [Sun, 9 Apr 2023 23:41:47 +0000 (23:41 +0000)]
Treat symlinks better in $ORIGIN determination in ld.so

Now symlinking an executable away from the rest of its installation
tree no longer prevents it from finding the libraries. This matches
the behavior of other OS linkers. Prompted by a behavior change in
lang/ghc test suite.

Swapped the order of dirname/realpath in _dl_origin_path.

Added some regress tests that pass and then bin3 that fails without
this change and reflects the behavior needd for lang/ghc.

Suggestion by semarie@, OK deraadt@

18 months agoSo clang 13 miscompiles dev/usb/umass_scsi.c with the combination if -Oz
kettenis [Sun, 9 Apr 2023 19:48:37 +0000 (19:48 +0000)]
So clang 13 miscompiles dev/usb/umass_scsi.c with the combination if -Oz
and -mbranch-protection=bti.  So turn off the BTI protection in ramdisk
kernels for now.

ok deraadt@, miod@, phessler@

18 months agoMove a few functions out of OPENSSL_NO_DEPRECATED
tb [Sun, 9 Apr 2023 19:10:23 +0000 (19:10 +0000)]
Move a few functions out of OPENSSL_NO_DEPRECATED

Geoff Thorpe added OPENSSL_NO_DEPRECATED nearly two decades ago. The hope
was that at some point some functions can be dropped. Most of the functions
marked deprecated are actually unused nowadays but unfortunately some of
them are still used in the ecosystem. Move them out of OPENSSL_NO_DEPRECATED
so we can define it without breaking the consumers in the next bump.

ERR_remove_state() is still used by a dozen or so ports. This isn't a big
deal since it is just a stupid wrapper for the not quite as deprecated
ERR_remove_thread_state(). It's not worth patching these ports.

Annoyingly, {DH,DSA}_generate_parameters() and RSA_generate_key() are still
used. They "make use" of the old-style BN_GENCB callback, which is therefore
more difficult to remove - in case you don't know know: that's the thing
responsible for printing pretty '.', '+' and '*' when you generate keys.

Most annoyingly, DH_generate_parameters() was added to rust-openssl in 2020
for "advanced DH support". This is very unfortunate since cargo bundles a
rust-openssl and updates it only every few years or so. As a consequence
we're going to be stuck with this nonsense for a good while.

ok beck jsing

18 months agoRemove some doubled empty lines
tb [Sun, 9 Apr 2023 18:38:59 +0000 (18:38 +0000)]
Remove some doubled empty lines

18 months agoRemove X9.31 support from openssl(1)
tb [Sun, 9 Apr 2023 18:33:26 +0000 (18:33 +0000)]
Remove X9.31 support from openssl(1)

The X9.31 standard has long been retired and deprecated and libcrypto will
drop support for it soon. This prepares userland.

ok jsing

18 months agoDrop X9.31 support from libtls
tb [Sun, 9 Apr 2023 18:26:26 +0000 (18:26 +0000)]
Drop X9.31 support from libtls

The TLS signer isn't exposed in public API (we should finally fix it...)
and it supports X9.31, a standard that has been retired and deprecated for
a very long time. libcrypto will stop supporting it soon, this step is
needed to prepare userland.

ok jsing

18 months agodon't attach temperature sensors for which there is no TMP# node in
jcs [Sun, 9 Apr 2023 17:50:02 +0000 (17:50 +0000)]
don't attach temperature sensors for which there is no TMP# node in
the DSDT, and verify the result of the fetch when updating it later.

ok kn

18 months agoMinor code cleanup
tb [Sun, 9 Apr 2023 17:28:52 +0000 (17:28 +0000)]
Minor code cleanup

Unwrap a few awkwardly wrapped lines, drop redundant parentheses and
add empty lines after some variable declarations. No change in the
generated assembly.

18 months agoRefactor and simplify GPT menu selection logic.
krw [Sun, 9 Apr 2023 17:19:59 +0000 (17:19 +0000)]
Refactor and simplify GPT menu selection logic.

No intentional functional change.

18 months agoProvide and use sha{224,384}_{update,final} functions.
jsing [Sun, 9 Apr 2023 15:47:41 +0000 (15:47 +0000)]
Provide and use sha{224,384}_{update,final} functions.

Improve readability and consistency by providing and using functions named
for the specific hash, rather than reusing the sha256/sha512 update and
final functions.

No functional change.

ok tb@

18 months agoRename SHA functions to have sha{1,224,256,384,512}_ prefix.
jsing [Sun, 9 Apr 2023 15:40:09 +0000 (15:40 +0000)]
Rename SHA functions to have sha{1,224,256,384,512}_ prefix.

Also remove some unnecessary parentheses.

No functional change.

ok tb@

18 months agoTrim some redundant and a bit of misleading text:
schwarze [Sun, 9 Apr 2023 14:43:51 +0000 (14:43 +0000)]
Trim some redundant and a bit of misleading text:
1. The values of #define'd constants are part of the ABI, but not of the API.
Programmers need not worry about them and must not rely on them.
Consequently, do not list these values in the SYNOPSIS.
2. libevent can be used for any event loop, not only for the main loop
of a program.
3. No need to state numbers of arguments, they are obvious from the SYNOPSIS.
4. If a function is documented to require a pointer to a specific kind of
object as an argument, there is no need to say passing NULL is undefined.
OK jmc@ and Ted Bullock

18 months agoExplain what it means that an API function "requires event_init(3)"
schwarze [Sun, 9 Apr 2023 14:30:24 +0000 (14:30 +0000)]
Explain what it means that an API function "requires event_init(3)"
in one place, not in two places, reducing duplication of text.

Joint work with Ted Bullock.  OK jmc@.

18 months agofix double words
jsg [Sun, 9 Apr 2023 06:27:52 +0000 (06:27 +0000)]
fix double words

18 months agoReturn -1 on actual failure
kn [Sat, 8 Apr 2023 18:12:08 +0000 (18:12 +0000)]
Return -1 on actual failure

MI boot.c's "a-x" fchmod on bsd.upgrade is the only caller that checks the
return value and that call can fail on, e.g. softraid volumes.

Stop clobbering the actual fchmod return value and get that warning printed.

OK deraadt

18 months agobn_test: two minor style tweaks
tb [Sat, 8 Apr 2023 17:43:30 +0000 (17:43 +0000)]
bn_test: two minor style tweaks

18 months agoNew manual page written by Ted Bullock <tbullock at comlore dot com>,
schwarze [Sat, 8 Apr 2023 16:21:22 +0000 (16:21 +0000)]
New manual page written by Ted Bullock <tbullock at comlore dot com>,
providing more information and in a more systematic way
than the current event(3) manual page.
Not yet linked to the tree.

Using input from nicm@ and jmc@.

18 months agoA bit more guid vs uuid naming consistency.
krw [Sat, 8 Apr 2023 15:25:47 +0000 (15:25 +0000)]
A bit more guid vs uuid naming consistency.

No functional change.

18 months agoDo not reload `inp' in gre_send(). The pointer to PCB of raw socket is
mvs [Sat, 8 Apr 2023 13:50:22 +0000 (13:50 +0000)]
Do not reload `inp' in gre_send(). The pointer to PCB of raw socket is
immutable, we don't need to reload it again.

ok bluhm@

18 months agoMove rtm_ifannounce(IFAN_DEPARTURE) outside netlock within if_detach().
mvs [Sat, 8 Apr 2023 13:49:38 +0000 (13:49 +0000)]
Move rtm_ifannounce(IFAN_DEPARTURE) outside netlock within if_detach().
This is the mbuf(9) allocation and broadcast transmission for PF_ROUTE
sockets, netlock is not required here.

ok bluhm@

18 months agoadd missing write to XENON_EMMC_PHY_PAD_CONTROL2
jsg [Sat, 8 Apr 2023 05:40:54 +0000 (05:40 +0000)]
add missing write to XENON_EMMC_PHY_PAD_CONTROL2
ok patrick@

18 months agocorrect write to MV_XLG_PORT_MAC_CTRL4_REG
jsg [Sat, 8 Apr 2023 05:38:25 +0000 (05:38 +0000)]
correct write to MV_XLG_PORT_MAC_CTRL4_REG
tested by matthieu@ ok patrick@

19 months agotry and cope with not having the firmware/boot loader init the hardware.
dlg [Sat, 8 Apr 2023 02:32:38 +0000 (02:32 +0000)]
try and cope with not having the firmware/boot loader init the hardware.

more specifically, spin up the clocks and phy, and if the device
tree has a "ports-implemented" property use it to initialise the
AHCI_REG_PI register.

this gets sata working on a banana pi bpi-r2 pro.

help from jared mcneill
ok jmatthew@ kettenis@

19 months agobn_mont: fix typo in comment divisable -> divisible
tb [Fri, 7 Apr 2023 23:03:32 +0000 (23:03 +0000)]
bn_mont: fix typo in comment divisable -> divisible

19 months agoprint which gmac the dwqe driver is attaching to.
dlg [Fri, 7 Apr 2023 22:55:26 +0000 (22:55 +0000)]
print which gmac the dwqe driver is attaching to.

there's no guarantee that dwqe0 in the kernel will attach to gmac0
in the device tree, so print it to make it explicit what's going
where.

ok patrick@ kettenis@

19 months agobn_test: rename rc into ret as per usual
tb [Fri, 7 Apr 2023 22:36:38 +0000 (22:36 +0000)]
bn_test: rename rc into ret as per usual

19 months agobn_test: pass BN_CTX into all functions
tb [Fri, 7 Apr 2023 22:32:59 +0000 (22:32 +0000)]
bn_test: pass BN_CTX into all functions

There is a BN_CTX at program scope. Pass it into all test functions.
This simplifies memory management at the end of the functions quite a bit.

19 months agobn_test: drop a few braces that are now unnecessary
tb [Fri, 7 Apr 2023 22:30:31 +0000 (22:30 +0000)]
bn_test: drop a few braces that are now unnecessary

19 months agobn_test: move rc initialization to its own line
tb [Fri, 7 Apr 2023 22:29:33 +0000 (22:29 +0000)]
bn_test: move rc initialization to its own line

19 months agobn_test: keep the error stack clean
tb [Fri, 7 Apr 2023 22:28:21 +0000 (22:28 +0000)]
bn_test: keep the error stack clean

Make message() print and clear the error stack. This way we can know
what test errored. To make this work also clear the error stack after
a handful of xfail tests.

19 months agobn_test: use bn_copy() instead of BN_free/BN_dup
tb [Fri, 7 Apr 2023 22:25:09 +0000 (22:25 +0000)]
bn_test: use bn_copy() instead of BN_free/BN_dup

This is not only simpler but also required by an upcoming change.

19 months agobn_test: a few early return would leak. goto err instead
tb [Fri, 7 Apr 2023 22:23:31 +0000 (22:23 +0000)]
bn_test: a few early return would leak. goto err instead

19 months agobn_test: rand_neg() is not only one of the most stupidly named functions
tb [Fri, 7 Apr 2023 22:22:10 +0000 (22:22 +0000)]
bn_test: rand_neg() is not only one of the most stupidly named functions
in the entire code base it also has a few parentheses too many

19 months agobn_test: handle rc consistently
tb [Fri, 7 Apr 2023 22:18:42 +0000 (22:18 +0000)]
bn_test: handle rc consistently

Various test functions had bugs due to the fact that the return code
would be set to 1 at the top so that each error would have to set rc = 0.
This is silly. Fail closed instead by setting rc = 0 at the top and only
flipping to 1 before the err label

19 months agobn_test: inline the only use of lst[]
tb [Fri, 7 Apr 2023 22:14:20 +0000 (22:14 +0000)]
bn_test: inline the only use of lst[]

lst[] can be converted from a bit string to a hex string. Use BN_hex2bn()
isntead of BN_bin2bn(). Handle this inside test_lshift() rather than doing
artistic ownership dances.

19 months agoRemove kernel locks from the ARP input path. Caller if_netisr()
bluhm [Fri, 7 Apr 2023 22:02:58 +0000 (22:02 +0000)]
Remove kernel locks from the ARP input path.  Caller if_netisr()
grabs the exclusive netlock and that is sufficent for in_arpinput()
and arpcache().
with kn@; OK mvs@; tested by Hrvoje Popovski

19 months agoImprove some test failure reporting
tb [Fri, 7 Apr 2023 17:09:54 +0000 (17:09 +0000)]
Improve some test failure reporting

19 months agoOops. Missed files in last commit.
krw [Fri, 7 Apr 2023 16:34:41 +0000 (16:34 +0000)]
Oops. Missed files in last commit.

19 months agoIgnore ten getter and setter control macros related to proxy BIOs.
schwarze [Fri, 7 Apr 2023 15:43:18 +0000 (15:43 +0000)]
Ignore ten getter and setter control macros related to proxy BIOs.
Those are not useful because such a BIO type neither exists
in LibreSSL nor in OpenSSL 1.1.1.
Not adding the deprecation notice to some manual page
because there is no manual page that is even vaguely related.

19 months agoTwo minor tweaks that are useful for processing bio.h, among other headers:
schwarze [Fri, 7 Apr 2023 15:39:18 +0000 (15:39 +0000)]
Two minor tweaks that are useful for processing bio.h, among other headers:
* ignore lines defining "__bounded__()"
* ignore whitespace between "#" and "include"

19 months agoMark BIO_CB_return(), BIO_cb_pre(), and BIO_cb_post() as intentionally
schwarze [Fri, 7 Apr 2023 14:47:37 +0000 (14:47 +0000)]
Mark BIO_CB_return(), BIO_cb_pre(), and BIO_cb_post() as intentionally
undocumented because they are unused according to codesearch.debian.net
and would cause nothing but obfuscation if they were used.

19 months agoAdd helper functions find_mbr_desc() and find_gpt_desc() to allow
krw [Fri, 7 Apr 2023 14:42:51 +0000 (14:42 +0000)]
Add helper functions find_mbr_desc() and find_gpt_desc() to allow
checking mbr_type[N].mt_desc and gpt_type[N].gt_desc before using
name on menu when printing out partition tables.

Tweak logic in find_mbr_type() and find_gpt_type() to be a bit
more paranoid.

Tweak function/variable names to be more in line to usage.

No functional change as all mt_desc and gt_desc are currently
NULL.

19 months agoPass a pt_entry pointer to rib_get() and rib_add().
claudio [Fri, 7 Apr 2023 13:49:03 +0000 (13:49 +0000)]
Pass a pt_entry pointer to rib_get() and rib_add().
Add rib_get_addr() to behave like rib_get() did before.
OK tb@

19 months agoDefault 'Is the disk partition alrady mounted?' to 'no' on install
kn [Fri, 7 Apr 2023 13:48:42 +0000 (13:48 +0000)]
Default 'Is the disk partition alrady mounted?' to 'no' on install

For installation, no partitions whatsoever are mounted, so 'yes' is always
wrong unless the user manually mounted stuff before that question.

No change for upgrade, where partitions on the root disk are mounted.

Idea from naddy, diff from Mikhail (mp39590 AT gmail)
Tweaks from me
OK op afresh1

19 months agoFix whitespace on two lines
tb [Fri, 7 Apr 2023 09:43:38 +0000 (09:43 +0000)]
Fix whitespace on two lines

19 months agoNail the root disk default in the guided disk encryption case
kn [Fri, 7 Apr 2023 09:40:18 +0000 (09:40 +0000)]
Nail the root disk default in the guided disk encryption case

Save the softraid volume's device and make it root disk default, being the
only legit choice in this case;  this gets it always right on systems with
multiple physical disks.

All other install/upgrade cases keep picking the first available [sw]d* disk
as root disk default.

OK afresh1

19 months agoregister a mapping of dwqe interfaces to ofw nodes/phandles.
dlg [Fri, 7 Apr 2023 09:33:51 +0000 (09:33 +0000)]
register a mapping of dwqe interfaces to ofw nodes/phandles.

i forgot to commit this as part of src/sys/dev/fdt/if_dwqe_fdt.c r1.7

found by mglocker@

19 months agoavoid use of uninitialised memory
jsg [Fri, 7 Apr 2023 09:31:59 +0000 (09:31 +0000)]
avoid use of uninitialised memory
ok miod@ kettenis@

19 months agoDetermine PHY mode and pass the appropriate flags down to the PHY when we
kettenis [Fri, 7 Apr 2023 08:53:03 +0000 (08:53 +0000)]
Determine PHY mode and pass the appropriate flags down to the PHY when we
attach it.

ok dlg@

19 months agoregister a mapping of dwqe interfaces to ofw nodes/phandles.
dlg [Fri, 7 Apr 2023 06:33:49 +0000 (06:33 +0000)]
register a mapping of dwqe interfaces to ofw nodes/phandles.

ok kettenis@

19 months agofixed regulators could have a "gpios" or "gpio" property.
dlg [Fri, 7 Apr 2023 06:18:26 +0000 (06:18 +0000)]
fixed regulators could have a "gpios" or "gpio" property.

we only handled "gpio" before. figuring this out has wasted many
days of my life recently.

ok patrick@ kettenis@

19 months agodrm/amdkfd: Get prange->offset after svm_range_vram_node_new
jsg [Fri, 7 Apr 2023 04:11:42 +0000 (04:11 +0000)]
drm/amdkfd: Get prange->offset after svm_range_vram_node_new

From Xiaogang Chen
d0386bd84e6d81990ef22e10657d5a5d9c209763 in linux-6.1.y/6.1.23
8eeddc0d4200762063e1c66b9cc63afa7b24ebf0 in mainline linux

19 months agodrm/i915: Move CSC load back into .color_commit_arm() when PSR is enabled on skl/glk
jsg [Fri, 7 Apr 2023 04:09:51 +0000 (04:09 +0000)]
drm/i915: Move CSC load back into .color_commit_arm() when PSR is enabled on skl/glk

From Ville Syrjala
fcf712b4e5d0aacbc193e71962bdaa4d4afe3335 in linux-6.1.y/6.1.23
a8e03e00b62073b494886dbff32f8b5338066c8b in mainline linux

19 months agodrm/i915: Disable DC states for all commits
jsg [Fri, 7 Apr 2023 04:07:59 +0000 (04:07 +0000)]
drm/i915: Disable DC states for all commits

From Ville Syrjala
0fc6fea41c7122aa5f2088117f50144b507e13d7 in linux-6.1.y/6.1.23
a2b6e99d8a623544f3bdccd28ee35b9c1b00daa5 in mainline linux

19 months agodrm/i915/dpt: Treat the DPT BO as a framebuffer
jsg [Fri, 7 Apr 2023 04:06:11 +0000 (04:06 +0000)]
drm/i915/dpt: Treat the DPT BO as a framebuffer

From Ville Syrjala
c781c107731fc09ce4330c8c636b8446d0f72aa4 in linux-6.1.y/6.1.23
3413881e1ecc3cba722a2e87ec099692eed5be28 in mainline linux

19 months agodrm/i915/gem: Flush lmem contents after construction
jsg [Fri, 7 Apr 2023 04:03:48 +0000 (04:03 +0000)]
drm/i915/gem: Flush lmem contents after construction

From Chris Wilson
21ee19974b19edcda7a8e4f9bd5b02c3a750a69e in linux-6.1.y/6.1.23
d032ca43f2c80049ce5aabd3f208dc3849359497 in mainline linux

19 months agodrm/amd/display: Take FEC Overhead into Timeslot Calculation
jsg [Fri, 7 Apr 2023 04:02:25 +0000 (04:02 +0000)]
drm/amd/display: Take FEC Overhead into Timeslot Calculation

From Fangzhi Zuo
fd71f4c9e3fa7454f9797c539abd5fcfc8b92b41 in linux-6.1.y/6.1.23
68dc1846c3a44d5e633be145c169ce2fd5420695 in mainline linux

19 months agodrm/amd/display: Add DSC Support for Synaptics Cascaded MST Hub
jsg [Fri, 7 Apr 2023 04:00:35 +0000 (04:00 +0000)]
drm/amd/display: Add DSC Support for Synaptics Cascaded MST Hub

From Fangzhi Zuo
41abe8828c83e8f73940790a3861b498a8b5ee3f in linux-6.1.y/6.1.23
f4f3b7dedbe849e780c779ba67365bb1db0d8637 in mainline linux

19 months agodrm/amdgpu: allow more APUs to do mode2 reset when go to S4
jsg [Fri, 7 Apr 2023 03:58:43 +0000 (03:58 +0000)]
drm/amdgpu: allow more APUs to do mode2 reset when go to S4

From Tim Huang
febacc33298f8d72d5bfd4d23a556cc21b5cd6c2 in linux-6.1.y/6.1.23
2fec9dc8e0acc3dfb56d1389151bcf405f087b10 in mainline linux

19 months agodrm/i915/tc: Fix the ICL PHY ownership check in TC-cold state
jsg [Fri, 7 Apr 2023 03:57:13 +0000 (03:57 +0000)]
drm/i915/tc: Fix the ICL PHY ownership check in TC-cold state

From Imre Deak
75084659969f5cd0287a86e7faae3ef0a5651d1e in linux-6.1.y/6.1.23
38c583019484f190d5b33f59b8ae810e6b1763c6 in mainline linux

19 months agodrm/amdkfd: Fixed kfd_process cleanup on module exit.
jsg [Fri, 7 Apr 2023 03:55:33 +0000 (03:55 +0000)]
drm/amdkfd: Fixed kfd_process cleanup on module exit.

From David Belanger
b969838c9554a0e9aab3c3cadfcd23d246bc2abe in linux-6.1.y/6.1.23
20bc9f76b6a2455c6b54b91ae7634f147f64987f in mainline linux

19 months agodrm/amdkfd: fix potential kgd_mem UAFs
jsg [Fri, 7 Apr 2023 03:53:55 +0000 (03:53 +0000)]
drm/amdkfd: fix potential kgd_mem UAFs

From Chia-I Wu
5045360f3bb62ccd4f87202e33489f71f8bbc3fc in linux-6.1.y/6.1.23
9da050b0d9e04439d225a2ec3044af70cdfb3933 in mainline linux

19 months agodrm/amdkfd: fix a potential double free in pqm_create_queue
jsg [Fri, 7 Apr 2023 03:52:40 +0000 (03:52 +0000)]
drm/amdkfd: fix a potential double free in pqm_create_queue

From Chia-I Wu
b861f0e62ae148eb5f0a48c4d6fcd5dc03b4e252 in linux-6.1.y/6.1.23
b2ca5c5d416b4e72d1e9d0293fc720e2d525fd42 in mainline linux

19 months agodrm/amdkfd: Fix BO offset for multi-VMA page migration
jsg [Fri, 7 Apr 2023 03:50:10 +0000 (03:50 +0000)]
drm/amdkfd: Fix BO offset for multi-VMA page migration

From Xiaogang Chen
b61b21bcbb8a379269de7d2e3e9ceb42e5368ec4 in linux-6.1.y/6.1.23
b4ee9606378bb9520c94d8b96f0305c3696f5c29 in mainline linux

19 months agoadd MLN
deraadt [Fri, 7 Apr 2023 01:18:01 +0000 (01:18 +0000)]
add MLN

19 months agoAdd two more RK3568 clocks.
kettenis [Thu, 6 Apr 2023 21:17:01 +0000 (21:17 +0000)]
Add two more RK3568 clocks.

ok dlg@

19 months agoFix two documentation bugs:
schwarze [Thu, 6 Apr 2023 20:52:18 +0000 (20:52 +0000)]
Fix two documentation bugs:
1. The function event_base_free(3) does reset the global variable
to the initial state when needed.
2. The CAVEATS section got the issue backwards: multiple threads
per base cause trouble, whereas multiples bases per thread do not.

While here, also avoid the plural when talking about the global
variable used by event_init(3): there is only one.

Using input from jmc@ and from Ted Bullock.

19 months agoDocument the effects that BIO_set_info_callback(3), BIO_callback_ctrl(3),
schwarze [Thu, 6 Apr 2023 19:23:12 +0000 (19:23 +0000)]
Document the effects that BIO_set_info_callback(3), BIO_callback_ctrl(3),
BIO_get_info_callback(3), and BIO_info_cb(3) have on connect BIOs.

19 months agoProperly document BIO_set_info_callback(3) and BIO_get_info_callback(3)
schwarze [Thu, 6 Apr 2023 19:06:51 +0000 (19:06 +0000)]
Properly document BIO_set_info_callback(3) and BIO_get_info_callback(3)
which where mentioned below SYNOPSIS and HISTORY but not described.
Also document the command constant BIO_CTRL_SET_CALLBACK
and the deprecated function type name bio_info_cb(3).
Mention that callbacks installed using BIO_set_callback_ex(3)
and BIO_set_callback(3) can tamper with *all* the return values.

19 months agoThe simplebus_attach() function already prints a newline, so drop it here.
kettenis [Thu, 6 Apr 2023 19:02:29 +0000 (19:02 +0000)]
The simplebus_attach() function already prints a newline, so drop it here.

19 months agoUse RCS tag instead of an incorrect path.
tb [Thu, 6 Apr 2023 18:43:47 +0000 (18:43 +0000)]
Use RCS tag instead of an incorrect path.

19 months agoMove a comment to the proper place
tb [Thu, 6 Apr 2023 12:01:45 +0000 (12:01 +0000)]
Move a comment to the proper place

19 months agoMarkup route flags to get tags
kn [Thu, 6 Apr 2023 11:29:55 +0000 (11:29 +0000)]
Markup route flags to get tags

":tM" to jump to the definition of RTF_MODIFIED is easier and faster than
manually navigating there.

OK schwarze

19 months agowycheproof: fix copy-paste error in previous
tb [Thu, 6 Apr 2023 08:41:53 +0000 (08:41 +0000)]
wycheproof: fix copy-paste error in previous

19 months agowycheproof: use EVP_MD instead of importing "hash"
tb [Thu, 6 Apr 2023 08:38:53 +0000 (08:38 +0000)]
wycheproof: use EVP_MD instead of importing "hash"

19 months agoCheck and assign on one line
tb [Thu, 6 Apr 2023 07:08:41 +0000 (07:08 +0000)]
Check and assign on one line

19 months agoZap extra empty line
tb [Thu, 6 Apr 2023 07:07:54 +0000 (07:07 +0000)]
Zap extra empty line

19 months agosimplify sshsig_find_principals() similar to what happened to
djm [Thu, 6 Apr 2023 03:56:02 +0000 (03:56 +0000)]
simplify sshsig_find_principals() similar to what happened to
sshsig_check_allowed_keys() in r1.31, removing some dead code

19 months agoremove redundant ssh!=NULL check; we'd already dereferenced it
djm [Thu, 6 Apr 2023 03:21:31 +0000 (03:21 +0000)]
remove redundant ssh!=NULL check; we'd already dereferenced it

19 months agomatch_user() shouldn't be called with user==NULL unless
djm [Thu, 6 Apr 2023 03:19:32 +0000 (03:19 +0000)]
match_user() shouldn't be called with user==NULL unless
host and ipaddr are also NULL

19 months agodon't care about glob() return value here.
djm [Thu, 6 Apr 2023 03:12:32 +0000 (03:12 +0000)]
don't care about glob() return value here.

19 months agobetter handle "phy-mode" properties, in particular around clk delays.
dlg [Thu, 6 Apr 2023 00:09:39 +0000 (00:09 +0000)]
better handle "phy-mode" properties, in particular around clk delays.

the phy mode can encode whether rk3568 mac should be doing the
delays when talking to the phy, or whether it should ignore them
and let the phy handle them. turns out this will probably be needed
by kettenis to get working ethernet on another rk3568 based system.

tweaks and ok kettenis@

19 months agoPush kernel lock into nd6_resolve()
kn [Wed, 5 Apr 2023 23:01:03 +0000 (23:01 +0000)]
Push kernel lock into nd6_resolve()

Tested as part of bigger unlock diffs, commit now as tiny first step.

OK bluhm

19 months agoARP has a sysctl to show the number of packets waiting for an arp
bluhm [Wed, 5 Apr 2023 21:51:47 +0000 (21:51 +0000)]
ARP has a sysctl to show the number of packets waiting for an arp
response.  Implement analog sysctl net.inet6.icmp6.nd6_queued for
ND6 to reduce places where mbufs can hide within the kernel.
Atomic operations operate on unsigned int.  Make the type of total
hold queue length consistent.
Use atomic load to read the value for the sysctl.  This clarifies
why no lock around sysctl_rdint() is needed.
OK mvs@ kn@