GhostBSD/ghostbsd b026f83contrib/libcbor/doc/source requirements.txt

Merge pull request #317 from ghostbsd/dependabot/pip/contrib/libcbor/doc/source/jinja2-3.1.3

build(deps): bump jinja2 from 3.0.3 to 3.1.3 in /contrib/libcbor/doc/source
DeltaFile
+1-1contrib/libcbor/doc/source/requirements.txt
+1-11 files

GhostBSD/ghostbsd 1effe95contrib/libcbor/doc/source requirements.txt

build(deps): bump jinja2 in /contrib/libcbor/doc/source

Bumps [jinja2](https://github.com/pallets/jinja) from 3.0.3 to 3.1.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.0.3...3.1.3)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support at github.com>
DeltaFile
+1-1contrib/libcbor/doc/source/requirements.txt
+1-11 files

GhostBSD/ghostbsd 43eb4c7contrib/libcbor/doc/source requirements.txt

Merge pull request #316 from ghostbsd/dependabot/pip/contrib/libcbor/doc/source/urllib3-1.26.18

build(deps): bump urllib3 from 1.26.9 to 1.26.18 in /contrib/libcbor/doc/source
DeltaFile
+1-1contrib/libcbor/doc/source/requirements.txt
+1-11 files

GhostBSD/ghostbsd ec304c0contrib/libcbor/doc/source requirements.txt

build(deps): bump urllib3 in /contrib/libcbor/doc/source

Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.9 to 1.26.18.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.9...1.26.18)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support at github.com>
DeltaFile
+1-1contrib/libcbor/doc/source/requirements.txt
+1-11 files

GhostBSD/ghostbsd 201b885sys/dev/usb usbdevs

Fixed ./usbdevs.h:3510:1: error: version control conflict marker

in file
<<<<<<< HEAD
DeltaFile
+0-4sys/dev/usb/usbdevs
+0-41 files

GhostBSD/ghostbsd 3e734e9contrib/libevent ltmain.sh configure, contrib/libevent/build-aux ltmain.sh

Merge remote-tracking branch 'freebsd/stable/14' into stable/14
DeltaFile
+11,369-0contrib/libevent/build-aux/ltmain.sh
+0-11,147contrib/libevent/ltmain.sh
+4,144-2,341contrib/sqlite3/sqlite3.c
+2,733-365contrib/libevent/configure
+1,114-917contrib/libevent/event_rpcgen.py
+1,184-807sys/arm64/rockchip/clk/rk3568_cru.c
+20,544-15,5772,469 files not shown
+79,353-54,8432,475 files

GhostBSD/ghostbsd e615bcdusr.sbin/mountd mountd.c

mountd: Add support for spaces in exported directories

The previous code would correctly parse strings including quotation
marks (") or backslash (/), but the tests when creating the export
includes them in the final string. This prevents exporting paths
with embedded spaces, for example "/exports/with space". Trying
results in log lines resembling:

mountd[1337]: bad exports list line '/exports/with\ space':
    /exports/with\ space: lstat() failed: No such file or directory.

Turns out that when creating its exports list, zfs escapes strings
in a format compatible with vis(3). Since I expect that zfs sharenfs
is the dominating use case for generating an exports list, use
strunvis(3) to parse the export path. The result is lines like the
following allowing spaces:

/exports/with\040space -network 192.168.0 -mask 255.255.255.0


    [3 lines not shown]
DeltaFile
+23-9usr.sbin/mountd/mountd.c
+23-91 files

GhostBSD/ghostbsd c6e072flib/libc/gen memfd_create.c

memfd_create: don't allocate heap memory

Rather than calling calloc() to allocate space for a page size array to
pass to getpagesizes(), just follow the getpagesizes() implementation
and allocate MAXPAGESIZES elements on the stack.  This avoids the need
for the allocation.

While this does mean that a new libc is required to take advantage of a
new huge page size, that was already true due to getpagesizes() using a
static buffer of MAXPAGESIZES elements.

Reviewed by:    kevans, imp, emaste
Sponsored by:   DARPA
Differential Revision:  https://reviews.freebsd.org/D42710

(cherry picked from commit c96772227b7dfcaf4eec4d07acb5c916643aca3a)
DeltaFile
+3-13lib/libc/gen/memfd_create.c
+3-131 files

GhostBSD/ghostbsd 89ebe0clib/libc/gen memfd_create.c Symbol.map, lib/libc/sys shm_open.c Symbol.map

memfd_create: move implementation to libc/gen

Due to memfd_create(3)'s construction of a path to pass to shm_open2(2),
it has a much larger than typical dependency footprint for a system
call wrapper (the list currently includes calloc, memset, sprintf, and
strlen).  As such, split it off into its own file under libc/gen to
lighten libc/sys's dependency list.

Reviewed by:    kevans, imp, emaste
Sponsored by:   DARPA
Differential Revision:  https://reviews.freebsd.org/D42709

(cherry picked from commit c3207e2d2554c8e36f9cf5950f8cd52a19fedfd5)
DeltaFile
+131-0lib/libc/gen/memfd_create.c
+0-93lib/libc/sys/shm_open.c
+1-0lib/libc/gen/Symbol.map
+0-1lib/libc/sys/Symbol.map
+1-0lib/libc/gen/Makefile.inc
+133-945 files

GhostBSD/ghostbsd f6d8ea8tests/sys/netpfil/pf sctp.sh

pf tests: fix typos in the abort_v6 test case head / cleanup function name

MFC after:      1 week

(cherry picked from commit 8fab83d2c5c5e801105dbf25c28252fc97935b00)
DeltaFile
+2-2tests/sys/netpfil/pf/sctp.sh
+2-21 files

GhostBSD/ghostbsd 504e85asys/dev/mpr mpr.c, sys/dev/mps mps.c

mpr, mps:  Establish busdma boundaries for memory pools

Most all of the memory used by the cards in the mpr(4) and mps(4)
drivers is required, according to the specs and Broadcom developers,
to be within a 4GB segment of memory.

This includes:

System Request Message Frames pool
Reply Free Queues pool
ReplyDescriptorPost Queues pool
Chain Segments pool
Sense Buffers pool
SystemReply message pool

We got a bug report from Dwight Engen, who ran into data corruption
in the BAE port of FreeBSD:

> We have a port of the FreeBSD mpr driver to our kernel and recently

    [53 lines not shown]
DeltaFile
+4-2sys/dev/mpr/mpr.c
+4-2sys/dev/mps/mps.c
+8-42 files

GhostBSD/ghostbsd e373880lib/libc/posix1e acl_to_text_nfs4.c

libc: correct some memory leaks in acl_to_text(3) and acl_to_text_np(3)

PR:     275232

(cherry picked from commit 7aa375dcc61e48cc56da45c9d5a11371693c8043)
DeltaFile
+3-0lib/libc/posix1e/acl_to_text_nfs4.c
+3-01 files

GhostBSD/ghostbsd ddb82f2sys/ufs/ffs ffs_vnops.c

ufs: do not leave around empty buffers shadowing disk content

(cherry picked from commit ca39f23347e1416a28dde13279bfe5841ad9a746)
DeltaFile
+9-2sys/ufs/ffs/ffs_vnops.c
+9-21 files

GhostBSD/ghostbsd 2ad07dcsys/dev/qat/qat_api/include/lac cpa_cy_sym.h cpa_cy_sym_dp.h

qat: Fix two typos in source code comments

- s/parmeters/parameters/

(cherry picked from commit ada4cd3f7710d9759e391e84ad21b7763062bdbc)
DeltaFile
+1-1sys/dev/qat/qat_api/include/lac/cpa_cy_sym.h
+1-1sys/dev/qat/qat_api/include/lac/cpa_cy_sym_dp.h
+2-22 files

GhostBSD/ghostbsd 36d6a45sys/dev/ichiic ig4_pci.c

ig4: Add PCI IDs for Intel Ice Lake I2C controller.

PR:             275115
Tested by:      Sam <sam3423.yntmr_AT_slmail_DOT_me>
DeltaFile
+12-0sys/dev/ichiic/ig4_pci.c
+12-01 files

GhostBSD/ghostbsd 399961esys/net if_tuntap.c

if_tun: check device name

PR:     266999

(cherry picked from commit 0365e5fc905b425313a0a2d89f0d8e2566924df2)
DeltaFile
+1-1sys/net/if_tuntap.c
+1-11 files

GhostBSD/ghostbsd 673d1eacrypto/openssh packet.c kex.c

Implement "strict key exchange" in ssh and sshd.

This adds a protocol extension to improve the integrity of the SSH
transport protocol, particular in and around the initial key exchange
(KEX) phase.

Full details of the extension are in the PROTOCOL file.

OpenBSD-Commit-ID: 2a66ac962f0a630d7945fee54004ed9e9c439f14

Approved by:    so (implicit)
Obtained from:  https://anongit.mindrot.org/openssh.git/patch/?id=1edb00c58f8a6875fad6a497aa2bacf37f9e6cd5
Security:       CVE-2023-48795

(cherry picked from commit 92f58c69a14c0afe910145f177c0e8aeaf9c7da4)
DeltaFile
+59-44crypto/openssh/packet.c
+55-27crypto/openssh/kex.c
+27-1crypto/openssh/PROTOCOL
+2-8crypto/openssh/sshconnect2.c
+1-2crypto/openssh/packet.h
+2-1crypto/openssh/kex.h
+146-836 files

GhostBSD/ghostbsd a9184e9sys/kern kern_kthread.c

kthread: Set *newtdp earlier in kthread_add1()

syzbot reported a single boot-time crash in g_event_procbody(), a page
fault when dereferencing g_event_td.  g_event_td is initialized by the
kproc_kthread_add() call which creates the GEOM event thread:

  kproc_kthread_add(g_event_procbody, NULL, &g_proc, &g_event_td,
      RFHIGHPID, 0, "geom", "g_event");

I believe that the caller of kproc_kthread_add() was preempted after
adding the new thread to the scheduler, and before setting *newtdp,
which is equal to g_event_td.  Thus, since the first action of the GEOM
event thread is to lock itself, it ended up dereferencing a NULL
pointer.

Fix the problem simply by initializing *newtdp earlier.  I see no harm
in that, and it matches kproc_create1().  The scheduler provides
sufficient synchronization to ensure that the store is visible to the
new thread, wherever it happens to run.

    [7 lines not shown]
DeltaFile
+7-2sys/kern/kern_kthread.c
+7-21 files

GhostBSD/ghostbsd f5ae760sys/arm/arm vfp.c

arm: Disable the VFP during boot

The VFP code expects the kernel to boot with VFP disabled, but some
boards will boot with it enabled.  Make sure that vfp_init() disables
the VFP on each CPU during boot.

PR:             273752
Reviewed by:    andrew
Diagnosed by:   Thomas Skibo <thomas-bsd at skibo.net>
MFC after:      1 week

(cherry picked from commit ce2f34ade8b787b068085fa8a8ddd295b06c2737)
DeltaFile
+2-0sys/arm/arm/vfp.c
+2-01 files

GhostBSD/ghostbsd 42d1aa8sys/arm/arm vfp.c

arm: Handle VFP exceptions from the kernel

vfp_bounce() is called when handling an undefined instruction exception,
to see if we need to enable the VFP.  Previously it would
unconditionally panic if the exception came from the kernel, which was
simply wrong, and it did not permit lazy initialization of VFP state in
the kernel.  However, this functionality can be useful and is supported
by arm's fpu_kern_enter() implementation.  Thus, relax assertions and
consume the exception if the thread was in an FPU section.

Based on a patch from Stormshield.

Reviewed by:    andrew
MFC after:      2 weeks
Sponsored by:   Klara, Inc.
Sponsored by:   Stormshield
Differential Revision:  https://reviews.freebsd.org/D42971

(cherry picked from commit 03a07de0d5ee7d58069152070c42d55f7ec32b7c)
DeltaFile
+12-7sys/arm/arm/vfp.c
+12-71 files

GhostBSD/ghostbsd bc394adsys/arm/arm undefined.c

arm: Fix handling of undefined instructions in kernel mode

Only panic if no undefined instruction handler matched the exception.
This can arise in practice if the VFP is enabled lazily.

While here, fix the panic string to not include a newline.

Reviewed by:    andrew
Obtained from:  Stormshield
Sponsored by:   Klara, Inc.
Sponsored by:   Stormshield
Differential Revision:  https://reviews.freebsd.org/D42970

(cherry picked from commit ecc2e6deae71b69a30bf3b7e3354aba002a37d69)
DeltaFile
+4-4sys/arm/arm/undefined.c
+4-41 files

GhostBSD/ghostbsd 1126dcdsys/arm/arm vfp.c

arm: Add fpu_kern_alloc_ctx()

This enables the use of some out-of-tree crypto libraries on arm.
No functional change intended, there are no callers of this function in
the tree currently.

Reviewed by:    andrew
MFC after:      1 week
Sponsored by:   Klara, Inc.
Sponsored by:   Stormshield
Differential Revision:  https://reviews.freebsd.org/D42969

(cherry picked from commit a6a481eaa2e0f02e24b874f1a08bb494a68972c0)
DeltaFile
+21-3sys/arm/arm/vfp.c
+21-31 files

GhostBSD/ghostbsd c976896sys/arm/arm vfp.c, sys/conf files.arm

arm: Compile vfp.c conditionally rather than using an ifdef

No functional change intended.

MFC after:      1 week

(cherry picked from commit 96465c789a5ff2619c5d49305517b35db9754ffb)
DeltaFile
+0-4sys/arm/arm/vfp.c
+1-1sys/conf/files.arm
+1-52 files

GhostBSD/ghostbsd 5bb8278sys/fs/nfsclient nfs_clrpcops.c

nfscl: Fix comment for commit 6aded1e6b2e5

Commit 6aded1e6b2e5 fixed a rare case when handling an NFSv4
Rename reply when delegations are in use.  This patch fixes the
associated comment.

(cherry picked from commit 0a958aa16fed1978879d64e3b225f1d232cc5a98)
DeltaFile
+1-1sys/fs/nfsclient/nfs_clrpcops.c
+1-11 files

GhostBSD/ghostbsd 71ccbf8sys/fs/nfsclient nfs_clrpcops.c

nfscl: Fix processing of a rare Rename reply case

When delegations are enabled (they are not by default in
the FreeBSD NFSv4 server), rename will check for and return
delegations.  If the second of these DelegReturn operations
were to fail (they rarely do), then the code would not retry
the rename with returning delegations, as it is intended to do.

The patch fixes the problem, since the DelegReturn reply status
is the second iteration of the loop and not the first iteration.

As noted, this bug would have rarely manifested a problem, since
DelegReturn operations do not normally fail.

(cherry picked from commit 6aded1e6b2e5549120031032e1c7f8b002882327)
DeltaFile
+1-1sys/fs/nfsclient/nfs_clrpcops.c
+1-11 files

GhostBSD/ghostbsd 9c452f5usr.sbin/iostat iostat.8

iostat.8: Better wording for some use cases

The iostat(8) manual page should be more specific when using
options. Also extented the BUGS section.

PR:     153012
Reviewed by:    bcr
Differential Revision:  https://reviews.freebsd.org/D42633

(cherry picked from commit 502e8f44fcc18bfc6dadca56801d66cbce4c07ec)
DeltaFile
+46-18usr.sbin/iostat/iostat.8
+46-181 files

GhostBSD/ghostbsd 636bf71sys/ufs/ffs ffs_softdep.c ffs_alloc.c, sys/ufs/ufs ufs_vnops.c inode.h

Increase UFS/FFS maximum link count from 32767 to 65530.

Differential Revision: https://reviews.freebsd.org/D42767

(cherry picked from commit 35a301555bff2ac27a727c10641b7efb3f162988)
DeltaFile
+16-16sys/ufs/ufs/ufs_vnops.c
+8-2sys/ufs/ufs/inode.h
+4-4sys/ufs/ufs/ufs_lookup.c
+3-3sys/ufs/ufs/dinode.h
+2-2sys/ufs/ffs/ffs_softdep.c
+1-1sys/ufs/ffs/ffs_alloc.c
+34-286 files

GhostBSD/ghostbsd 79ca908lib/libc/stdlib strfmon.c

strfmon.c: Use the restrict keyword directly

(cherry picked from commit 86e2bcbf47fb4c8dbd799f2f21c0ed338b2e8f1b)
DeltaFile
+3-3lib/libc/stdlib/strfmon.c
+3-31 files

GhostBSD/ghostbsd ea99922lib/libc/stdlib strfmon.c

strfmon: Silence scan-build warning

(cherry picked from commit 6abee52e0d79f68fd725de748d7027ca8eef2294)
DeltaFile
+0-1lib/libc/stdlib/strfmon.c
+0-11 files

GhostBSD/ghostbsd 2f427cblib/libc/stdlib strfmon.c

strfmon: style fixes

(cherry picked from commit 56a0d5444d6f39302f3476b61c1b81ed39abe589)
DeltaFile
+99-98lib/libc/stdlib/strfmon.c
+99-981 files