FreeBSD/src 82dcd3asys/dev/vt vt_core.c

vt: Move VWF_GRAPHICS clearing under VT_LOCK

Reviewed by:    vexeduxr, Quentin Thébault <quentin.thebault at defenso.fr>
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D59814
DeltaFile
+1-1sys/dev/vt/vt_core.c
+1-11 files

FreeBSD/src d1ec736share/man/man4 Makefile

man: Link enic.4 to if_enic.4

For consistency, create a symbolic link from enic.4 to also if_enic.4

Reviewed by:            ziaee, #manpages
Differential Revision:  https://reviews.freebsd.org/D59755
MFC after:              3 days

(cherry picked from commit 3eaa8b19ba1fdbe41a46dc84c4278e9eb5d49608)
DeltaFile
+1-0share/man/man4/Makefile
+1-01 files

FreeBSD/src a0bb961sys/conf kern.mk

kern.mk: make clang 23 -Wunused-but-set-global non-fatal

This warning triggers in a few places in contributed code, and would
therefore be annoying to fix. Use -Wno-error= to at least show the
warnings so there is some incentive to submit them upstream.

MFC after:      3 days

(cherry picked from commit bcd0d76d4882dd8d19a49c050411b5c58a0deb74)
DeltaFile
+3-0sys/conf/kern.mk
+3-01 files

FreeBSD/src 6fa0670share/mk bsd.sys.mk

bsd.sys.mk: make clang 23 -Wunused-but-set-global non-fatal

This warning triggers in a few places in contributed code, and would
therefore be annoying to fix. Use -Wno-error= to at least show the
warnings so there is some incentive to submit them upstream.

MFC after:      3 days

(cherry picked from commit d577b4ed588c0f259d7298188233b17dc0435dd4)
DeltaFile
+3-0share/mk/bsd.sys.mk
+3-01 files

FreeBSD/src 1aea303contrib/llvm-project/libunwind/src CompactUnwinder.hpp

Merge commit 1f332ae4f1b3 from llvm-project (by Alexander Kornienko):

  Fix -Wformat diagnostic after #190965 (#193704)

  Fixes libunwind compiler diagnostic when building with clang after
  034d4dcad6396d1241e8262e69871b8d61da7e4f:
  ```
  In file included from libunwind/src/libunwind.cpp:31:
  In file included from libunwind/src/UnwindCursor.hpp:52:
  libunwind/src/CompactUnwinder.hpp:339:46: error: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Werror,-Wformat]
    338 |                            "function starting at 0x%llX",
        |                                                    ~~~~
        |                                                    %lX
    339 |                             compactEncoding, functionStart);
        |                                              ^~~~~~~~~~~~~
  libunwind/src/config.h:215:63: note: expanded from macro '_LIBUNWIND_DEBUG_LOG'
    215 |   #define _LIBUNWIND_DEBUG_LOG(msg, ...)  _LIBUNWIND_LOG(msg, __VA_ARGS__)
        |                                                          ~~~  ^~~~~~~~~~~
  libunwind/src/config.h:181:45: note: expanded from macro '_LIBUNWIND_LOG'

    [23 lines not shown]
DeltaFile
+5-4contrib/llvm-project/libunwind/src/CompactUnwinder.hpp
+5-41 files

FreeBSD/src ecf5686sys/conf kern.mk

kern.mk: make clang 23 -Wunused-but-set-global non-fatal

This warning triggers in a few places in contributed code, and would
therefore be annoying to fix. Use -Wno-error= to at least show the
warnings so there is some incentive to submit them upstream.

MFC after:      3 days

(cherry picked from commit bcd0d76d4882dd8d19a49c050411b5c58a0deb74)
DeltaFile
+3-0sys/conf/kern.mk
+3-01 files

FreeBSD/src 4cff1abshare/mk bsd.sys.mk

bsd.sys.mk: make clang 23 -Wunused-but-set-global non-fatal

This warning triggers in a few places in contributed code, and would
therefore be annoying to fix. Use -Wno-error= to at least show the
warnings so there is some incentive to submit them upstream.

MFC after:      3 days

(cherry picked from commit d577b4ed588c0f259d7298188233b17dc0435dd4)
DeltaFile
+3-0share/mk/bsd.sys.mk
+3-01 files

FreeBSD/src 672f2c5contrib/llvm-project/libunwind/src CompactUnwinder.hpp

Merge commit 1f332ae4f1b3 from llvm-project (by Alexander Kornienko):

  Fix -Wformat diagnostic after #190965 (#193704)

  Fixes libunwind compiler diagnostic when building with clang after
  034d4dcad6396d1241e8262e69871b8d61da7e4f:
  ```
  In file included from libunwind/src/libunwind.cpp:31:
  In file included from libunwind/src/UnwindCursor.hpp:52:
  libunwind/src/CompactUnwinder.hpp:339:46: error: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Werror,-Wformat]
    338 |                            "function starting at 0x%llX",
        |                                                    ~~~~
        |                                                    %lX
    339 |                             compactEncoding, functionStart);
        |                                              ^~~~~~~~~~~~~
  libunwind/src/config.h:215:63: note: expanded from macro '_LIBUNWIND_DEBUG_LOG'
    215 |   #define _LIBUNWIND_DEBUG_LOG(msg, ...)  _LIBUNWIND_LOG(msg, __VA_ARGS__)
        |                                                          ~~~  ^~~~~~~~~~~
  libunwind/src/config.h:181:45: note: expanded from macro '_LIBUNWIND_LOG'

    [23 lines not shown]
DeltaFile
+5-4contrib/llvm-project/libunwind/src/CompactUnwinder.hpp
+5-41 files

FreeBSD/src aca53fcsys/compat/linuxkpi/common/include/linux xarray.h

Fix statement with no effect in linuxkpi's xarray.h

When compiling the kernel with gcc 14, errors similar to the following
are emitted:

  sys/dev/cxgbe/iw_cxgbe/ev.c: In function 'c4iw_ev_handler':
  sys/compat/linuxkpi/common/include/linux/xarray.h:132:23: error: statement with no effect [-Werror=unused-value]
    132 |                 flags == 0; \
  sys/dev/cxgbe/iw_cxgbe/ev.c:274:17: note: in expansion of macro 'xa_unlock_irqrestore'
    274 |                 xa_unlock_irqrestore(&dev->cqs, flag);
        |                 ^~~~~~~~~~~~~~~~~~~~
  sys/compat/linuxkpi/common/include/linux/xarray.h:132:23: error: statement with no effect [-Werror=unused-value]
    132 |                 flags == 0; \
  sys/dev/cxgbe/iw_cxgbe/ev.c:283:17: note: in expansion of macro 'xa_unlock_irqrestore'
    283 |                 xa_unlock_irqrestore(&dev->cqs, flag);
        |                 ^~~~~~~~~~~~~~~~~~~~

It looks like the intent of the "flags == 0" statement was to make the
'flags' macro argument not unused, but it still results in a warning.

    [5 lines not shown]
DeltaFile
+1-1sys/compat/linuxkpi/common/include/linux/xarray.h
+1-11 files

FreeBSD/src eca3149release/tools ec2-desktop.conf

ec2-desktop: Don't enable firstboot_pkgs

We don't have any packages to install by default when the instance
first boots, so (as with the "small" flavour) don't enable the
firstboot_pkgs script.  If someone wants to launch a desktop with
packages autoinstalled at first boot, they can enable the script at
the same time as they provide the list of packages.

Sponsored by:   Amazon
DeltaFile
+1-1release/tools/ec2-desktop.conf
+1-11 files

FreeBSD/src 28cad38release/tools ec2_setpass

ec2-desktop: Fix shell expansion in ec2_setpass

Using a backtick inside a backtick-expansion isn't a good idea; switch
instead to using $( ... ).

Fixes:  a9710349513f ("EC2: Add desktop flavour")
Sponsored by:   Amazon
DeltaFile
+1-1release/tools/ec2_setpass
+1-11 files

FreeBSD/src ed4d267usr.sbin/acpi/acpidump acpidump.8 acpidump.h

acpidump: Add decoding of the MSDM table

Add support for dumping the Microsoft Data Management (MSDM) table,
which contains the Windows product key embedded in firmware by the OEM.

Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D59662
DeltaFile
+25-0usr.sbin/acpi/acpidump/acpi.c
+15-0usr.sbin/acpi/acpidump/acpidump.h
+4-1usr.sbin/acpi/acpidump/acpidump.8
+44-13 files

FreeBSD/src 7f7e958. RELNOTES

Add release notes entry for less v710.
DeltaFile
+9-0RELNOTES
+9-01 files

FreeBSD/src 4523eebcontrib/less lessmsg.inc lesskey.c

MFV: less v710.

MFC after:      1 week
DeltaFile
+342-280contrib/less/opttbl.c
+296-232contrib/less/screen.c
+246-129contrib/less/decode.c
+372-0contrib/less/lessmsg
+0-364contrib/less/lesskey.c
+331-0contrib/less/lessmsg.inc
+1,587-1,00552 files not shown
+3,285-1,81058 files

FreeBSD/src ed60e57usr.sbin/bhyve bhyve_config.5 ipc.c, usr.sbin/bhyvectl Makefile bhyvectl.8

bhyvectl: support querying VM pid

Extend bhyvectl(8) to support querying VM pid using the
`--get-vm-pid` flag.

This is useful in monitor mode when the VM pid differs
from the main bhyve(8) process run by the user. Knowing the VM pid
is necessary, for example, to query process resource usage or
trigger ACPI shutdown with SIGTERM.

Of course, it could be obtained by matching the monitor process
children by the process title, but it's a little more complex
and fragile than it could be.

Implement that by adding the "get_vm_pid" IPC command,
and using it to implement `bhyvectl --get-vm-pid`, which
prints the VM PID.

When the VM PID is not known, ESRCH is returned.

    [4 lines not shown]
DeltaFile
+51-9usr.sbin/bhyvectl/bhyvectl.c
+11-0usr.sbin/bhyve/ipc.c
+6-2usr.sbin/bhyvectl/bhyvectl.8
+1-2usr.sbin/bhyvectl/Makefile
+1-1usr.sbin/bhyve/bhyve_config.5
+70-145 files

FreeBSD/src 7008192share/man/man4 dtrace_pid.4

dtrace_pid.4: Add example "Listing Program's Function Entries"

Reviewed by:    bcr
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D57515
DeltaFile
+22-2share/man/man4/dtrace_pid.4
+22-21 files

FreeBSD/src 47f9e66usr.sbin/pkg pkg.c

pkg(7): Preserve const qualifier on strrchr(3) results

Reviewed by:    fuz
Approved by:    fuz (mentor)
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D59777
DeltaFile
+2-2usr.sbin/pkg/pkg.c
+2-21 files

FreeBSD/src cc61cc7bin/ls print.c

ls(1): Preserve const qualifier on strstr(3) result

Reviewed by:    fuz
Approved by:    fuz (mentor)
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D59774
DeltaFile
+2-2bin/ls/print.c
+2-21 files

FreeBSD/src 066fad8bin/ed io.c

ed(1): Preserve const qualifier on strchr(3) result

Reviewed by:    fuz
Approved by:    fuz (mentor)
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D59773
DeltaFile
+1-1bin/ed/io.c
+1-11 files

FreeBSD/src 225612cbin/dd args.c

dd(1): Preserve const qualifier on bsearch(3) results

Reviewed by:    fuz, dteske
Approved by:    fuz (mentor), dteske (mentor)
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D59754
DeltaFile
+9-5bin/dd/args.c
+9-51 files

FreeBSD/src 4c6e74a. UPDATING, sys/sys param.h

UPDATING: bump __FreeBSD_version to 1501503 for LinuxKPI changes

The size of multiple embedded structs have changed and may lead to
problems (pci_error_handlers in pci_driver, dev_pm_info in struct device).
Allow these changes to be detected by bumping __FreeBSD_version.

(cherry picked from commit e1ad124136deb4f270d4cef759bf9e9debdb17d3)
DeltaFile
+6-0UPDATING
+1-1sys/sys/param.h
+7-12 files

FreeBSD/src 3ff1aeasys/compat/linuxkpi/common/include/linux pci.h

LinuxKPI: pci: add reset_{prepare,done} to pci_error_handlers

Needed by an upcoming wireless driver.

Reviewed by:    dumbbell
Differential Revision: https://reviews.freebsd.org/D58882

(cherry picked from commit c40219c572df8b4b0c2392ee341d93bc82e6076b)
DeltaFile
+2-0sys/compat/linuxkpi/common/include/linux/pci.h
+2-01 files

FreeBSD/src 9b0e737sys/compat/linuxkpi/common/src linux_80211.c linux_80211_macops.c

LinuxKPI: 802.11: Always lock around lkpi_80211_mo_{remove_interface,stop}()

Add the missing locking to another two MO driver downcalls, as drivers
always expect it (e.g. rtw89 by assertion).

Add the lock and might_sleep assertions to the respective lkpi_80211_mo_*
downcalls.

PR:             298417
Reviewed by:    bz
Differential Revision: https://reviews.freebsd.org/D59608

(cherry picked from commit 73166d21bd831db264509cbdce1ab3b63ab5b189)
DeltaFile
+6-0sys/compat/linuxkpi/common/src/linux_80211_macops.c
+2-0sys/compat/linuxkpi/common/src/linux_80211.c
+8-02 files

FreeBSD/src 28ca279sys/compat/linuxkpi/common/include/linux pm.h, sys/compat/linuxkpi/common/src linux_compat.c

LinuxKPI: add can_wakeup option and accessor functions

We can implement device_set_wakeup_capable() in the !CONFIG_PM_SLEEP
case;  we do not have the infrastructure in place for the CONFIG_PM_SLEEP
case so leave a pr_debug TODO.

Needed by an upcoming wireless driver.

Reviewed by:    dumbbell
Differential Revision: https://reviews.freebsd.org/D58883

(cherry picked from commit a424fb3519ebf8fb972e7ba45ba19df322992b00)
DeltaFile
+17-0sys/compat/linuxkpi/common/include/linux/pm.h
+6-0sys/compat/linuxkpi/common/src/linux_compat.c
+23-02 files

FreeBSD/src 5fd93b6sys/compat/linuxkpi/common/include/linux pci.h, sys/compat/linuxkpi/common/src linux_pci.c

LinuxKPI: add PCI_IRQ_AFFINITY #define

Add the #define for PCI_IRQ_AFFINITY and leave a pr_debug note in
pci_alloc_irq_vectors() that it is unimplemented.

The flag is needed by an upcoming WiFi driver.

Reviewed by:    dumbbell
Differential Revision: https://reviews.freebsd.org/D58881

(cherry picked from commit b589e403a2c3bd2a94fb2ab88cd23255c68a9f05)
DeltaFile
+3-0sys/compat/linuxkpi/common/src/linux_pci.c
+1-0sys/compat/linuxkpi/common/include/linux/pci.h
+4-02 files

FreeBSD/src 67c01ebsys/compat/linuxkpi/common/include/linux pci.h

LinuxKPI: pci: add pci_select_bars() and pci_msix_vec_count()

For pci_select_bars() we use the LinuxKPI internal information, while
for pci_select_bars() we fall back to the native PCI stack.

Needed by a wifi driver.

Reviewed by:    dumbbell
Differential Revision: https://reviews.freebsd.org/D58878

(cherry picked from commit 55c07af60172b211116be47010fc0831aafc99e8)
DeltaFile
+29-0sys/compat/linuxkpi/common/include/linux/pci.h
+29-01 files

FreeBSD/src 0b1dea8sys/compat/linuxkpi/common/include/linux dma-mapping.h, sys/compat/linuxkpi/common/src linux_pci.c

LinuxKPI: implement dma_{alloc,free}_{noncoherent,attrs}

We use one to implement the other given direction stays unused.

This is needed by an upcoming wifi driver.

Reviewed by:    dumbbell
Differential Revision: https://reviews.freebsd.org/D58880

(cherry picked from commit c3fa17a6a331db8aad03e9cb89ba97e1811ab381)
DeltaFile
+50-0sys/compat/linuxkpi/common/src/linux_pci.c
+36-0sys/compat/linuxkpi/common/include/linux/dma-mapping.h
+86-02 files

FreeBSD/src e44083csys/compat/linuxkpi/common/include/linux types.h

LinuxKPI: add typedef for clockid_t

Needed by a wireless driver (not really using it) to compile.

Reviewed by:    dumbbell
Differential Revision: https://reviews.freebsd.org/D58877

(cherry picked from commit 401d0922a4bfcf40d3ae1866a0d90f955264def0)
DeltaFile
+2-0sys/compat/linuxkpi/common/include/linux/types.h
+2-01 files

FreeBSD/src 4909288sys/compat/linuxkpi/common/include/linux interrupt.h pci.h, sys/compat/linuxkpi/common/src linux_pci.c

LinuxKPI: fix argument type to lkpi_pci_msi_desc_alloc()

lkpi_pci_msi_desc_alloc() takes an unsigned int, not an int.
While here make sure the prototype is visibile in interrupt.h as
well before use to avoid -Wimplicit-function-declaration errors.

Discovered while working on a wireless driver.

Reviewed by:    dumbbell
Differential Revision: https://reviews.freebsd.org/D58879

(cherry picked from commit cfb23b01e269e8a0a84066637b82b746f01b46b4)
DeltaFile
+2-1sys/compat/linuxkpi/common/include/linux/pci.h
+1-1sys/compat/linuxkpi/common/src/linux_pci.c
+1-0sys/compat/linuxkpi/common/include/linux/interrupt.h
+4-23 files

FreeBSD/src c1a87absys/compat/linuxkpi/common/include/linux rculist.h

LinuxKPI: rcu: add optional condition to list_for_each_entry_rcu()

list_for_each_entry_rcu() can take an optional condition.  Add the
macro argument so code remains compiling but do not do anything with
it just yet.

Leave comments as list_for_each_entry_rcu() likely should have a
different implementation.

Sponsored by:   The FreeBSD Foundation
Reviewed by:    dumbbell
Differential Revision: https://reviews.freebsd.org/D59292

(cherry picked from commit e975ce86ff11a330128f5b21c7cd11c28d3aff87)
DeltaFile
+4-2sys/compat/linuxkpi/common/include/linux/rculist.h
+4-21 files