HardenedBSD/src abcca81bin/kill kill.1, lib/libthr/thread thr_list.c thr_create.c

Merge branch 'freebsd/14-stable/main' into hardened/14-stable/master
DeltaFile
+7-7lib/libthr/thread/thr_list.c
+9-2sys/kern/kern_ktrace.c
+6-0bin/kill/kill.1
+3-3lib/libthr/thread/thr_create.c
+2-2lib/libthr/thread/thr_sleepq.c
+2-0lib/libthr/thread/thr_init.c
+29-141 files not shown
+30-147 files

HardenedBSD/src 18270a7contrib/spleen spleen-32x64.bdf spleen-16x32.bdf

contrib/spleen: Update to Spleen 2.1.0

Merge commit 'e364562a4012d6d9cb334795b97e929cfa2a5dff'
DeltaFile
+5,487-2,363contrib/spleen/spleen-32x64.bdf
+3,009-1,293contrib/spleen/spleen-16x32.bdf
+1,754-742contrib/spleen/spleen-8x16.bdf
+2,362-6contrib/spleen/spleen-12x24.bdf
+1,450-6contrib/spleen/spleen-6x12.bdf
+41-28contrib/spleen/README.md
+14,103-4,4383 files not shown
+14,139-4,4439 files

HardenedBSD/src e364562. spleen-32x64.bdf spleen-16x32.bdf

Vendor import of Spleen font 2.1.0
DeltaFile
+5,487-2,363spleen-32x64.bdf
+3,009-1,293spleen-16x32.bdf
+1,754-742spleen-8x16.bdf
+2,362-6spleen-12x24.bdf
+1,450-6spleen-6x12.bdf
+41-28README.md
+14,103-4,4383 files not shown
+14,139-4,4439 files

HardenedBSD/src eaede4e. .git-blame-ignore-revs

git-blame-ignore-revs: list rtld-elf reformatting

Sponsored by:   The FreeBSD Foundation
DeltaFile
+5-0.git-blame-ignore-revs
+5-01 files

HardenedBSD/src 78b5dadlibexec/rtld-elf/i386 reloc.c

rtld-elf/i386/reloc.c: apply clang-format

Discussed with: emaste, imp
Sponsored by:   The FreeBSD Foundation
Differential revision:  https://reviews.freebsd.org/D48509
DeltaFile
+176-171libexec/rtld-elf/i386/reloc.c
+176-1711 files

HardenedBSD/src 3a85aa6libexec/rtld-elf/amd64 reloc.c

rtld-elf/amd64/reloc.c: apply clang-format

Discussed with: emaste, imp
Sponsored by:   The FreeBSD Foundation
Differential revision:  https://reviews.freebsd.org/D48509
DeltaFile
+170-157libexec/rtld-elf/amd64/reloc.c
+170-1571 files

HardenedBSD/src e3035c5libexec/rtld-elf/amd64 reloc.c, libexec/rtld-elf/i386 reloc.c

rtld-elf/{amd64,i386}/reloc.c: remove unneeded #ifdef dbg

Discussed with: emaste, imp
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Differential revision:  https://reviews.freebsd.org/D48509
DeltaFile
+0-2libexec/rtld-elf/i386/reloc.c
+0-2libexec/rtld-elf/amd64/reloc.c
+0-42 files

HardenedBSD/src 986c96blibexec/rtld-elf map_object.c

rtld-elf/map_object.c: apply clang-format

Discussed with: emaste, imp
Sponsored by:   The FreeBSD Foundation
Differential revision:  https://reviews.freebsd.org/D48509
DeltaFile
+326-301libexec/rtld-elf/map_object.c
+326-3011 files

HardenedBSD/src bf3fbf7libexec/rtld-elf rtld.c

rtld obj_remap_relro(): unindent the loop body

Discussed with: emaste, imp
Sponsored by:   The FreeBSD Foundation
Differential revision:  https://reviews.freebsd.org/D48509
DeltaFile
+10-12libexec/rtld-elf/rtld.c
+10-121 files

HardenedBSD/src 7e2f383libexec/rtld-elf rtld.c

rtld-elf/rtld.c: apply clang-format

Discussed with: emaste, imp
Sponsored by:   The FreeBSD Foundation
Differential revision:  https://reviews.freebsd.org/D48509
DeltaFile
+2,847-2,775libexec/rtld-elf/rtld.c
+2,847-2,7751 files

HardenedBSD/src dd1d729libexec/rtld-elf rtld.c

rtld-elf/rtld.c: fix typo in comment

Discussed with: emaste, imp
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Differential revision:  https://reviews.freebsd.org/D48509
DeltaFile
+1-1libexec/rtld-elf/rtld.c
+1-11 files

HardenedBSD/src 2c0e00dbin/kill kill.1

kill.1: mention special PID 0

PR:      284158

(cherry picked from commit f5cf173de0dc62dbf47a8bbdcae28aac947d90a6)
DeltaFile
+3-0bin/kill/kill.1
+3-01 files

HardenedBSD/src fe74df3bin/kill kill.1

kill.1: mention special meaning of PGID as a PID

PR:      284158

(cherry picked from commit d6c2d4fe975c70975bdc6bec76d044408f6dcb8c)
DeltaFile
+3-0bin/kill/kill.1
+3-01 files

HardenedBSD/src e226851lib/libthr/thread thr_init.c

libpthread_init(): ensure curthread == NULL until set explicitly

(cherry picked from commit 676be27133fa3296f3d9083732d8837a3eaa5ea4)
DeltaFile
+2-0lib/libthr/thread/thr_init.c
+2-01 files

HardenedBSD/src d6a896clib/libthr/thread thr_mutex.c

pthread_mutex_trylock(): init libthr if needed

(cherry picked from commit 9718f18471f700b271eb898c764e02b7fcd3766f)
DeltaFile
+1-0lib/libthr/thread/thr_mutex.c
+1-01 files

HardenedBSD/src 1a085eelib/libthr/thread thr_create.c

pthread_create(): style

(cherry picked from commit 02703de8bcae3b45e6d96e8467d5fa512d62cc3d)
DeltaFile
+3-3lib/libthr/thread/thr_create.c
+3-31 files

HardenedBSD/src 0961e16lib/libthr/thread thr_list.c

libthr: use atomic_add_int() instead of atomic_fetchadd_int()

(cherry picked from commit 4804cb433dbec2555695dc2bf391f286f2172621)
DeltaFile
+5-5lib/libthr/thread/thr_list.c
+5-51 files

HardenedBSD/src 2050430lib/libthr/thread thr_sleepq.c thr_list.c

libthr: switch thread and sleepq memory allocator to crt from libc malloc

(cherry picked from commit 9a2ae72421cd75c741984f63b8c9ee89346a188d)
DeltaFile
+2-2lib/libthr/thread/thr_sleepq.c
+2-2lib/libthr/thread/thr_list.c
+4-42 files

HardenedBSD/src 0f1bf1csbin/umbctl umbctl.c umbctl.8, share/man/man4 umb.4

umb: Introduce the USB umb(4) network driver

This includes the port of a driver originally from OpenBSD, later
ported to NetBSD by the author:

* The umb(4) kernel driver
* The umbctl(8) companion tool

This driver supports USB network devices implementing the
Mobile Broadband Interface Model (MBIM), often found in modern
(internal) USB models for 4G/LTE mobile broadband access.

It is currently limited to IPv4.

umbctl has to be used to display or set MBIM cellular modem
interface parameters (4G/LTE).

Differential Revision:  https://reviews.freebsd.org/D48167
Approved by:    adrian, zlei

    [3 lines not shown]
DeltaFile
+2,930-0sys/dev/usb/net/if_umb.c
+727-0sys/dev/usb/net/mbim.h
+557-0sbin/umbctl/umbctl.c
+443-0sys/dev/usb/net/if_umbreg.h
+161-0sbin/umbctl/umbctl.8
+119-0share/man/man4/umb.4
+4,937-06 files not shown
+4,982-112 files

HardenedBSD/src e5f3620sys/sys sockio.h

sys: add MBM device ioctl() values

This is part of the upcoming USB umb(4) work.  It implements the control
ioctl(4)s that MBM devices will need to implement.

Differential Revision:  https://reviews.freebsd.org/D48167
Approved by:    adrian, zlei
Sponsored by:   FreeBSD Foundation
PR:             kern/263783
Submitted by:   Pierre Pronchery <khorben at defora.org>
DeltaFile
+4-0sys/sys/sockio.h
+4-01 files

HardenedBSD/src 86bfbafsys/net if_types.h

sys: add MBIM (mobile broadband interface module) interface type.

This is part of the upcoming USB umb(4) work.

Differential Revision:  https://reviews.freebsd.org/D48167
Approved by:    adrian, zlei
Sponsored by:   FreeBSD Foundation
PR:             kern/263783
Submitted by:   Pierre Pronchery <khorben at defora.org>
DeltaFile
+1-0sys/net/if_types.h
+1-01 files

HardenedBSD/src 99d5ee8sys/kern kern_ktrace.c

ktrace: Fix uninitialized memory disclosure

The sockaddr passed to ktrcapfail() may be smaller than
sizeof(struct sockaddr), and the trailing bytes in the sockaddr
structure will be uninitialized, whereupon they get copied out to
userspace.

PR:             283673
Reviewed by:    jfree, emaste
Reported by:    Yichen Chai <yichen.chai at gmail.com>
Reported by:    Zhuo Ying Jiang Li <zyj20 at cl.cam.ac.uk>
Fixes:          9bec84131215 ("ktrace: Record detailed ECAPMODE violations")
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D48499

(cherry picked from commit 5b86888bae651e54ccc0adde0ed897ec1c1e0d45)
DeltaFile
+9-2sys/kern/kern_ktrace.c
+9-21 files

HardenedBSD/src 709c189sys/fs/nfs nfs_commonsubs.c nfsproto.h

nfsd: Add support for the NFSv4.2 change_attr_type attribute

Richard Kojedzinszky reported an intermittent problem where
the Linux NFSv4.2 client would sometimes not see changes done
to a directory by another client, although the change attribute
for the directory had changed.

A test patch that added the change_attr_type attribute to the
server and always returned NFS4_CHANGE_TYPE_VERSION_COUNTER_NOPNFS
seems to have resolved the issue.  Somewhat oddly, the Linux
knfsd server does not support this attribute but does not
seem to exhibit the stale caching problem.

This patch uses the VFCF_FILEREVINC flag on a file system (UFS, ZFS)
to return NFS4_CHANGE_TYPE_VERSION_COUNTER_NOPNFS.  It also
returns NFS4_CHANGE_TYPE_TIME_METADATA if VFCF_FILEREVCT is set,
which may be useful for exported fuse file systems.

PR:     284186

    [3 lines not shown]
DeltaFile
+32-0sys/fs/nfs/nfs_commonsubs.c
+10-1sys/fs/nfs/nfsproto.h
+42-12 files

HardenedBSD/src d521362sys/netlink netlink_snl_generic.h

netlink: fix build

The commit checked in had a dependency on not yet reviewed changes.
Revert them, but the main gist of the commit is not reverted.

Fixes:  f2a4eed3e13b6aeb9ddeef580d3b931cf22a14e3
DeltaFile
+4-10sys/netlink/netlink_snl_generic.h
+4-101 files

HardenedBSD/src ddc7fd6sys/netlink netlink_snl.h

netlink: provide snl_clone() to create a secondary snl state

The function will clone an existing snl_state().  The clone points at the
same socket, but has a separate allocator.  Closing a clone frees the
memory, but doesn't close the socket.  Such clones are handy in a
multithreaded process that has a single socket with multiple writers and a
serialized reader.  It can be easily extended to support multiple readers,
too, but now there is no use.

Reviewed by:            melifaro
Differential Revision:  https://reviews.freebsd.org/D48568
DeltaFile
+16-7sys/netlink/netlink_snl.h
+16-71 files

HardenedBSD/src dae4eb6lib/libsecureboot vets.c Makefile.inc, lib/libsecureboot/openpgp opgp_sig.c

libsecureboot add sha384 and sha512 for OpenPGP

gpg supports SHA384, SHA512 as well as SHA256 so allow for them.

Tweak Makefile.inc so we can build libsecureboot with only OpenPGP
trust anchors.

Reviewed by: imp
Differential Revision:  https://reviews.freebsd.org/D48546
DeltaFile
+18-12lib/libsecureboot/vets.c
+10-0lib/libsecureboot/openpgp/opgp_sig.c
+5-1lib/libsecureboot/Makefile.inc
+33-133 files

HardenedBSD/src f2a4eedsys/netlink netlink_snl_generic.h, tests/sys/netlink test_snl_generic.c

netlink: underscore snl_get_genl_family_info() to discourage its use

This function uses already supposedly opaque struct _getfamily_attrs as
the argument and it fills it with pointers to volatile memory, which makes
it is unsafe for general use.  While here also underscore structures that
hang off the struct _getfamily_attrs.

Small programs like powerd(8) and RPC daemons are converted to use
snl_get_genl_mcast_group() and/or snl_get_genl_family().  The genl(1)
utility was fixed not to mix its own parsers with parsers declared in
netlink_snl_generic.h.

Reviewed by:            melifaro
Differential Revision:  https://reviews.freebsd.org/D48480
DeltaFile
+23-13sys/netlink/netlink_snl_generic.h
+1-1tests/sys/netlink/test_snl_generic.c
+24-142 files

HardenedBSD/src fb63082sys/netlink netlink_snl.h

netlink: provide snl(3) API for variable length raw data attribute

Rename supposedly internal _snl_reserve_msg_attr() into an official
snl_reserve_msg_attr_raw(), that would return pointer to a struct
nlattr followed by allocated memory.  Adjust the snl_reserve_msg_attr()
macro to work on top of that function.

Reviewed by:            melifaro
Differential Revision:  https://reviews.freebsd.org/D48311
DeltaFile
+8-6sys/netlink/netlink_snl.h
+8-61 files

HardenedBSD/src 127b443sys/geom/vinum geom_vinum_events.c

gvinum: Emit deprecation notice upon drive tasting

Reviewed by:    phk, jhb
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38607
DeltaFile
+9-0sys/geom/vinum/geom_vinum_events.c
+9-01 files

HardenedBSD/src 3433daausr.bin/vtfontcvt vtfontcvt.c

vtfontcvt: Improve error message for unsupported DWIDTH

vtfontcvt requires that all glyphs are 1x or 2x a common width,
reporting for example "bitmap with unsupported DWIDTH 27 0 on line xxx"
if the font is expected to be 32 pixels wide.

Add the expected / permitted values to the error message to make the
issue more clear - for the same example,
"bitmap with unsupported DWIDTH 27 0 (not 32 or 64)".

Reviewed by:    ziaee
Sponsored by:   The FreeBSD Foundation
DeltaFile
+2-2usr.bin/vtfontcvt/vtfontcvt.c
+2-21 files