CVS: cvs.openbsd.org: src

2024-02-04 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2024/02/04 23:48:04

Modified files:
regress/lib/libc/locale/uselocale: uselocale.c 

Log message:
Cope with recent ctype.h prefix changes.



CVS: cvs.openbsd.org: src

2024-02-04 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2024/02/04 13:51:21

Modified files:
regress/lib/libc/timingsafe: timingsafe.c 

Log message:
More missing void

>From Christian Andersen



CVS: cvs.openbsd.org: src

2024-02-04 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2024/02/04 13:50:23

Modified files:
lib/libssl : ssl_lib.c tls13_handshake_msg.c 

Log message:
Of course libssl also has a few missing void

>From Christian Andersen



CVS: cvs.openbsd.org: src

2024-02-04 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2024/02/04 13:18:48

Modified files:
sys/arch/amd64/amd64: codepatch.c 

Log message:
Tweak codepatch_control_flow():
* it should be in .cptext so it gets unmapped when codepatching is done
* when doing a JMP, fill the area after it with INT3s instead of NOPs

ok deraadt@



CVS: cvs.openbsd.org: src

2024-02-04 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2024/02/04 11:44:23

Modified files:
sys/arch/arm64/stand/efiboot: efiboot.c 

Log message:
Add a DMA constraint for the x13s.  Some brilliant person at Qualcomm
decided that tying a wifi interface that can only do 32-bit DMA to their
compute platform that typically comes with at least 8G of memory was a
sensible thing to do.

Maybe we should be able to use an IOMMU to work around that.  But they
fucked that up as well.

ok patrick@, phessler@



CVS: cvs.openbsd.org: src

2024-02-04 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2024/02/04 10:51:59

Modified files:
sys/dev/ic : qwx.c 

Log message:
Fix cases where the size of the complete firmware file is used instead of
the carved out board firmware.

ok phessler@, stsp@



CVS: cvs.openbsd.org: src

2024-02-04 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2024/02/04 09:44:45

Modified files:
gnu/usr.bin/binutils-2.17/include/elf: common.h 
gnu/usr.bin/binutils-2.17/binutils: readelf.c 

Log message:
Add minimal support for GNU_PROPERTY



CVS: cvs.openbsd.org: src

2024-02-04 Thread Dave Voutila
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2024/02/04 07:57:00

Modified files:
usr.sbin/vmd   : vmm.c 

Log message:
Remove dead code and fix null deref if vm is not found.

Return early if no vm is found in vmd(8)'s primary vm fork/exec
function, preventing null deref in the 'fail' section. Also remove
inner return from the parent routine to prevent unreachable code.

Found by smatch, reported by and ok jsg@.



CVS: cvs.openbsd.org: src

2024-02-04 Thread Dave Voutila
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2024/02/04 07:56:45

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

Log message:
Prevent null pointer deref is vm isn't found.

This area of code in vmd(8) is suspect, but the null dereference
is easily avoided.

Found by smatch, reported by and ok jsg@



CVS: cvs.openbsd.org: src

2024-02-04 Thread Dave Voutila
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2024/02/04 07:54:51

Modified files:
usr.sbin/vmd   : vioblk.c 

Log message:
Initialize result in vioblk notification handler.

In the event the driver kicks the vioblk device, but the guest
doesn't have any available virtqueue space, vmd will return an
uninitialized value. If non-zero, it results in a notification to
the driver and effectively a spurious interrupt.

Found by smatch, reported by and ok jsg@



CVS: cvs.openbsd.org: src

2024-02-04 Thread Dave Voutila
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2024/02/04 07:53:12

Modified files:
usr.sbin/vmd   : fw_cfg.c 

Log message:
Reverse calloc args.

Found by smatch "double check that we're allocating correct size"
warning. Reported by and ok jsg@.



CVS: cvs.openbsd.org: src

2024-02-04 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2024/02/04 06:08:29

Modified files:
usr.bin/openssl: ca.c 

Log message:
Zap a useless comment followed by a stray semicolon

Noticed by Christian Andersen



CVS: cvs.openbsd.org: src

2024-02-04 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2024/02/04 06:07:02

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

Log message:
Fix asn1_integer_null_data_test()

The failed variable was erroneously initialized to 0, making this test
always pass.

>From Christian Andersen, thanks!



CVS: cvs.openbsd.org: src

2024-02-04 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2024/02/04 06:03:26

Modified files:
gnu/gcc/libstdc++-v3/config/os/bsd/openbsd: ctype_base.h 
gnu/lib/libstdc++/libstdc++/config/os/bsd/openbsd: ctype_base.h 

Log message:
Adapt base libstdc++ to the new ctype.h defines

ctype_base.h is correctly installed by make includes so the transition should
be automatic.  If you hit a failure with this header, make sure ctype.h and
ctype_base.h are in sync.

ok miod@ tb@



CVS: cvs.openbsd.org: src

2024-02-04 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2024/02/04 06:03:18

Modified files:
lib/libc/gen   : isctype.c ctype_.c 
include: ctype.h 

Log message:
Move ctype.h defines to the _CTYPE_ prefix, avoids clashes with identifiers in 
ports

Even if those _[BCNLPSUX] defines are in the reserved namespace, some
ports make use of those identifiers and thus need pointless
headscratching and patches.  Just use a longer reserved prefix.
We can't just #undef those defines as they are used in libc.

Change similar to what NetBSD did around 2010.  Went through base builds
and an amd64 bulk build, the only fallout was lib(e)stdc++ base_ctype.h.
"make includes" will install the latest ctype.h and libstdc++ ctype_base.h.

"makes sense" deraadt@, ok sthen@ tb@



CVS: cvs.openbsd.org: src

2024-02-04 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2024/02/04 05:46:01

Modified files:
lib/libc/locale: iswctype.c iswctype_l.c rune.h runetable.c 
 wctype.c 

Log message:
Change rune-specific #defines from _CTYPE_ prefix to _RUNETYPE_ prefix

Similar to what NetBSD did around 2010, this lets us move some defines
in ctype.h to the _CTYPE_ prefix.  No functional change.

"makes sense" deraadt, ok sthen@ tb@