DragonFlyBSD/src 873069b — gnu/usr.bin Makefile.cco, gnu/usr.bin/cc120 Makefile.langs

cc80,cc120: Clean up IS_PRIMARY determination
DeltaFile
+4-5gnu/usr.bin/cc80/support-libs/liblto_plugin/Makefile
+3-1gnu/usr.bin/Makefile.cco
+0-2gnu/usr.bin/cc80/Makefile.langs
+0-2gnu/usr.bin/cc120/Makefile.langs
+1-1gnu/usr.bin/cc120/support-libs/liblto_plugin/Makefile
+8-115 files

DragonFlyBSD/src ee6780c — libexec/customcc cc.sh

customcc: Save a 'basename' command invocation
DeltaFile
+1-1libexec/customcc/cc.sh
+1-11 files

DragonFlyBSD/src f832cd7 — . Makefile.inc1, gnu/lib Makefile

Switch the default compiler from gcc80 to gcc120
DeltaFile
+15-16Makefile.inc1
+8-5libexec/customcc/cc.sh
+6-6gnu/usr.bin/Makefile
+3-5gnu/usr.bin/Makefile.cco
+4-4gnu/lib/Makefile
+3-3share/man/man5/make.conf.5
+39-394 files not shown
+44-4410 files

DragonFlyBSD/src cac1cf0 — sys/dev/drm linux_dma-buf.c

drm: Improve dmabuf_close() and dma_buf_fd()

* Reset fp fields before releasing the dmabuf.
* Support O_CLOEXEC in dma_buf_fd().

Obtained-from: https://apollo.backplane.com/DFlyMisc/drm98.patch
Suggested-by: servik
DeltaFile
+6-9sys/dev/drm/linux_dma-buf.c
+6-91 files

DragonFlyBSD/src 293eef3 — etc Makefile

etc/Makefile: Remove obsolete "usr/share/initrd/sbin"
DeltaFile
+1-1etc/Makefile
+1-11 files

DragonFlyBSD/src 4585723 — share/mk bsd.sys.mk

bsd.sys.mk: Clean up a bit

* Remove the obsolete check for "_gccver >= 49" because gcc47 has been
  removed.
* Remove the duplicate "CWARNFLAGS += -Werror" inside WFORMAT condition.
  This is a minor behavior change, but I think it makes more sense for
  FORMAT_AUDIT to control the -Wformat warnings without adding -Werror.
DeltaFile
+1-8share/mk/bsd.sys.mk
+1-81 files

DragonFlyBSD/src 7a8fdfb — share/mk bsd.sys.mk

bsd.sys.mk: Enable -Werror for gcc120 (GCC 12.5)
DeltaFile
+2-2share/mk/bsd.sys.mk
+2-21 files

DragonFlyBSD/src c8eb5f6 — contrib/tre README.DRAGONFLY, contrib/tre/lib tre-match-backtrack.c

contrib/tre: Fix a use-after-free bug and a memory leak bug

The 'tags', 'pmatch' and 'states_seen' are interior pointers into a
single 'buf' allocation, so calling xfree() on each of them was a
use-after-free bug.

While there, there was another memory leak bug in handling 'buf'
allocation failure, where the previously allocated 'mem' was not freed
before return.

Fix both bugs by using 'goto error_exit' for proper memory free.

The use-after-free bug was caught by the '-Wuse-after-free' warnings
from GCC 12.5, e.g.,
```
In file included from /usr/src/lib/libc/../../contrib/tre/lib/tre-match-backtrack.c:78:
/usr/src/lib/libc/../../contrib/tre/lib/tre-match-backtrack.c: In function 'tre_tnfa_run_backtrack':
/usr/src/lib/libc/../../contrib/tre/lib/xmalloc.h:69:20: warning: pointer 'tmp_buf' used after 'free' [-Wuse-after-free]
   69 | #define xfree(ptr) free(ptr)

    [19 lines not shown]
DeltaFile
+8-17contrib/tre/lib/tre-match-backtrack.c
+3-0contrib/tre/README.DRAGONFLY
+11-172 files

DragonFlyBSD/src b492328 — usr.bin/pctrack pctrack.c

pctrack(8): explain unresolved tracking symbols

Add the DEBUG_PCTRACK hint for unresolved tracking entries. Keep table
errors and missing ncpus separate, and include the library error.

Bug: https://bugs.dragonflybsd.org/issues/3347
Bug: https://bugs.dragonflybsd.org/issues/3444
DeltaFile
+8-2usr.bin/pctrack/pctrack.c
+8-21 files

DragonFlyBSD/src 919846a — sbin/ccdconfig ccdconfig.c

ccdconfig(8): report kvm errors before closing the handle

Read the error while the handle is still valid.

Bug: https://bugs.dragonflybsd.org/issues/3444
DeltaFile
+2-2sbin/ccdconfig/ccdconfig.c
+2-21 files

DragonFlyBSD/src 9f9d82b — usr.bin/ipcs ipcs.c, usr.bin/netstat if.c main.c

Check required kvm(3) symbols before reading

Check required symbols in dconschat, ipcs, netstat and legacy pstat TTY
paths. Keep optional IPC subsystems usable. Check IPC reads and
allocations before using their data.

Use buffered IPC errors and report short reads explicitly instead of
relying on an error buffer that may not describe the incomplete read.

Bug: https://bugs.dragonflybsd.org/issues/3444
DeltaFile
+51-16usr.bin/ipcs/ipcs.c
+12-2usr.bin/netstat/main.c
+4-0usr.sbin/pstat/pstat.c
+4-0usr.bin/netstat/if.c
+1-1usr.sbin/dconschat/dconschat.c
+72-195 files

DragonFlyBSD/src 0458d53 — lib/libkvm kvm_file.c kvm_nlist.3

libkvm(3): clear failed lookups and report lookup errors

Clear requested symbol results before lookup. Keep the live failure
count and continue looking up later entries. Report lookup errors
without relying on the last errno, and preserve table errors in internal
callers.

Bug: https://bugs.dragonflybsd.org/issues/3444
DeltaFile
+35-14lib/libkvm/kvm.c
+14-6lib/libkvm/kvm_proc.c
+12-5lib/libkvm/kvm_getloadavg.c
+13-2lib/libkvm/kvm_nlist.3
+6-3lib/libkvm/kvm_file.c
+80-305 files

DragonFlyBSD/src d573aa0 — sys/kern subr_diskslice.c

kern: avoid reading a disk label while dumping

Checking an unlabelled dump slice can trigger a disk-label read through
normal buffered I/O. During a crash dump, that read can wait indefinitely
before the dump writer reaches its polled I/O path.

Skip the label read while dumping and use the slice bounds already held
in memory, keeping the normal label probe outside the dump path.

Bug: https://bugs.dragonflybsd.org/issues/3441
DeltaFile
+3-1sys/kern/subr_diskslice.c
+3-11 files

DragonFlyBSD/src 7cc2aa3 — sys/netinet6 nd6.c

nd6: keep foreign-CPU neighbors off the timer and purge list

Route requests create neighbor entries on each network CPU, but timers
and purge run on CPU 0. Purging a foreign-CPU entry deletes the matching
local route and can follow its freed neighbor entry. Link only CPU 0
entries into the list and unlink only linked entries; keep other CPUs
route-local neighbor data.

Bug: https://bugs.dragonflybsd.org/issues/3439
DeltaFile
+11-7sys/netinet6/nd6.c
+11-71 files

DragonFlyBSD/src 9524753 — share/man/man5 pf.conf.5

pf.conf.5: describe IPv6 fragment filtering without reassembly

IPv6 fragments are filtered as the Fragment header protocol, not blocked
unconditionally. State that port/type rules cannot pass them and that a
broad pass rule does not enforce those restrictions.

Bug: https://bugs.dragonflybsd.org/issues/3438
DeltaFile
+10-3share/man/man5/pf.conf.5
+10-31 files

DragonFlyBSD/src cebb74e — sys/net/pf pf_norm.c

pf: fix IPv6 fragment length checks

ip6_plen excludes the IPv6 header, but off includes it. Check packet and
fragment-header bounds, use matching length units, and reject misaligned
non-final fragments. Include pre-fragment extension headers in the
reassembled payload limit.

Bug: https://bugs.dragonflybsd.org/issues/3437
DeltaFile
+8-2sys/net/pf/pf_norm.c
+8-21 files

DragonFlyBSD/src 3300033 — usr.sbin/ndp ndp.c

ndp(8): avoid deleting covering routes and report socket errors

RTM_GET can return a covering route for an absent neighbor. Require the
requested address and an NDP route before deletion. Return failure for
routing-socket write, read and reply errors, and pass deletion failure
to the exit status.

Bug: https://bugs.dragonflybsd.org/issues/3436
DeltaFile
+46-29usr.sbin/ndp/ndp.c
+46-291 files

DragonFlyBSD/src f61fa2f — lib/libssh Makefile, usr.bin/ssh Makefile

libssh: Enable OpenBSD compat for <sys/queue.h>

This removes the two TAILQ_FOREACH_SAFE redefinition in libssh and
usr.bin/ssh.
DeltaFile
+4-3lib/libssh/Makefile
+0-2usr.bin/ssh/Makefile
+4-52 files

DragonFlyBSD/src f82e06c — lib/libssh Makefile

libssh: Silence a -Wpointer-compare warning in misc.c

Fix the building failure.

Meanwhile, raise WARNS to 3.
DeltaFile
+2-2lib/libssh/Makefile
+2-21 files

DragonFlyBSD/src 7d51b22 — initrd/rescue Makefile

initrd: Add sftp(1) program to rescue
DeltaFile
+2-0initrd/rescue/Makefile
+2-01 files

DragonFlyBSD/src 6152f89 — lib/libssh config.h.auto config.h, lib/libssh/openbsd-compat sys-queue.h blowfish.c

openssh: Update and refactor makefiles for 10.6p1 import

Highlights:
* New components: /usr/libexec/ssh-sk-helper and /usr/libexec/sshd-auth.
* Enabled the security key helper for the later FIDO/U2F support.
  NOTE: That requires to import the libfido2 and libcbor libraries.
* Removed libprivate_ssh library; it has been refactored as an internal
  library.

Major changes:
* Refactor lib/libssh to make it an internal library, rather than
  previously as a private library.
* Sync the libssh.a source list with the vendor's makefile.
* The auto-generated config.h is copied as lib/libssh/config.h.auto, and
  the final config.h is created with the makefile to apply our
  corrections.
* Add the lib/libssh/Makefile.common to reduce duplicate code among all
  the OpenSSH components.
DeltaFile
+0-2,118lib/libssh/config.h
+2,106-0lib/libssh/config.h.auto
+0-1,079lib/libssh/openbsd-compat/glob.c
+0-755lib/libssh/openbsd-compat/sys-tree.h
+0-693lib/libssh/openbsd-compat/blowfish.c
+0-628lib/libssh/openbsd-compat/sys-queue.h
+2,106-5,27340 files not shown
+2,456-8,65346 files

DragonFlyBSD/src ec6ce3e — crypto/openssh README.DRAGONFLY README.DELETED

crypto/openssh: Update our READMEs

Rewrite the upgrade notes in README.DRAGONFLY.  Also, we don't need any
local modifications.
DeltaFile
+158-596crypto/openssh/README.DELETED
+71-39crypto/openssh/README.DRAGONFLY
+229-6352 files

DragonFlyBSD/src 3e824cd — crypto/openssh sntrup761.c configure.ac

Merge branch 'vendor/OPENSSH'

Upgrade OpenSSH from 9.8p1 to 10.6p1.

The last update didn't use the vendor branch, so the vendor branch
upgraded from 9.1p1 to 10.6p1, but the real update is 9.8p1 to 10.6p1.
DeltaFile
+0-27,691crypto/openssh/configure
+27,332-0crypto/openssh/libcrux_internal.h
+0-16,255crypto/openssh/config.log
+4,609-1,960crypto/openssh/ed25519.c
+0-5,761crypto/openssh/configure.ac
+1,916-1,038crypto/openssh/sntrup761.c
+33,857-52,705273 files not shown
+61,620-74,187279 files

DragonFlyBSD/src d8e1400 — share/mk bsd.crunchgen.mk

bsd.crunchgen.mk: Make "depend" for internal libraries first

A program may depend on the output (e.g., a generated header) of
"make depend" of its internal libraries, so make "depend" for the
internal libraries first.

This is required by the forthcoming update to the libssh internal
library.
DeltaFile
+8-1share/mk/bsd.crunchgen.mk
+8-11 files

DragonFlyBSD/src e8780ae — crypto/openssh misc.c ssh.1

vendor/OPENSSH: Upgrade from 10.5p1 to 10.6p1
DeltaFile
+4,598-1,983crypto/openssh/ed25519.c
+191-65crypto/openssh/misc-agent.c
+121-64crypto/openssh/channels.c
+148-14crypto/openssh/servconf.c
+74-74crypto/openssh/ssh.1
+125-4crypto/openssh/misc.c
+5,257-2,20468 files not shown
+6,242-2,76774 files

DragonFlyBSD/src d209117 — crypto/openssh sshd.c ssh-pkcs11.c

vendor/OPENSSH: Upgrade from 9.1p1 to 10.5p1
DeltaFile
+27,332-0crypto/openssh/libcrux_internal.h
+1,916-1,038crypto/openssh/sntrup761.c
+2,079-737crypto/openssh/servconf.c
+789-1,955crypto/openssh/sshkey.c
+2,311-0crypto/openssh/ssh-pkcs11.c
+782-1,331crypto/openssh/sshd.c
+35,209-5,061269 files not shown
+74,159-17,860275 files

DragonFlyBSD/src ff4b76a — sys/sys diskmbr.h

<sys/diskmbr.h>: Add exFAT to 0x7 partition type
DeltaFile
+1-1sys/sys/diskmbr.h
+1-11 files

DragonFlyBSD/src a6e50c3 — sbin/ifconfig ifwg.c

ifconfig(8): Fix false -Wuse-after-free warnings in ifwg.c

Tweak the code to fix the false -Wuse-after-free warnings in
wg_data_grow() from GCC 12.5:

```
/usr/src/sbin/ifconfig/ifwg.c: In function 'wg_data_grow':
/usr/src/sbin/ifconfig/ifwg.c:79:20: warning: pointer may be used after 'realloc' [-Wuse-after-free]
   79 |         aip_offset = (char *)wg_aip - (char *)wg_interface;
      |         ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sbin/ifconfig/ifwg.c:82:33: note: call to 'realloc' here
   82 |         wg_data.wgd_interface = realloc(wg_interface, wg_data.wgd_size);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sbin/ifconfig/ifwg.c:78:21: warning: pointer may be used after 'realloc' [-Wuse-after-free]
   78 |         peer_offset = (char *)wg_peer - (char *)wg_interface;
      |         ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sbin/ifconfig/ifwg.c:82:33: note: call to 'realloc' here
   82 |         wg_data.wgd_interface = realloc(wg_interface, wg_data.wgd_size);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    [3 lines not shown]
DeltaFile
+9-5sbin/ifconfig/ifwg.c
+9-51 files

DragonFlyBSD/src dea249a — bin/csh/csh Makefile

csh(1): Silence -Wuse-after-free warnings from GCC 12.5

GCC 12.5 generates the following -Wuse-after-free warnings, which are
all false positives, so silence them for this vendor source.  I'd like
to submit the code fixes to upstream and then do a vendor update.

```
/usr/src/bin/csh/csh/../../../contrib/tcsh-6/sh.func.c: In function 'iconv_catgets':
/usr/src/bin/csh/csh/../../../contrib/tcsh-6/sh.func.c:2600:34: warning: pointer may be used after 'realloc' [-Wuse-after-free]
 2600 |                 dest = p + (dest - buf);
      |                            ~~~~~~^~~~~~
In file included from /usr/src/bin/csh/csh/../../../contrib/tcsh-6/sh.func.c:32:
/usr/src/bin/csh/csh/../../../contrib/tcsh-6/sh.h:499:25: note: call to 'realloc' here
  499 | # define xrealloc(p, i) realloc(p, i)
      |                         ^~~~~~~~~~~~~
/usr/src/bin/csh/csh/../../../contrib/tcsh-6/sh.func.c:2597:26: note: in expansion of macro 'xrealloc'
 2597 |                 if ((p = xrealloc(buf, buf_size * 2)) == NULL)
      |                          ^~~~~~~~
/usr/src/bin/csh/csh/../../../contrib/tcsh-6/sh.proc.c: In function 'morecommand':

    [22 lines not shown]
DeltaFile
+8-0bin/csh/csh/Makefile
+8-01 files

DragonFlyBSD/src e42f05a — contrib/gcc-12/gcc expmed.cc

contrib/gcc-12: Silence -Wmaybe-uninitialized warning

GCC 12.5 would generate the following -Wmaybe-uninitialized warning for
expmed.cc, which defines the #pragma to force this diagnostic to be a
warning, so the GCC's own bootstrap that uses -Werror could succeed.
However, this #pragma makes this warning can't be silenced by a
-Wno-maybe-uninitialized option on the command line. So just modify the
source file to ignore it.

```
/usr/src/gnu/usr.bin/cc120/libbackend/../../../../contrib/gcc-12/gcc/expmed.cc: In function 'rtx_def* extract_bit_field_1(rtx, poly_uint64, poly_uint64, int, rtx, machine_mode, machine_mode, bool, bool, rtx_def**)':
/usr/src/gnu/usr.bin/cc120/libbackend/../../../../contrib/gcc-12/gcc/expmed.cc:1832:45: warning: '*(unsigned int*)((char*)&imode + offsetof(scalar_int_mode, scalar_int_mode::m_mode))' may be used uninitialized [-Wmaybe-uninitialized]
 1832 |       rtx sub = extract_bit_field_as_subreg (mode1, op0, imode,
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
 1833 |                                              bitsize, bitnum);
      |                                              ~~~~~~~~~~~~~~~~
/usr/src/gnu/usr.bin/cc120/libbackend/../../../../contrib/gcc-12/gcc/expmed.cc:1792:19: note: '*(unsigned int*)((char*)&imode + offsetof(scalar_int_mode, scalar_int_mode::m_mode))' was declared here
 1792 |   scalar_int_mode imode;
      |                   ^~~~~

    [6 lines not shown]
DeltaFile
+1-1contrib/gcc-12/gcc/expmed.cc
+1-11 files