FreeBSD/src 4859030sbin/ping/tests test_ping.py

ping: tests: Align with Scapy defaults

Align some of pinger() defaults with Scapy to facilitate debugging when
printing packets.

No functional change intended.

Reviewed by:    emaste, kp
Approved by:    emaste (mentor)
Differential Revision:  https://reviews.freebsd.org/D47159
DeltaFile
+5-5sbin/ping/tests/test_ping.py
+5-51 files

FreeBSD/src 2e29bf7sbin/ping/tests test_ping.py

ping: tests: Cleanup IPOption()s

Scapy now only accepts known options with IPOption(), so our unknown
option must be passed raw.

While here, prefer the named options for EOL and NOP.

Reviewed by:    emaste, kp
Approved by:    emaste (mentor)
Differential Revision:  https://reviews.freebsd.org/D47160
DeltaFile
+4-4sbin/ping/tests/test_ping.py
+4-41 files

FreeBSD/src 9e84289tools/tools/git git-arc.sh

git-arc: Prefer echo over printf

Prefer echo over printf.  Prevent the newline character from being
translated by using 'blank' instead of 'space' in the re_format.

This change was reviewed in:

https://reviews.freebsd.org/D47289

Committed separately for clarity.

Suggested by:   des
Approved by:    emaste (mentor)
DeltaFile
+1-1tools/tools/git/git-arc.sh
+1-11 files

FreeBSD/src 2377c19tools/tools/git git-arc.sh

git-arc: Trap on every mktemp

Trap:

- EXIT (0)
- HUP  (1)
- INT  (2)
- QUIT (3)
- TRAP (5)
- USR1 (10)
- TERM (15)

every time mktemp is called to reduce the chances of leaving stray files
or directories with possible sensitive data inside.

We avoid using a template with mktemp, as some operating systems may use
unpredictable base paths by default (macOS).

Suggested by:   des

    [3 lines not shown]
DeltaFile
+30-18tools/tools/git/git-arc.sh
+30-181 files

FreeBSD/src 019981etools/tools/git git-arc.sh

git-arc: Fix typo s/Truning/Turning/

While here standardize white space.
No functional change.

Approved by:    emaste (mentor)
DeltaFile
+21-21tools/tools/git/git-arc.sh
+21-211 files

FreeBSD/src aa90b92tools/tools/git git-arc.sh

git-arc: Fix find_author() for external users

When an external user submits a review in Phabricator, the find_author()
subroutine may receive the author_name and author_addr as "null" from
the JSON API with git-arc patch.

This "null" string gets tested for length by "[ -n", and returning that
is greater than zero, in other words, the shell does not understand that
"null" means nothing in this case.

Fix it by adding a guard, that sets an empty string when the content is
"null".

While here, standardize the indentation style for find_author()

Reviewed by:    emaste, markj
Approved by:    emaste (mentor)
Differential Revision:  https://reviews.freebsd.org/D46789
DeltaFile
+24-14tools/tools/git/git-arc.sh
+24-141 files

FreeBSD/src b032be7tests/sys/cam/ctl ctl.subr

Make the CTL tests more resilient

Fix the find_device function to work regardless of whether "camcontrol
devlist" lists the da device first and the pass device second or vice
versa.  On FreeBSD 14 and 15 it apparently always lists da first.  But
on 13 it can do it in either order.

MFC after:      2 weeks
MFC with:       fe1755fa
Sponsored by:   ConnectWise
Reviewed by:    emaste, markj, #cam
Differential Revision: https://reviews.freebsd.org/D47446
DeltaFile
+8-1tests/sys/cam/ctl/ctl.subr
+8-11 files

FreeBSD/src c2b34d0usr.sbin/bhyvectl bhyvectl.c

bhyvectl: Convert to use vm_openf()

Reviewed by:    jhb
Differential Revision:  https://reviews.freebsd.org/D47031
DeltaFile
+8-13usr.sbin/bhyvectl/bhyvectl.c
+8-131 files

FreeBSD/src 99127fdlib/libvmmapi vmmapi.c vmmapi.h

libvmmapi: Use the vmmctl device file to create and destroy VMs

This deprecates the vm_create() and vm_open() interfaces and introduces
vm_openf(), which takes flags controlling its behaviour.  In particular,
it will optionally create a VM first, and it can optionally reinitialize
an existing VM.  This enables some simplification of existing consumers.

Reviewed by:    jhb
Differential Revision:  https://reviews.freebsd.org/D47030
DeltaFile
+78-26lib/libvmmapi/vmmapi.c
+3-0lib/libvmmapi/vmmapi.h
+2-1lib/libvmmapi/internal.h
+83-273 files

FreeBSD/src a97f683sys/amd64/vmm vmm.c, sys/arm64/vmm vmm.c

vmm: Add a device file interface for creating and destroying VMs

This supersedes the sysctl interface, which has the limitations of being
root-only and not supporting automatic resource destruction, i.e., we
cannot easily destroy VMs automatically when bhyve terminates.

For now, two ioctls are implemented VMMCTL_VM_CREATE and
VMMCTL_VM_DESTROY.  Eventually I would like to support tying a VM's
lifetime to that of the descriptor, so that it is automatically
destroyed when the descriptor is closed.  However, this will require
some work in bhyve: when the guest wants to reboot, bhyve exits with a
status that indicates that it is to be restarted.  This is incompatible
with the idea of tying a VM's lifetime to that of a descriptor, since we
want to avoid creating and destroying a VM across each reboot (as this
involves freeing all of the guest memory, among other things).  One
possible design would be to decompose bhyve into two processes, a parent
which handles reboots, and a child which runs in capability mode and
handles guest execution.


    [5 lines not shown]
DeltaFile
+79-1sys/dev/vmm/vmm_dev.c
+14-1sys/dev/vmm/vmm_dev.h
+3-1sys/arm64/vmm/vmm.c
+3-1sys/amd64/vmm/vmm.c
+99-44 files

FreeBSD/src ebd48f1etc/mtree BSD.include.dist, include Makefile

include: Install dev/vmm headers

In preparation for their use in libvmmapi.

Reviewed by:    jhb
Differential Revision:  https://reviews.freebsd.org/D47029
DeltaFile
+2-0etc/mtree/BSD.include.dist
+1-1include/Makefile
+3-12 files

FreeBSD/src 5ef0cd2usr.sbin/bhyve bhyverun.c

bhyve: Convert to using vm_openf()

Reviewed by:    jhb
Differential Revision:  https://reviews.freebsd.org/D47032
DeltaFile
+13-38usr.sbin/bhyve/bhyverun.c
+13-381 files

FreeBSD/src 8b54d87sys/dev/hifn hifn7751.c, sys/dev/safe safe.c

hifn/safe: Remove dummy calls to bus_generic_detach

These drivers do not add child devices, so there's no need to try to
detach children.

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D47390
DeltaFile
+0-2sys/dev/hifn/hifn7751.c
+0-1sys/dev/safe/safe.c
+0-32 files

FreeBSD/src 7ebc7d1sys/dev/gpio gpiomdio.c, sys/dev/sff sfp_fdt.c

Remove bogus detach routines

These drivers are not bus drivers, and would need proper detach
routines that tore down state stored in the softc.  Better to just
fail detach outright instead of an incorrect success.

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D47389
DeltaFile
+0-1sys/dev/gpio/gpiomdio.c
+0-1sys/dev/sff/sfp_fdt.c
+0-22 files

FreeBSD/src 24d5a8esys/dev/dpaa2 dpaa2_mc.c

dpaa2_mc: Check for error the first time bus_generic_detach is called

This removes the need for the second call.

Reviewed by:    dsl
Differential Revision:  https://reviews.freebsd.org/D47388
DeltaFile
+3-5sys/dev/dpaa2/dpaa2_mc.c
+3-51 files

FreeBSD/src d412c07sys/arm/nvidia as3722.c tegra_abpmisc.c, sys/arm/nvidia/drm2 tegra_hdmi.c tegra_dc.c

Check for errors when detaching children first, not last

These detach routines in these drivers all ended with 'return
(bus_generic_detach())' meaning that if any child device failed to
detach, the parent driver was left in a mostly destroyed state, but
still marked attached.  Instead, bus drivers should detach child
drivers first and return errors before destroying driver state in the
parent.

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D47387
DeltaFile
+7-1sys/arm/nvidia/drm2/tegra_hdmi.c
+6-1sys/powerpc/powermac/pmu.c
+6-1sys/arm/nvidia/as3722.c
+6-1sys/arm/nvidia/drm2/tegra_dc.c
+6-1sys/arm/nvidia/drm2/tegra_host1x.c
+6-1sys/arm/nvidia/tegra_abpmisc.c
+37-615 files not shown
+126-2121 files

FreeBSD/src d62d10esys/dev/acpica acpi_container.c, sys/dev/adb adb_bus.c

Use bus_generic_detach directly instead of a wrapper

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D47386
DeltaFile
+1-9sys/dev/acpica/acpi_container.c
+1-9sys/dev/mdio/mdio.c
+1-7sys/dev/adb/adb_bus.c
+3-253 files

FreeBSD/src 9e1db51sbin/nvmecontrol nvmecontrol.c devlist.c

nvmecontrol: Use active nslist to enumerate namespaces

Rather than probing all namespace IDs up to cdata.nn for the devlist
command, fetch the active namespace list and iterate over that.  This
can be much quicker on Fabrics controllers which often advertise a
large cdata.nn value to support adding additional namespaces at
runtime.

Reviewed by:    chuck
Reported by:    Neven Z <nevenzfr at gmail.com>
Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D47355
DeltaFile
+24-0sbin/nvmecontrol/nvmecontrol.c
+16-3sbin/nvmecontrol/devlist.c
+1-0sbin/nvmecontrol/nvmecontrol.h
+41-33 files

FreeBSD/src 326e20fsbin/nvmecontrol devlist.c

nvmecontrol: Refactor devlist implementation

Split out helper functions for scan_namespace and scan_controller.
While here, replace sprintf() calls with snprintf() and avoid
leaking the contoller fd if read_controller_data() fails.

Reviewed by:    chuck, imp
Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D47354
DeltaFile
+59-40sbin/nvmecontrol/devlist.c
+59-401 files

FreeBSD/src 8922c5bsys/dev/nvmf/host nvmf.c

nvmf: Fix an off by one error when scanning active namespace IDs

The active namespace list query fetches namespaces greater than the
passed in namespace ID, not greater than or equal to the passed in
namespace ID.  Thus, a multi-page request should start with the last
namespace ID from the previous page, not that ID plus 1.

While here, make use of NVME_GLOBAL_NAMESPACE_TAG instead of a magic
number to handle the edge case that the last namespace ID in a page is
the largest valid namespace ID.

Reviewed by:    chuck
Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D47393
DeltaFile
+2-2sys/dev/nvmf/host/nvmf.c
+2-21 files

FreeBSD/src 4026b17share/man/man4 vt.4

vt.4: align tables + 80 character line limit

Reviewed by:    emaste
MFC after:      3 days
Pull request:   https://github.com/freebsd/freebsd-src/pull/1514
DeltaFile
+5-5share/man/man4/vt.4
+5-51 files

FreeBSD/src a4e7810libexec/rc debug.sh

debug.sh check for :debug_add:

When we match a tag and turn tracing, see if we have any
$DEBUG_ON:debug_add:tag in DEBUG_SH and if so add the new tag.

This allows for more focused debugging during boot.

Reviewed by:    stevek
DeltaFile
+77-15libexec/rc/debug.sh
+77-151 files

FreeBSD/src 8934526libexec/rc rc.conf

rc: Update ipfilter example rules location

It was originally /usr/src/contrib/ipfilter/rules and moved to
/usr/src/share/examples/ipfilter/rules in 41edb306f056.

Point to users to /usr/src/share/examples/ipfilter instead, as the base
directory also contains example rules.

Reviewed by:    emaste
Approved by:    emaste (mentor)
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D47392
DeltaFile
+1-1libexec/rc/rc.conf
+1-11 files

FreeBSD/src 0187bc8sys/dev/sound driver.c

sound: Include snd_cmi only for i386 and amd64

When running FreeBSD on an arm64/aarch64 QEMU virtual machine, using the
Intel HD Audio Controller (ich6) (intel-hda), for example, and by
following the procedure in the handbook ("Setting Up the Sound Card"):

    kldload snd_driver

The following error is shown:

    KLD snd_driver.ko: depends on snd_cmi - not available or version mismatch

This is because the CMedia sound driver (snd_cmi) is only built for i386
and amd64.

Add the same guards to the snd_driver metadriver.

Reviewed by:    christos, emaste
Approved by:    emaste (mentor)

    [2 lines not shown]
DeltaFile
+2-0sys/dev/sound/driver.c
+2-01 files

FreeBSD/src c477d89sys/sys file.h

file: The f_ops table pointer can be a pointer to const

No functional change intended.

MFC after:      2 weeks
DeltaFile
+1-1sys/sys/file.h
+1-11 files

FreeBSD/src ff84f8bsys/x86/iommu intel_ctx.c

iommu: Clean up a lingering function prototype

Reported by:    clang
Fixes:          d97838b7c2a6 ("iommu: eliminate iommu_free_ctx()")
DeltaFile
+0-1sys/x86/iommu/intel_ctx.c
+0-11 files

FreeBSD/src a905c58sys/kern subr_pctrie.c

pctrie: breakup pctrie_root_store

Break up pctrie_root_store into the part that casts the root to a
smr_pctnode_t *, and the rest. The rest is just pctrie_node_store, and
the casting part can be used in a few more places.

This is strictly a code-cleanup change, with no functional change
expected.

Reviewed by:    bnovkov
Differential Revision:  https://reviews.freebsd.org/D47347
DeltaFile
+19-20sys/kern/subr_pctrie.c
+19-201 files

FreeBSD/src 9306543. ObsoleteFiles.inc, share/man/man7 c.7 Makefile

c(7): Add C23 standard update

Reviewed by:    emaste, Graham Percival <gperciva at tarsnap.com>
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1507
Signed-off-by: Faraz Vahedi <kfv at kfv.io>
DeltaFile
+155-14share/man/man7/c.7
+3-0ObsoleteFiles.inc
+2-1share/man/man7/Makefile
+160-153 files

FreeBSD/src 7e98eaeshare/man/man7 c.7

c(7): Utilise proper macros to pass mandoc's linter

Reviewed by:    Graham Percival <gperciva at tarsnap.com>
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1507
Signed-off-by: Faraz Vahedi <kfv at kfv.io>
DeltaFile
+48-20share/man/man7/c.7
+48-201 files

FreeBSD/src cdffbealib/libusb libusb.3, libexec/rtld-elf rtld.1

manuals: Fix dates

These were reported by `mandoc -T lint ...` as warnings.

Signed-off-by:  Graham Percival <gperciva at tarsnap.com>
Reviewed by:    mhorne
MFC after:      3 days
Sponsored by:   Tarsnap Backup Inc.
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1475

(cherry picked from commit b74aaa1a2199261f9078247d29481a994b6b5e42)
DeltaFile
+1-1usr.sbin/gssd/gssd.8
+1-1share/man/man4/enic.4
+1-1lib/libusb/libusb.3
+1-1libexec/rtld-elf/rtld.1
+4-44 files