Re: CVS: cvs.openbsd.org: src

2022-03-02 Thread Anton Lindqvist
On Wed, Mar 02, 2022 at 04:28:00AM -0700, Joel Sing wrote:
> CVSROOT:  /cvs
> Module name:  src
> Changes by:   js...@cvs.openbsd.org   2022/03/02 04:28:00
> 
> Modified files:
>   lib/libcrypto/asn1: a_object.c asn1_locl.h 
>   lib/libcrypto/objects: obj_dat.c 
> 
> Log message:
> Rewrite ASN1_OBJECT content to ascii/text conversion.
> 
> Rewrite the ASN1_OBJECT content to ascii/text conversion code using CBB and
> CBS. Currently there is a strange split with i2t_ASN1_OBJECT() calling
> OBJ_obj2txt() which implements the conversion, while OBJ_txt2obj() calls
> back into the misnamed a2d_ASN1_OBJECT() function. Move the conversion
> code into asn1/a_object.c and have OBJ_txt2obj() call that instead.
> 
> ok inoguchi@ tb@

This broke regress/lib/libssl/openssl-ruby:

> lib/libssl:
Exit: 1
Duration: 00:20:57
Log: 30-lib-libssl.log

 openssl-ruby-test 
rm -f .test
cd /home/src/regress/lib/libssl/openssl-ruby && exec make test
mkdir -p build
touch .builddir
cd build &&  ruby30 /usr/local/share/openssl-ruby-tests/ext/openssl/extconf.rb 
&&  make;
checking for rb_io_maybe_wait()... no
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for openssl/ssl.h... yes
checking for LIBRESSL_VERSION_NUMBER in openssl/opensslv.h... yes
checking for LibreSSL version >= 3.1.0... yes
checking for RAND_egd()... no
checking for ENGINE_load_dynamic() in openssl/engine.h... yes
checking for ENGINE_load_4758cca() in openssl/engine.h... no
checking for ENGINE_load_aep() in openssl/engine.h... no
checking for ENGINE_load_atalla() in openssl/engine.h... no
checking for ENGINE_load_chil() in openssl/engine.h... no
checking for ENGINE_load_cswift() in openssl/engine.h... no
checking for ENGINE_load_nuron() in openssl/engine.h... no
checking for ENGINE_load_sureware() in openssl/engine.h... no
checking for ENGINE_load_ubsec() in openssl/engine.h... no
checking for ENGINE_load_padlock() in openssl/engine.h... no
checking for ENGINE_load_capi() in openssl/engine.h... no
checking for ENGINE_load_gmp() in openssl/engine.h... no
checking for ENGINE_load_gost() in openssl/engine.h... no
checking for ENGINE_load_cryptodev() in openssl/engine.h... no
checking for SSL.ctx in openssl/ssl.h... no
checking for EVP_MD_CTX_new()... yes
checking for EVP_MD_CTX_free()... yes
checking for EVP_MD_CTX_pkey_ctx()... yes
checking for X509_STORE_get_ex_data()... yes
checking for X509_STORE_set_ex_data()... yes
checking for X509_STORE_get_ex_new_index()... no
checking for X509_CRL_get0_signature()... yes
checking for X509_REQ_get0_signature()... yes
checking for X509_REVOKED_get0_serialNumber()... yes
checking for X509_REVOKED_get0_revocationDate()... yes
checking for X509_get0_tbs_sigalg()... yes
checking for X509_STORE_CTX_get0_untrusted()... yes
checking for X509_STORE_CTX_get0_cert()... yes
checking for X509_STORE_CTX_get0_chain()... yes
checking for OCSP_SINGLERESP_get0_id()... yes
checking for SSL_CTX_get_ciphers()... yes
checking for X509_up_ref()... yes
checking for X509_CRL_up_ref()... yes
checking for X509_STORE_up_ref()... yes
checking for SSL_SESSION_up_ref()... yes
checking for EVP_PKEY_up_ref()... yes
checking for SSL_CTX_set_min_proto_version(NULL, 0) in openssl/ssl.h... yes
checking for SSL_CTX_get_security_level()... no
checking for X509_get0_notBefore()... yes
checking for SSL_SESSION_get_protocol_version()... yes
checking for TS_STATUS_INFO_get0_status()... no
checking for TS_STATUS_INFO_get0_text()... no
checking for TS_STATUS_INFO_get0_failure_info()... no
checking for TS_VERIFY_CTS_set_certs(NULL, NULL) in openssl/ts.h... no
checking for TS_VERIFY_CTX_set_store()... no
checking for TS_VERIFY_CTX_add_flags()... no
checking for TS_RESP_CTX_set_time_cb()... no
checking for EVP_PBE_scrypt()... no
checking for SSL_CTX_set_post_handshake_auth()... yes
checking for EVP_PKEY_check()... yes
checking for SSL_CTX_set_ciphersuites()... yes
checking for SSL_set0_tmp_dh_pkey()... no
checking for ERR_get_error_all()... no
checking for TS_VERIFY_CTX_set_certs(NULL, NULL) in openssl/ts.h... no
checking for SSL_CTX_load_verify_file()... no
checking for BN_check_prime()... no
checking for EVP_MD_CTX_get0_md()... no
checking for EVP_MD_CTX_get_pkey_ctx()... no
checking for EVP_PKEY_eq()... no
checking for EVP_PKEY_dup()... no
creating extconf.h
creating Makefile
compiling /usr/local/share/openssl-ruby-tests/ext/openssl/openssl_missing.c
compiling /usr/local/share/openssl-ruby-tests/ext/openssl/ossl.c
compiling /usr/local/share/openssl-ruby-tests/ext/openssl/ossl_asn1.c
compiling /usr/local/share/openssl-ruby-tests/ext/openssl/ossl_bio.c
compiling /usr/local/share/openssl-ruby-tests/ext/openssl/ossl_bn.c
compiling /usr/local/share/openssl-ruby-tests/ext/openssl/ossl_cipher.c
compiling /usr/local/share/openssl-ruby-tests/ext/openssl/ossl_config.c
compiling /usr/local/share/openssl-ruby-tests/ext/openssl/ossl_digest.c
compiling /usr/local/share/openssl-ruby-tests/ext/openssl/ossl_engine.c
compiling 

CVS: cvs.openbsd.org: www

2022-03-02 Thread Pamela Mosiejczuk
CVSROOT:/cvs
Module name:www
Changes by: pam...@cvs.openbsd.org  2022/03/02 22:43:03

Modified files:
.  : plus.html 

Log message:
catch up changelog though feb 3 with kmos@
ok florian



CVS: cvs.openbsd.org: src

2022-03-02 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2022/03/02 16:27:43

Modified files:
usr.sbin/httpd : server_file.c 

Log message:
struct stat from early file inspection was being used after actual file
open() which means the stat could refer to the wrong file.  Mostly this
relates to st_size use.  This bug could mean that httpd sends new files
truncated to the old length, saying "I am sure you have the correct file now"?
Could have other bad effects.
ok tb millert bluhm



CVS: cvs.openbsd.org: src

2022-03-02 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2022/03/02 14:30:58

Modified files:
sys/netinet: in_pcb.c 

Log message:
Use NULL instead of 0 for pointer.



CVS: cvs.openbsd.org: src

2022-03-02 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2022/03/02 13:16:43

Modified files:
sys/netinet: ip_ipsp.h 

Log message:
Merge two comments describing the locks into one.



CVS: cvs.openbsd.org: src

2022-03-02 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/03/02 12:52:19

Modified files:
usr.sbin/httpd : server_file.c 

Log message:
Simplify .gz handling a bit

Combine strlcpy + strlcat into a single snprintf and remove a few
unnecessary parentheses.

ok deraadt millert



CVS: cvs.openbsd.org: src

2022-03-02 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/03/02 10:53:03

Modified files:
lib/libcrypto/x509: x509_constraints.c 

Log message:
Unwrap a line



CVS: cvs.openbsd.org: src

2022-03-02 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2022/03/02 10:47:11

Modified files:
sys/scsi   : scsiconf.c 

Log message:
Abstract the memory allocation, scsibus_softc data copying and
flag setting bits of creating a scsi_link into scsi_alloc_link().

Shrinks the bloated scsi_probe_link() a bit, makes it possible to
eventually create a useable scsi_link even when scsi_probe_link()
can't attach a device.

Developed from part of a diff submitted by Scott Nicholas via
tech@.



CVS: cvs.openbsd.org: src

2022-03-02 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/03/02 10:45:40

Modified files:
lib/libcrypto/asn1: a_object.c 

Log message:
whitespace



CVS: cvs.openbsd.org: src

2022-03-02 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2022/03/02 10:39:56

Modified files:
regress/lib/libcrypto/asn1: asn1object.c 

Log message:
Provide additional ASN1_OBJECT test coverage.



CVS: cvs.openbsd.org: src

2022-03-02 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2022/03/02 09:51:43

Modified files:
usr.sbin/bgpd  : rde.h rde_rib.c rde_update.c 

Log message:
Adapt prefix_adjout_update() the same way as prefix_adjout_withdraw()
and to the accounting in the function.
OK tb@



CVS: cvs.openbsd.org: src

2022-03-02 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2022/03/02 09:35:49

Modified files:
sys/dev/ic : bwfm.c bwfmvar.h 
sys/dev/pci: if_bwfm_pci.c 

Log message:
The firmware for the bwfm(4) variants in Apple Silicon Macs has variants
for different module types, module vendors and module revisions.  Make
our driver use the same naming scheme as Asahi Linux.

ok patrick@



CVS: cvs.openbsd.org: src

2022-03-02 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2022/03/02 07:49:25

Modified files:
usr.sbin/bgpd  : rde.h 

Log message:
Correct prefix_adjout_destroy() prototype



CVS: cvs.openbsd.org: src

2022-03-02 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2022/03/02 07:44:46

Modified files:
usr.sbin/bgpd  : rde.c rde.h rde_rib.c rde_update.c 

Log message:
Refactor prefix_adjout_withdraw()

Just pass the prefix to be withdrawn to the function and move the lookup
up. Adjust how the various accounting vars are updated so that the
values are decremented in the right cases. Do the same accounting dance
for prefix_adjout_destroy(). Adjust rde_up_flush_upcall() to directly
call prefix_adjout_withdraw() without calling it via up_generate_updates().
OK tb@



CVS: cvs.openbsd.org: src

2022-03-02 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2022/03/02 06:58:08

Modified files:
sys/scsi   : scsiconf.c 

Log message:
Move the code obtaining the LUN 0 scsi_link used to determine the
LUNs available to a target into scsi_get_target_luns(). Clearer
code and prep for future changes.

No functional change.

Extracted from a larger diff submitted by Scott Nicholas via
tech@.



CVS: cvs.openbsd.org: src

2022-03-02 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/03/02 06:09:56

Modified files:
sys/dev/pci/drm/i915/display: intel_snps_phy.c 

Log message:
drm/i915/dg2: Print PHY name properly on calibration error

>From Matt Roper
d064d0c39405a7f0fc76d9b70ce9fb3bf434fe05 in linux 5.15.y/5.15.26
28adef861233c6fce47372ebd2070b55eaa8e899 in mainline linux



CVS: cvs.openbsd.org: src

2022-03-02 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/03/02 06:07:51

Modified files:
sys/dev/pci/drm: drm_edid.c 

Log message:
drm/edid: Always set RGB444

>From Maxime Ripard
143dafa60aa7f0894a8f1b63b001e3a6f30169a0 in linux 5.15.y/5.15.26
ecbd4912a693b862e25cba0a6990a8c95b00721e in mainline linux



CVS: cvs.openbsd.org: src

2022-03-02 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/03/02 06:06:03

Modified files:
sys/dev/pci/drm/i915/display: intel_bw.c 

Log message:
drm/i915: Fix bw atomic check when switching between SAGV vs. no SAGV

>From Ville Syrjala
0726fca0b6cc26a9ee6b0a0ac8984b8be0c62fb8 in linux 5.15.y/5.15.26
ec663bca9128f13eada25cd0446e7fcb5fcdc088 in mainline linux



CVS: cvs.openbsd.org: src

2022-03-02 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/03/02 06:04:05

Modified files:
sys/dev/pci/drm/i915: intel_pm.c 

Log message:
drm/i915: Correctly populate use_sagv_wm for all pipes

>From Ville Syrjala
1b4445e09df83c397343ef8ab6b3ab560a4831ff in linux 5.15.y/5.15.26
afc189df6bcc6be65961deb54e15ec60e7f85337 in mainline linux



CVS: cvs.openbsd.org: src

2022-03-02 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/03/02 06:01:22

Modified files:
sys/dev/pci/drm/i915/display: intel_bw.h 

Log message:
drm/i915: Widen the QGV point mask

>From Ville Syrjala
7782e3c4e5390d217604a73a095db14d48c8b714 in linux 5.15.y/5.15.26
3f33364836aacc28cd430d22cf22379e3b5ecd77 in mainline linux



CVS: cvs.openbsd.org: src

2022-03-02 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/03/02 05:58:57

Modified files:
sys/dev/pci/drm/amd/amdgpu: soc15.c 

Log message:
drm/amdgpu: do not enable asic reset for raven2

>From Chen Gong
8840d963e56685f8750c710b1d567a283712c554 in linux 5.15.y/5.15.26
1e2be869c8a7247a7253ef4f461f85e2f5931b95 in mainline linux



CVS: cvs.openbsd.org: src

2022-03-02 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/03/02 05:57:11

Modified files:
sys/dev/pci/drm/amd/amdgpu: soc15.c 

Log message:
drm/amdgpu: disable MMHUB PG for Picasso

>From Evan Quan
70b2413ac30c88a049f179d674d29d1f6af1d29a in linux 5.15.y/5.15.26
f626dd0ff05043e5a7154770cc7cda66acee33a3 in mainline linux



CVS: cvs.openbsd.org: src

2022-03-02 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/03/02 05:53:45

Modified files:
sys/dev/pci/drm/amd/amdgpu: amdgpu_drv.c amdgpu_kms.c 

Log message:
drm/amd: Check if ASPM is enabled from PCIe subsystem

>From Mario Limonciello
ea44fcee7e3d87725423c904306a99cd42bd24b7 in linux 5.15.y/5.15.26
7294863a6f01248d72b61d38478978d638641bee in mainline linux



CVS: cvs.openbsd.org: src

2022-03-02 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2022/03/02 05:53:15

Modified files:
sys/netinet: in_pcb.h tcp_subr.c udp_usrreq.c 
sys/netinet6   : in6_pcb.c raw_ip6.c 

Log message:
The return value of in6_pcbnotify() is never used.  Make it a void
function.
OK gnezdo@ mvs@ florian@ sashan@



CVS: cvs.openbsd.org: src

2022-03-02 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/03/02 05:50:08

Modified files:
sys/dev/pci/drm/amd/pm/swsmu/smu11: sienna_cichlid_ppt.c 

Log message:
drm/amd/pm: fix some OEM SKU specific stability issues

>From Evan Quan
c00e4c01f470f0446556bd99af899bfa26dd9fae in linux 5.15.y/5.15.26
e3f3824874da78db5775a5cb9c0970cd1c6978bc in mainline linux



CVS: cvs.openbsd.org: src

2022-03-02 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/03/02 05:48:18

Modified files:
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn30: dcn30_clk_mgr.c 
sys/dev/pci/drm/amd/display/dc/core: amdgpu_dc.c 

Log message:
drm/amd/display: Protect update_bw_bounding_box FPU code.

>From Bas Nieuwenhuizen
211b67fb5a49c9f6e6a63d9b94ea96bf2e39341a in linux 5.15.y/5.15.26
1432108d00e42ffa383240bcac8d58f89ae19104 in mainline linux



CVS: cvs.openbsd.org: src

2022-03-02 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/03/02 05:45:40

Modified files:
sys/dev/pci/drm/amd/display/dc/dcn21: dcn21_resource.c 

Log message:
revert rev 1.6, local change to use DC_FP_START()/DC_FP_END() in
update_bw_bounding_box()

a linux 5.15.26 patch adds this to the callers



CVS: cvs.openbsd.org: src

2022-03-02 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2022/03/02 05:45:35

Modified files:
sys/arch/arm64/arm64: cpu.c 

Log message:
Recognize the cores on Apple's M1 Pro/Max SoCs.

ok jsg@



CVS: cvs.openbsd.org: src

2022-03-02 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2022/03/02 05:44:48

Modified files:
sys/arch/arm64/conf: RAMDISK 
sys/arch/arm64/dev: aplsmc.c 

Log message:
Add RTC support to aplsmc(4).  The SMC firmware distributed with macOS 12.x
has a method to read the counter that forms the base of the RTC.  This seems
to be the preferred way to access the RTC going forward.  The RTC offset is
still stored in the SPMI PMU, but we can use the nvmem interface to read
and write that.  This makes the RTC work on systems with the M1 Pro/Max SoC.

Sprinkle some #ifdef SMALL_KERNEL around and enable the driver on RAMDISK
kernels.

ok patrick@



CVS: cvs.openbsd.org: src

2022-03-02 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2022/03/02 05:35:14

Modified files:
sys/arch/arm64/dev: aplpmu.c 

Log message:
Add nvmem support and make this available on all Apple SPMI PMUs.  Restrict
the RTC interface to the "sera" PMU found on Apple M1 systems.

ok patrick@



CVS: cvs.openbsd.org: src

2022-03-02 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2022/03/02 05:00:46

Modified files:
sys/dev/ofw: ofw_misc.c ofw_misc.h 

Log message:
Add an interface to write to an nvmem cell.

ok patrick@



CVS: cvs.openbsd.org: src

2022-03-02 Thread Landry Breuil
CVSROOT:/cvs
Module name:src
Changes by: lan...@cvs.openbsd.org  2022/03/02 04:43:52

Modified files:
etc: services 

Log message:
Add openvpn ports (udp/1194 & tcp/1194) to /etc/services

Registered at IANA since 2004, also present on Linux & FreeBSD

ok sthen@ stsp@ jca@



CVS: cvs.openbsd.org: src

2022-03-02 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2022/03/02 04:28:00

Modified files:
lib/libcrypto/asn1: a_object.c asn1_locl.h 
lib/libcrypto/objects: obj_dat.c 

Log message:
Rewrite ASN1_OBJECT content to ascii/text conversion.

Rewrite the ASN1_OBJECT content to ascii/text conversion code using CBB and
CBS. Currently there is a strange split with i2t_ASN1_OBJECT() calling
OBJ_obj2txt() which implements the conversion, while OBJ_txt2obj() calls
back into the misnamed a2d_ASN1_OBJECT() function. Move the conversion
code into asn1/a_object.c and have OBJ_txt2obj() call that instead.

ok inoguchi@ tb@



CVS: cvs.openbsd.org: www

2022-03-02 Thread Job Snijders
CVSROOT:/cvs
Module name:www
Changes by: j...@cvs.openbsd.org2022/03/02 04:19:39

Modified files:
build  : support.dat 
.  : support.html 

Log message:
Add RSSF



CVS: cvs.openbsd.org: src

2022-03-02 Thread Florian Obser
CVSROOT:/cvs
Module name:src
Changes by: flor...@cvs.openbsd.org 2022/03/02 04:10:43

Modified files:
usr.sbin/httpd : httpd.c httpd.h server_fcgi.c server_http.c 

Log message:
Nothing uses kv_flags.

John (j AT bitminer.ca) pointed out that we didn't correctly
initialize struct kv and might use slower KV_FLAG_GLOBBING path in
kv_find depending on stack garbage. Instead of fixing the
initialization just delete kv_flags from struct kv.

OK claudio, tb



CVS: cvs.openbsd.org: src

2022-03-02 Thread Jason McIntyre
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/03/02 02:39:41

Modified files:
usr.bin/make/PSD.doc: tutorial.ms 

Log message:
make searches for makefile before Makefile;
from raf czlonka



CVS: cvs.openbsd.org: src

2022-03-02 Thread Stefan Sperling
CVSROOT:/cvs
Module name:src
Changes by: s...@cvs.openbsd.org2022/03/02 02:35:24

Modified files:
distrib/notes/octeon: install 

Log message:
Document u-boot workaround required for unattended boot of edgerouter 6p.

ok afresh1@ kevlo@, who both ran into the same issue



CVS: cvs.openbsd.org: src

2022-03-02 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2022/03/02 02:27:34

Modified files:
sys/net: pfkeyv2.h 

Log message:
Convert a few last struct members from u_intXY_t to uintXY_t. Now all
structs use consistent integer types.
OK jsg@ mvs@