CVS: cvs.openbsd.org: src

2022-01-20 Thread Damien Miller
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2022/01/21 00:04:19

Modified files:
usr.bin/ssh: clientloop.c 

Log message:
add a helper for writing an error message to the stderr_buf and setting
quit_pending; no functional change but saves a bunch of boilerplate



CVS: cvs.openbsd.org: src

2022-01-20 Thread Damien Miller
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2022/01/20 23:58:06

Modified files:
usr.bin/ssh: packet.c 

Log message:
correct comment and use local variable instead of long indirection;
spotted by dtucker@



CVS: cvs.openbsd.org: www

2022-01-20 Thread T . J . Townsend
CVSROOT:/cvs
Module name:www
Changes by: t...@cvs.openbsd.org2022/01/20 21:25:54

Modified files:
.  : ftp.html ftplist httpslist 
build  : mirrors.dat 
openbgpd   : ftp.html 
openntpd   : portable.html 
openssh: ftp.html portable.html 
rpki-client: portable.html 

Log message:
the infania.net mirror also doesn't resolve, so comment it out for now



CVS: cvs.openbsd.org: src

2022-01-20 Thread Greg Steuck
CVSROOT:/cvs
Module name:src
Changes by: gne...@cvs.openbsd.org  2022/01/20 20:13:22

Modified files:
regress/lib/libm/msun: Makefile 

Log message:
Require trig_test-2 to pass on arm64 and powerpc64

Thanks to mbuhl@ for testing on a plethora of platforms.

OK mbuhl@, tested by mbuhl@ and phessler@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Greg Steuck
CVSROOT:/cvs
Module name:src
Changes by: gne...@cvs.openbsd.org  2022/01/20 20:13:10

Modified files:
lib/libm/src   : k_cosf.c k_sin.c k_sinf.c s_cosf.c s_sin.c 
 s_sinf.c 

Log message:
Optimization for tiny x in cos and sin

Subset of FreeBSD commit 4339c67c485f0b1f7699863fc29f6c06862d1dde:
Moved the optimization for tiny x from __kernel_{cos,sin}[f](x) to
{cos_sin}[f](x) so that x doesn't need to be reclassified in the
"kernel" functions to determine if it is tiny (it still needs to be
reclassified in the cosine case for other reasons that will go away).
...

Parts of the original change were applied separately before.

Suggested by kettenis@

OK mbuhl@, tested by mbuhl@ and phessler@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Greg Steuck
CVSROOT:/cvs
Module name:src
Changes by: gne...@cvs.openbsd.org  2022/01/20 20:12:56

Modified files:
lib/libm   : Makefile 
regress/lib/libm/msun: Makefile 

Log message:
Unplug assembly implementations of trig functions on x86 platforms

The same change was done by NetBSD some time back as:

Disable x87 implementations of sin, cos, tan.

The x87 hardware uses a bad approximation to pi for argument
reduction, and consequently yields bad answers for inputs near pi or
pi/2.

OK mbuhl@, tested by mbuhl@ and phessler@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Greg Steuck
CVSROOT:/cvs
Module name:src
Changes by: gne...@cvs.openbsd.org  2022/01/20 20:12:43

Modified files:
lib/libm/src   : k_cos.c s_cos.c 

Log message:
Copy cos(3) software implementation from FreeBSD-13

The result passes more tests from msun suite. In particular,
testacc(cos, -0.34061437849088045332L, 0.94254960031831729956L,
ALL_STD_EXCEPT, FE_INEXACT);
matches instead of being 1e-16 off.

OK mbuhl@, tested by mbuhl@ and phessler@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Darren Tucker
CVSROOT:/cvs
Module name:src
Changes by: dtuc...@cvs.openbsd.org 2022/01/20 19:54:41

Modified files:
regress/usr.bin/ssh: cipher-speed.sh 

Log message:
Enable all supported ciphers and macs in the server before trying
to benchmark them.  Increase the data file size to get more signal.



CVS: cvs.openbsd.org: src

2022-01-20 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2022/01/20 17:53:40

Modified files:
usr.bin/ssh: ssh-keyscan.c 

Log message:
When poll(2) returns -1, for some error conditions pfd[].revents is
not cleared.  There are subtle errors in various programs.
In this particular case, the program should error out.
ok djm millert



CVS: cvs.openbsd.org: src

2022-01-20 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/01/20 13:37:33

Modified files:
lib/libssl : ssl_sigalgs.c 

Log message:
Remove the remaining three parens in return statements.



CVS: cvs.openbsd.org: src

2022-01-20 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/01/20 13:35:47

Modified files:
lib/libssl : ssl_sigalgs.c 

Log message:
Use correct spelling of NULL.



CVS: cvs.openbsd.org: src

2022-01-20 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2022/01/20 11:06:20

Modified files:
usr.sbin/bgpd  : bgpd.c rde.c rtr.c session.c 

Log message:
Make sure that all poll loops properly restart the poll loop on EINTR.
Also either fail hard or restart after other errors. In anycase do not
look at pollfds after an error.
OK benno@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Sebastian Benoit
CVSROOT:/cvs
Module name:src
Changes by: be...@cvs.openbsd.org   2022/01/20 10:56:35

Modified files:
usr.sbin/relayd: ca.c 

Log message:
catch poll() returning EINTR.
ok millert@ claudio@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2022/01/20 10:13:12

Modified files:
sys/net: pfkeyv2_convert.c 

Log message:
pfkey import_flow() must do the NULL check before doing pointer
arithmetic.
found by kubsan; joint work with tobhe@; OK millert@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2022/01/20 10:11:31

Modified files:
sys/kern   : subr_prf.c 

Log message:
snprintf(9) allows NULL string if size is 0.  But doing NULL pointer
arithmetic is undefined behavior.  Check that size is positive
before adding to pointer.  While there, use NUL char for string
termination.
found by kubsan; joint work with tobhe@; OK millert@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2022/01/20 09:36:19

Modified files:
usr.sbin/rpki-client: cert.c parser.c 

Log message:
Move the notBefore and notAfter checks from proc_parser_root_cert()
to ta_parse(). This fits better there. Also drop extracting and
printing the x509 subject of the TAs. The subject is more or less
the filename anyway which is already printed.
OK tb@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Christian Weisgerber
CVSROOT:/cvs
Module name:src
Changes by: na...@cvs.openbsd.org   2022/01/20 07:18:10

Modified files:
lib/libc/asr   : asr.c 
regress/lib/libc/asr/bin: res_mkquery.c res_query.c 
usr.sbin/smtpd : unpack_dns.c 

Log message:
remove unused variable from all copies of _asr_strdname()

... including those inlined into print_dname().  This also fixes
-Wunused-but-set-variable warnings warnings in smtpd and smtpctl.
The code was imported with asr and then copied around.

ok deraadt@ guenther@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Christian Weisgerber
CVSROOT:/cvs
Module name:src
Changes by: na...@cvs.openbsd.org   2022/01/20 07:12:55

Modified files:
usr.sbin/ospf6ctl: ospf6ctl.c 

Log message:
ospf6ctl: fix -Wunused-but-set-variable warning

ok guenther@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Christian Weisgerber
CVSROOT:/cvs
Module name:src
Changes by: na...@cvs.openbsd.org   2022/01/20 07:11:27

Modified files:
usr.sbin/eigrpd: rde_dual.c 

Log message:
eigrpd: fix -Wunused-but-set-variable warning

ok guenther@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Christian Weisgerber
CVSROOT:/cvs
Module name:src
Changes by: na...@cvs.openbsd.org   2022/01/20 07:10:07

Modified files:
usr.sbin/dvmrpctl: dvmrpctl.c 

Log message:
dvmrpctl: fix -Wunused-but-set-variable warning

ok guenther@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Christian Weisgerber
CVSROOT:/cvs
Module name:src
Changes by: na...@cvs.openbsd.org   2022/01/20 07:07:34

Modified files:
usr.bin/mg : interpreter.c 

Log message:
mg: fix -Wunused-but-set-variable warnings

strtonum() is only called to verify that a string is numerical, the
return value is unused.
inlist is no longer used after the code was refactored.

ok millert@ guenther@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Christian Weisgerber
CVSROOT:/cvs
Module name:src
Changes by: na...@cvs.openbsd.org   2022/01/20 07:03:32

Modified files:
usr.sbin/ospf6d: ospf6d.c rde.c 

Log message:
ospf6d: fix -Wunused-but-set-variable warnings

ospf6d.c: sync a missing bit of (disabled) code with ospfd
rde.c: ifdef out some more incomplete code

ok denis@ claudio@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Tobias Heider
CVSROOT:/cvs
Module name:src
Changes by: to...@cvs.openbsd.org   2022/01/20 07:02:51

Modified files:
sys/arch/powerpc/powerpc: trap.c 

Log message:
Don't return uninitialized stack memory on copyin() error.
Found with clang static analyzer.

ok gkoehler@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/01/20 06:12:48

Modified files:
sys/dev/pci: pcidevs.h pcidevs_data.h 

Log message:
regen



CVS: cvs.openbsd.org: src

2022-01-20 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/01/20 06:12:07

Modified files:
sys/dev/pci: pcidevs 

Log message:
add Tiger Lake H ids
from 11th Generation Intel Core Processor Datasheet 631121-009
some ids from thfr@'s Dell Precision 7560
and ymtc nvme found in jcs@'s Huawei MateBook X (2020)



CVS: cvs.openbsd.org: src

2022-01-20 Thread Inoguchi Kinichiro
CVSROOT:/cvs
Module name:src
Changes by: inogu...@cvs.openbsd.org2022/01/20 04:31:37

Modified files:
lib/libcrypto/evp: e_rc2.c 

Log message:
Add check for EVP_CIPHER_CTX_ctrl

suggestion from tb@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Inoguchi Kinichiro
CVSROOT:/cvs
Module name:src
Changes by: inogu...@cvs.openbsd.org2022/01/20 04:22:48

Modified files:
lib/libcrypto/evp: e_rc2.c 

Log message:
Add check for EVP_CIPHER_CTX_set_key_length return value

CID 21653

ok jsing@ millert@ tb@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Inoguchi Kinichiro
CVSROOT:/cvs
Module name:src
Changes by: inogu...@cvs.openbsd.org2022/01/20 04:18:49

Modified files:
lib/libcrypto/pkcs12: p12_init.c 

Log message:
Add check for OBJ_nid2obj return value

input from tb@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Inoguchi Kinichiro
CVSROOT:/cvs
Module name:src
Changes by: inogu...@cvs.openbsd.org2022/01/20 04:15:39

Modified files:
lib/libcrypto/pkcs12: p12_init.c 

Log message:
Add check for ASN1_INTEGER_set

CID 24893

ok jsing@ millert@ tb@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Inoguchi Kinichiro
CVSROOT:/cvs
Module name:src
Changes by: inogu...@cvs.openbsd.org2022/01/20 04:12:14

Modified files:
lib/libcrypto/sm2: sm2_sign.c 

Log message:
Fix check for BN_mod_inverse_ct return value

ok jsing@ millert@ tb@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Inoguchi Kinichiro
CVSROOT:/cvs
Module name:src
Changes by: inogu...@cvs.openbsd.org2022/01/20 04:11:17

Modified files:
lib/libcrypto/rsa: rsa_gen.c 

Log message:
Fix check for BN_mod_inverse_ct return value

ok jsing@ millert@ tb@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Inoguchi Kinichiro
CVSROOT:/cvs
Module name:src
Changes by: inogu...@cvs.openbsd.org2022/01/20 04:10:11

Modified files:
lib/libcrypto/rsa: rsa_eay.c 

Log message:
Add check for BN_sub return value

CID 24839

ok jsing@ millert@ tb@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Inoguchi Kinichiro
CVSROOT:/cvs
Module name:src
Changes by: inogu...@cvs.openbsd.org2022/01/20 04:08:12

Modified files:
lib/libcrypto/rsa: rsa_chk.c 

Log message:
Fix check for BN_mod_inverse_ct return value

ok jsing@ millert@ tb@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2022/01/20 04:06:57

Modified files:
sys/arch/amd64/amd64: identcpu.c 
sys/kern   : kern_descrip.c kern_sched.c subr_pool.c 
sys/net: rtsock.c 
sys/netinet: in_pcb.h ip_esp.c 

Log message:
Shifting signed integers left by 31 is undefined behavior in C.
found by kubsan; joint work with tobhe@; OK miod@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Inoguchi Kinichiro
CVSROOT:/cvs
Module name:src
Changes by: inogu...@cvs.openbsd.org2022/01/20 04:06:24

Modified files:
lib/libcrypto/evp: p_lib.c 

Log message:
Add check for BIO_indent return value

CID 24778

ok jsing@ millert@ tb@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Inoguchi Kinichiro
CVSROOT:/cvs
Module name:src
Changes by: inogu...@cvs.openbsd.org2022/01/20 04:03:49

Modified files:
lib/libcrypto/ecdsa: ecs_ossl.c 

Log message:
Fix check for BN_mod_inverse_ct return value

ok jsing@ millert@ tb@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Inoguchi Kinichiro
CVSROOT:/cvs
Module name:src
Changes by: inogu...@cvs.openbsd.org2022/01/20 04:02:45

Modified files:
lib/libcrypto/ec: ecp_smpl.c 

Log message:
Fix check for BN_mod_inverse_ct return value

ok jsing@ millert@ tb@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Inoguchi Kinichiro
CVSROOT:/cvs
Module name:src
Changes by: inogu...@cvs.openbsd.org2022/01/20 04:00:34

Modified files:
lib/libcrypto/dh: dh_ameth.c 

Log message:
Add check for BIO_indent return value

CID 24812

ok jsing@ millert@ tb@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Inoguchi Kinichiro
CVSROOT:/cvs
Module name:src
Changes by: inogu...@cvs.openbsd.org2022/01/20 03:58:35

Modified files:
lib/libcrypto/cms: cms_enc.c 

Log message:
Add check for EVP_CIPHER_CTX_set_key_length return value

It returns 1 on success and 0 for failure, never negative value.

ok jsing@ millert@ tb@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Inoguchi Kinichiro
CVSROOT:/cvs
Module name:src
Changes by: inogu...@cvs.openbsd.org2022/01/20 03:56:22

Modified files:
lib/libcrypto/bn: bn_x931p.c 

Log message:
Add and fix check for BN functions return value

ok jsing@ millert@ tb@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Inoguchi Kinichiro
CVSROOT:/cvs
Module name:src
Changes by: inogu...@cvs.openbsd.org2022/01/20 03:53:33

Modified files:
lib/libcrypto/bn: bn_print.c 

Log message:
Add check for BN functions return value

CID 21665 24835

comment from jsing@ and tb@
ok jsing@ millert@ tb@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Inoguchi Kinichiro
CVSROOT:/cvs
Module name:src
Changes by: inogu...@cvs.openbsd.org2022/01/20 03:49:56

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

Log message:
Add check for BIO_indent return value

CID 24869

ok jsing@ millert@ tb@



CVS: cvs.openbsd.org: src

2022-01-20 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/01/20 03:18:26

Modified files:
sys/dev/pci/drm/amd/display/amdgpu_dm: amdgpu_dm.c 

Log message:
drm/amd/display: explicitly set is_dsc_supported to false before use

>From Mario Limonciello
ce258c74f8d95e81ce65f53775fcdcbc8ca090da in linux 5.15.y/5.15.16
63ad5371cd1e379519395c49a4b6a652c36c98e5 in mainline linux



CVS: cvs.openbsd.org: src

2022-01-20 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2022/01/20 02:24:08

Modified files:
usr.sbin/rpki-client: extern.h parser.c 

Log message:
Rename mft_check() to proc_parser_mft_check() and make it a static function.