DragonFlyBSD/src e0f962d — share/terminfo Makefile

terminfo: Remove unused terminfo.tmp and run_tic.sed from Makefile

* The generated run_tic.sed is empty, so the modified terminfo.tmp is
  identical to the original terminfo.src.
* The generated terminfo.tmp is not actually used by run_tic.sh to build
  the entries.

So remove both to clean up. while there, also remove the unnecessary
NOMAN.
DeltaFile
+4-13share/terminfo/Makefile
+4-131 files

DragonFlyBSD/src 75a7ec4 — share/terminfo Makefile

terminfo: Improve the Makefile for entries installation

* Use FILESGROUPS and related macros from <bsd.files.mk> to install the
  entries, replacing the manual explicit "install" target.
* Use the default SHAREMODE (i.e., 444) instead of the custom 644 mode
  for installed entries.
* Use the more conventional <bsd.prog.mk> instead of <bsd.lib.mk>, as
  used by share/termcap, share/tabset, etc.
DeltaFile
+9-8share/terminfo/Makefile
+9-81 files

DragonFlyBSD/src 9f51799 — share/terminfo Makefile

terminfo: Fix entries compilation to output to ${.OBJDIR}

Fix the ${ticdir} and @TERMINFO@ to point to paths in ${.OBJDIR}, so
that the intermediate outputs and compiled entries are all located in
${.OBJDIR}.

In addition, ignore ${DESTDIR} for `run_tic.sh` so the entries output
directory is unaffected during the buildworld, which sets a DESTDIR.

While there, clean up the `run_tic.sh` target to specify the prereq and
to remove the unnecessary `cat` command.
DeltaFile
+18-21share/terminfo/Makefile
+18-211 files

DragonFlyBSD/src 70d3017 — share/terminfo Makefile entries.awk

terminfo: Auto generate entries list from the source terminfo.src

Replace the hand-crafted entries list in Makefile.entries with an
auto-generated one by an awk script, so that it becomes future-proof.

The auto-generated list contains 2780 entries, adding 160 new entries
over the previous stale list, which contained 2620 entries.  In
particular, the new entries include alacritty, kitty, dvtm, etc.
DeltaFile
+0-2,625share/terminfo/Makefile.entries
+17-0share/terminfo/entries.awk
+2-2share/terminfo/Makefile
+19-2,6273 files

DragonFlyBSD/src 02abe7d — lib/libc/gen Symbol.map, lib/libc/thread Symbol.map

libc: Move thread symbols from gen/Symbol.map to thread/Symbol.map

Commit 28e770f9356419201058747986287acae231f334 merged libthread_xu into
libc, and commit aaef2979773f2bfc0f661b17be90d5e5b82b505b moved the
libthread_xu source to libc/thread.  This commit completes the merge by
moving the thread symbols that implemented in libc/thread from
libc/gen/Symbol.map to libc/thread/Symbol.map, so that the Symbol.map
keeps in sync with the source.
DeltaFile
+299-5lib/libc/thread/Symbol.map
+1-289lib/libc/gen/Symbol.map
+300-2942 files

DragonFlyBSD/src fa3b19c — sys/netinet6 in6_src.c

kernel - Fix in6_pcbsetlport() panic

* An assertion is issued after lport is modulo-incremented but
  before checking to see if the loop has exhausted.

  This can result in a field overflow causing the assertion to
  fail.

* Fix by moving the assertion to the correct place.
DeltaFile
+1-2sys/netinet6/in6_src.c
+1-21 files

DragonFlyBSD/src 7570624 — sys/netinet6 in6_src.c

kernel - Fix in6_pcbsetlport() panic

* An assertion is issued after lport is modulo-incremented but
  before checking to see if the loop has exhausted.

  This can result in a field overflow causing the assertion to
  fail.

* Fix by moving the assertion to the correct place.
DeltaFile
+1-2sys/netinet6/in6_src.c
+1-21 files

DragonFlyBSD/src 2ae18ad — sys/net route.c

net: Handle R_Malloc() failure in rt_setshims() (2)

Fix building.
DeltaFile
+1-1sys/net/route.c
+1-11 files

DragonFlyBSD/src 892d0bc — sys/kern vfs_vnops.c vfs_nlookup.c, sys/net rtsock.c route.c

kernel: Minor code and style cleanups
DeltaFile
+31-23sys/net/route.c
+5-5sys/kern/vfs_syscalls.c
+4-3sys/kern/vfs_nlookup.c
+2-3sys/net/rtsock.c
+1-1sys/kern/vfs_vnops.c
+43-355 files

DragonFlyBSD/src 1bd4d46 — sys/net rtsock.c, sys/netinet in_rmx.c in_var.h

netinet: Maintain RTF_LOCAL in the kernel

* Expose in_rtlocalize() for using in route_output_change_callback() to
  correctly set RTF_LOCAL, taking into account of the IFA/IFP changes.
* Add RTF_LOCAL to PRESERVED_RTF and ignore the RTF_LOCAL flag from
  userspace, making this flag be maintained by the kernel.
* Clean up arp_rtrequest() to directly check the RTF_LOCAL flag instead
  of comparing the IP addresses.
DeltaFile
+14-3sys/net/rtsock.c
+1-5sys/netinet/if_ether.c
+1-1sys/netinet/in_rmx.c
+2-0sys/netinet/in_var.h
+18-94 files

DragonFlyBSD/src 9ac2060 — sys/net route.c

net: Normalize IPv4 /32 route to a host route (RTF_HOST)

An IPv4 /32 route denotes a host route (RTF_HOST).  Add the
rt_hostroute_normalize() helper to normalize such routes by setting the
RTF_HOST flag.  Use the helper in both rtrequest1() and
rtsearch_msghandler() so that this normalization applies to RTM_ADD,
RTM_GET, RTM_CHANGE and RTM_LOCK.
DeltaFile
+32-0sys/net/route.c
+32-01 files

DragonFlyBSD/src 979b9b1 — sys/net if_var.h if.c, sys/netinet in_rmx.c in.c

netinet: Move loopback route maintain functions to in.c

The ifa_{add,del}_loopback_route() functions are only used in
netinet/in.c, so just move them to there and make them static.
Meanwhile, rename them to in_{add,del}_loopback_route() for consistency.
DeltaFile
+77-4sys/netinet/in.c
+0-77sys/net/if.c
+0-3sys/net/if_var.h
+1-1sys/netinet/in_rmx.c
+78-854 files

DragonFlyBSD/src c6d9d72 — gnu/usr.bin/gmp/lib Makefile

gmp: Clean up makefile

* Use per-target flags "FLAGS.<target>" to replace the FLAGS_GROUPS,
  expressing the intention/requirement more clearly.

* Introduce helper varaibles to clean up the loop code.

* Remove the unused "mpn/generic" directory.
DeltaFile
+13-12gnu/usr.bin/gmp/lib/Makefile
+13-121 files

DragonFlyBSD/src 5a47208 — sys/netinet if_ether.c

netinet: Clean up interface routes handling in arp_rtrequest()

in_addroute() gives every non-host, non-multicast IPv4 route either
RTF_CLONING or RTF_PRCLONING, so manually added interface routes would
have RTF_PRCLONING. As a result, we can clean up arp_rtrequest() to
check either RTF_CLONING or RTF_PRCLONING in handling a cloned route,
without hacking the RTF_CLONING flag.

An edge case is a non-host route with a "/32" mask. However, that case
doesn't make practical sense and should be normalized to a host route.
That will be addressed in the coming commits.
DeltaFile
+3-7sys/netinet/if_ether.c
+3-71 files

DragonFlyBSD/src 2fb883c — sys/net route.c

net: Handle R_Malloc() failure in rt_setshims()

Introduce the rt_freeshims() helper to free the memory allocated by
rt_setshims(), and also call it in rtrequest1() to avoid potential
memory leak.

This only applies MPLS.
DeltaFile
+27-2sys/net/route.c
+27-21 files

DragonFlyBSD/src e841b45 — sys/net if.c, sys/netinet in_rmx.c

netinet: Improve local routes handling in in_addroute()

* Extract the in_rtlocalize() helper function to improve the handling of
  local routes, including explicit loopback routes added by
  ifa_add_loopback_route().
* Skip modifying IFA/IFP for the explicit loopback routes, and thus
  remove the pre-setting RTF_LOCAL from ifa_maintain_loopback_route().

No functional changes.
DeltaFile
+68-26sys/netinet/in_rmx.c
+1-6sys/net/if.c
+69-322 files

DragonFlyBSD/src 7e54cac — sbin/route route.c

route(8): Normalize IPv4 /32 route to a host route (RTF_HOST)
DeltaFile
+4-0sbin/route/route.c
+4-01 files

DragonFlyBSD/src da35356 — 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 eb24809 — 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 d6e46da — sys/netinet if_ether.c

netinet: fix ARP resolution during the first second of uptime

A cloned route created while time_uptime is zero passes a zero expiry
to its neighbors. Zero denotes a permanent entry, so unresolved dynamic
neighbors never send ARP requests.

Add the arp_expire_unresolved (= time_uptime + 1) to keep dynamic expiry
nonzero and track the last request time separately, using la_asked to
indicate whether that time is valid. This preserves same-second rate
limiting and permanent-entry semantics without changing the routing ABI.

While there, fix the code to add arpt_down to rt_expire only when it's a
cloned route.

Co-authored-by: Aaron LI <aly at aaronly.me>
GitHub-PR: https://github.com/DragonFlyBSD/DragonFlyBSD/pull/58
DeltaFile
+20-4sys/netinet/if_ether.c
+20-41 files

DragonFlyBSD/src 36cfac0 — usr.bin/dsynth mktemplate.sh

dsynth - Do not cross mount boundaries when making template's /etc

* When making the template's /etc, do not cross mount boundaries.

* This is a bit of a hack but /etc/namedb sometimes has a "dev"
  subdirectory for its chroot area that mounts devfs.  This kinda
  implodes when we later try to tmpfs it.
DeltaFile
+1-1usr.bin/dsynth/mktemplate.sh
+1-11 files

DragonFlyBSD/src 35d1b97 — usr.bin/dsynth pkglist.c

dsynth - Apply the "debug" directive to ports-mgmt/pkg

The debug directive was not being applied to ports-mgmt/pkg,
so we couldn't retain the mounts for debugging purposes when
explicitly building that target.

Adjust the (s4) string to recognize multiple flags, since fixing
this requires two flags to be passed in.

Reported-by: aly
DeltaFile
+6-3usr.bin/dsynth/pkglist.c
+6-31 files

DragonFlyBSD/src 29fcc23 — sys/bus/cam/scsi scsi_da.c

kernel - Fix I/O stalls caused by TRIM ops

* I/O can stall out in physstr when TRIM ops are delpoyed.  The
  cause is that the da_softc->outstanding_cmds_rd tracker used by
  the I/O balancer was decrementing the field on TRIM completions.

* Fix by ensuring that the tracker only applies to READ commands.

* Refactor scheduling checks in dastart().  The checks were a bit broken
  but worked due to a catch-all in dadone().  Refactor so they work properly.

* Refactor conditional/block syntax a bit for readability.

Reported-by: myself and numerous others
DeltaFile
+51-31sys/bus/cam/scsi/scsi_da.c
+51-311 files

DragonFlyBSD/src c2b89da — 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 0c8c98a — sys/kern kern_module.c

kern: skip module shutdown handlers on panic

module_shutdown() is a shutdown_post_sync handler, so it also runs on the
panic path after the panicking CPU has stopped the other CPUs.  Some
MOD_SHUTDOWN handlers block on kernel threads that cannot run once their
CPU is stopped: vn calls disk_destroy(), and disk_msg_send_sync() then
waits forever for the disk_msg_core thread.  The machine hangs after
"Dump complete" and never reboots.

Skip the module shutdown handlers on a panic, as resettodr_on_shutdown()
and shutdown_kproc() already do.  The dump is already written when this
handler runs.

Reproduced in a QEMU/NVMM guest: panic + dump with
hw.acpi.handle_reboot=1 hangs at "Dump complete" on SMP and reboots on a
single CPU.  With this change the guest reboots with
hw.acpi.handle_reboot 1 and 0, with and without a dump.

Bug: https://bugs.dragonflybsd.org/issues/3450
DeltaFile
+4-0sys/kern/kern_module.c
+4-01 files

DragonFlyBSD/src 501680a — sys/netinet if_ether.c

netinet: Remove the unimplemented 'net.link.ether.inet.refresh' sysctl
DeltaFile
+0-3sys/netinet/if_ether.c
+0-31 files

DragonFlyBSD/src 41bcf53 — usr.bin/dsynth dsynth.c

dsynth - Fix improper deletions with "prepare-system"

* Don't delete "obsolete" packages for "prepare-system"

* Obsolete packages can only be properly deleted when
  a full scan is done.  "prepare-system" only does a
  partial scan so it winds up deleting stuff it
  should not delete.
DeltaFile
+2-1usr.bin/dsynth/dsynth.c
+2-11 files

DragonFlyBSD/src 724a6db — 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 eb5648c — 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 c0bbe32 — sys/sys diskmbr.h

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