FreeBSD/src fd72ef8sys/amd64/amd64 initcpu.c

amd64 initializecpu(): use 64bit type for rcr4() result

(cherry picked from commit 6099b4600256552fc6f664c82b7dd0325a4b5b19)
DeltaFile
+1-1sys/amd64/amd64/initcpu.c
+1-11 files

FreeBSD/src 756500fsys/conf kern.post.mk

kern.post.mk: Replace "mkdir -p" with "install -d"

to create the 'dir' entry in METALOG

Signed-off-by: Marian Cingel <cingel.marian at gmail.com>
Reviewed by: imp, kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/1967
DeltaFile
+1-1sys/conf/kern.post.mk
+1-11 files

FreeBSD/src e75c8fausr.sbin/virtual_oss/virtual_oss virtual_oss.c

virtual_oss: Use virtual_oss_timestamp() to avoid duplication

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+13-16usr.sbin/virtual_oss/virtual_oss/virtual_oss.c
+13-161 files

FreeBSD/src 3a41085usr.sbin/virtual_oss/virtual_oss virtual_oss.c

virtual_oss: Use virtual_oss_delay_ns() to avoid duplication

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+1-4usr.sbin/virtual_oss/virtual_oss/virtual_oss.c
+1-41 files

FreeBSD/src 0351c21usr.sbin/virtual_oss/virtual_oss Makefile

virtual_oss(8): Expose ioctl interface

PR:             293545
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days

(cherry picked from commit d15987cc06192f78a31040f2c142bcaf88e8a1ee)
DeltaFile
+2-0usr.sbin/virtual_oss/virtual_oss/Makefile
+2-01 files

FreeBSD/src b5514e1tools/build depend-cleanup.sh

depend-cleanup.sh: rebuild strnlen.o on riscv64 if it came from strnlen.S

We have to switch back to the previous rule once the temporary
build fix has been replaced with a permanent fix.

MFC after:      1 week
See also:       2a4e3112c811b9892e14e15cfd23538e7e47329c
PR:             293353, 293296
DeltaFile
+4-1tools/build/depend-cleanup.sh
+4-11 files

FreeBSD/src 2a4e311lib/libc/riscv/string Makefile.inc

libc/riscv64: temporarily disable strnlen() implementation until a fix is developed

strnlen() doesn't seem to cope well with a length argument such that
string pointer plus length overflows past the end of the address space.

Reviewed by:    fuz
MFC after:      1 week
PR:             293353, 293296
Differential Revision:  https://reviews.freebsd.org/D55714
DeltaFile
+0-1lib/libc/riscv/string/Makefile.inc
+0-11 files

FreeBSD/src fa4f625sys/dev/acpi_support acpi_system76.c

acpi_system76: unbreak LINT

Reported by: tinderbox
Fixes: cdad55809ef5 ("acpi_system76: Support for ...")
Differential Revision: https://reviews.freebsd.org/D55694
DeltaFile
+2-0sys/dev/acpi_support/acpi_system76.c
+2-01 files

FreeBSD/src cdad558sys/conf files, sys/dev/acpi_support acpi_system76.c

acpi_system76: Support for acpi-controlled buttons on System76

Add acpi_system76 for handling acpi-controlled buttons
on System76 Laptops.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D55694
DeltaFile
+359-0sys/dev/acpi_support/acpi_system76.c
+7-0sys/modules/acpi/acpi_system76/Makefile
+3-0sys/x86/conf/NOTES
+1-0sys/conf/files
+1-0sys/modules/acpi/Makefile
+371-05 files

FreeBSD/src e409e51sys/amd64/include pmc_mdep.h, sys/i386/include pmc_mdep.h

hwpmc: Remove left over k7, xscale and p4 references pmc

Support for these processors was removed a few years ago, but a few
references remain that should be removed.

Sponsored by: Netflix
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2039
DeltaFile
+1-3sys/i386/include/pmc_mdep.h
+0-2sys/sys/pmc.h
+0-1sys/amd64/include/pmc_mdep.h
+1-63 files

FreeBSD/src 3570b19bin/uuidgen uuidgen.c uuidgen.1, sys/kern kern_uuid.c

uuidgen: generate UUIDs in bounded batches to respect kernel limit

The uuidgen(2) system call enforces a hard upper limit of 2048 UUIDs per
invocation. uuidgen(1) previously attempted to generate arbitrary counts
in a single call and allocated memory accordingly, leading to EINVAL
errors, unnecessary memory usage, and potential overflow risks.

Generate UUIDs in fixed-size batches, streaming output incrementally
while preserving existing semantics. Mirror the kernel limit explicitly
since it is not exposed via a public interface.

Signed-off-by: NVSRahul <nvsrahul at hotmail.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1965
DeltaFile
+44-37bin/uuidgen/uuidgen.c
+6-0sys/sys/uuid.h
+0-4bin/uuidgen/uuidgen.1
+1-1sys/kern/kern_uuid.c
+51-424 files

FreeBSD/src 895a97clibexec/rc/rc.d zfs

rc.d/zfs: align zfs mount verbosity in host and jail environments

ZFS script runs different startup seqneces depending on where it runs:
on the host (`zfs_start_main()`) or in a jail (`zfs_start_jail()`):

- `zfs_start_main()` mounts ZFS datasets in verbose mode `zfs mount -va`
- `zfs_start_jail()` mounts ZFS datasets silently `zfs mount -a`.

This change aligns the verbose levels.

NO_ISSUE

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2030
DeltaFile
+1-1libexec/rc/rc.d/zfs
+1-11 files

FreeBSD/src cb69951sbin/fsck_msdosfs dir.c

fsck_msdosfs: reduce the scope of dentry deletion

When dentry flag is ATTR_VOLUME because of 1 bit flip(from 0x10 to 0x18),
removede function will delete all dentry from invalid dentry postion,
so some normal dentries will be deleted in the same cluster.Unfortunately,
these normal directories and files will not be visible to the user
after wo do fsck_msdos

Signed-off-by: YangWen <anmuxixixi at gmail.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1694
DeltaFile
+1-1sbin/fsck_msdosfs/dir.c
+1-11 files

FreeBSD/src cecd12asys/dev/asmc asmc.c

use ASMC_FAN_FUNCS2 to avoid trying to read non-existent keys

Signed-off-by: tslight <tslight at pm.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2051
DeltaFile
+1-1sys/dev/asmc/asmc.c
+1-11 files

FreeBSD/src d7922c3libexec/rc debug.sh

Fix debug.sh comment typo

Signed-off-by: Kalevi Kolttonen <kalevi at kolttonen.fi>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2012
DeltaFile
+1-1libexec/rc/debug.sh
+1-11 files

FreeBSD/src 75858ca. .editorconfig

Add .editorconfig

FreeBSD developers use different text editors or sometimes use GUI
editors such as VSCode or Zed on different platforms for convinence.
However, there is lack of unified config for those editors to follow
style(9) including indent rules.

Although most "modern" editors support .editorconfig out of box, basic
editors such as vim needs a plugin for autoloading .editorconfig file.

Sponsored by:   The FreeBSD Foundation

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2024
DeltaFile
+23-0.editorconfig
+23-01 files

FreeBSD/src 3be98a0libexec/rc hooks.sh

Fix hooks.sh comment typo

Signed-off-by: Kalevi Kolttonen <kalevi at kolttonen.fi>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2013
DeltaFile
+1-1libexec/rc/hooks.sh
+1-11 files

FreeBSD/src 16c82e2sys/dev/asmc asmcvar.h asmc.c

Add ASMC support for Macbook Pro 8,3

Signed-off-by: tslight <tslight at pm.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1992
DeltaFile
+33-0sys/dev/asmc/asmcvar.h
+6-0sys/dev/asmc/asmc.c
+39-02 files

FreeBSD/src 9f2eb94tools/build/cross-build/include/linux/sys types.h

Add __unused workaround for linux/sys/types.h

Signed-off-by: Perdixky <3293789706 at qq.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2063
DeltaFile
+3-0tools/build/cross-build/include/linux/sys/types.h
+3-01 files

FreeBSD/src 9006a73bin/ps print.c keyword.c

/bin/ps: Fix display of negative nice values on ARMv7/aarch64

On Arm-based systems (and maybe others), 'char' defaults to unsigned,
causing negative nice values to be displayed incorrectly (e.g., 246
instead of -10). Explicitly using 'signed char' ensures consistent
behaviour across architectures.

[ tested on RPI2 and generic aarch64 qemu install ]

Before:
  # /usr/bin/nice --10 ps -l | awk '(NR == 1 || $(NF-1) == "ps")'
  UID   PID  PPID C PRI  NI  VSZ  RSS MWCHAN  STAT TT     TIME COMMAND
    0 23606 22800 2 -32 246 5400 2544 -       R<+   0  0:00.06 ps -l

After:
  # /usr/bin/nice --10 ps -l | awk '(NR == 1 || $(NF-1) == "ps")'
  UID   PID  PPID C PRI  NI  VSZ  RSS MWCHAN  STAT TT     TIME COMMAND
    0 23614 22800 3 -32 -10 5400 2544 -       R<+   0  0:00.05 ps -l


    [3 lines not shown]
DeltaFile
+3-0bin/ps/print.c
+1-1bin/ps/keyword.c
+1-1bin/ps/ps.h
+5-23 files

FreeBSD/src fdc1f34sys/amd64/amd64 apic_vector.S, sys/i386/i386 mp_machdep.c apic_vector.S

x86: change signatures of ipi_{bitmap,swi}_handler() to take pointer

to the frame instead of the frame itself. It is some stretch of the
amd64 ABI, and is not easily fullfilled when handlers are called from C
and not asm. In particular, the struct frame is passed by value but is
modified by callees, with the expectation that the caller will see the
modifications.

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D55679
DeltaFile
+14-0sys/i386/i386/mp_machdep.c
+5-5sys/x86/x86/mp_x86.c
+2-2sys/i386/i386/apic_vector.S
+2-2sys/x86/include/x86_smp.h
+2-2sys/x86/xen/xen_apic.c
+2-0sys/amd64/amd64/apic_vector.S
+27-116 files

FreeBSD/src 74aec9fshare/man/man7 ports.7

ports.7: Document DEFAULT_VERSIONS

MFC after:              3 days
Co-authored-by:         Adam Weinberger <adamw at FreeBSD.org>
Differential Revision:  https://reviews.freebsd.org/D55443
DeltaFile
+4-0share/man/man7/ports.7
+4-01 files

FreeBSD/src 1e4086dshare/man/man9 bus_alloc_resource.9, sys/arm/nvidia tegra_pcie.c

sys: Don't pass RF_ALLOCATED to bus_alloc_resource*

This is a nop as eventually these flags are passed to rman_reserve_resource
which unconditionally sets RF_ALLOCATED in the new flags for a region.
However, it's really a layering violation to use RF_ALLOCATED in relation
to struct resource objects outside of subr_rman.c as subr_rman.c uses
this flag to manage it's internal tracking of allocated vs free regions.

In addition, don't document this as a valid flag in the manual.  I
think the intention here was that if a caller didn't want to pass
RF_ACTIVE or RF_SHAREABLE, they could pass RF_ALLOCATED instead of 0,
but given the layering violation, I think it's best to just pass 0
instead in that case.

NB: The bhnd bus uses RF_ALLOCATED (along with RF_ACTIVE) in a
separate API to manage resource regions that are not struct resource
objects (but a separate wrapper object).  It would perhaps be cleaner
if the chipc_retain_region and chipc_release_region functions used
their own flag constants instead of reusing the rman(9) flags.

    [3 lines not shown]
DeltaFile
+3-7share/man/man9/bus_alloc_resource.9
+2-3sys/arm/nvidia/tegra_pcie.c
+1-1sys/x86/iommu/amd_drv.c
+6-113 files

FreeBSD/src b7a7d51lib/libc/gen uexterr_format.c err.3

Refinements to the output when the EXTERROR_VERBOSE environment is set

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D55494
Sponsored-by: Netflix

(cherry picked from commit 6fd98877de633f5ec6f028e78d5a2d94527d63d0)
DeltaFile
+20-8lib/libc/gen/uexterr_format.c
+7-1lib/libc/gen/err.3
+27-92 files

FreeBSD/src ca25b1busr.sbin/devinfo devinfo.c devinfo.8

devinfo: Support PCI DBSF and ACPI handles for -p

When matching on a name of a device, match on ACPI handles and PCI
selectors in addition to device names.  This can be useful for
matching on devices without an attached driver.

For example: devinfo -p pci0:0:31:0

Reviewed by:    imp
Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D55673
DeltaFile
+57-1usr.sbin/devinfo/devinfo.c
+21-1usr.sbin/devinfo/devinfo.8
+78-22 files

FreeBSD/src 95dd873sys/contrib/dev/iwlwifi/fw/api rx.h, sys/contrib/dev/iwlwifi/mld rx.c d3.c

iwlwifi: update Intel's mvm/mld drivers

This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
05f7e89ab9731565d8a62e3b5d1ec206485eeb0b ( tag: v6.19 ).

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+931-804sys/contrib/dev/iwlwifi/mld/rx.c
+0-809sys/contrib/dev/iwlwifi/mvm/link.c
+359-200sys/contrib/dev/iwlwifi/mld/d3.c
+49-347sys/contrib/dev/iwlwifi/mvm/d3.c
+286-0sys/contrib/dev/iwlwifi/fw/api/rx.h
+175-77sys/contrib/dev/iwlwifi/pcie/gen1_2/trans.c
+1,800-2,237103 files not shown
+3,127-4,432109 files

FreeBSD/src b3d9e50sys/dev/nvme nvme_pci.c

nvme: Don't active memory space until all BARs are configured

In the current current behavior the 2nd and 3rd BARs can be activated
when they're configured with address zero. This change defers the
activation of all BARs until after they've all been configured with an
address.

This enables FreeBSD on Google Compute Engine C4-LSSD Machines.

Sponsored by:           Google
Tested by:              NetApp (previous version)
Reviewed by:            gallatin, imp
Discussed with:         jrtc27 (improved error reporting)
Differential Revision:  https://reviews.freebsd.org/D55541
DeltaFile
+37-7sys/dev/nvme/nvme_pci.c
+37-71 files

FreeBSD/src 815fdbdsys/dev/iwx if_iwx.c

iwx: Re-activate the 32-bit boundary cross check on 64-bit architectures

__SIZEOF_*__ is in bytes, not in bits...

Reported by:    brooks
Fixes:          35da55c28dbb ("iwx: Fix 32-bit compilation")
MFC after:      1 minute
MFC to:         stable/15
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit c1567d49a8320fd23dff9dbce1186f2331538253)
DeltaFile
+3-3sys/dev/iwx/if_iwx.c
+3-31 files

FreeBSD/src af2c7d9share/man/man9 style.9

style.9: Encourage style changes when doing significant modifications

The rule of allowing style changes when about half or more of a file (or
group of files), coupled with the advice of avoiding stylistic changes,
could be interpreted as forbidding most style changes, even in heavily
modified functions.

In order to rule out that interpretation and ease transition towards our
prescribed style:
1. Clarify that avoiding stylistic changes concerns only "standalone"
   ones.
2. Actually encourage changing the style, and extend the cases where it
   is explicitly allowed to do so to any single logical unit as little
   as a function, keeping the existing "about half" of modified code as
   a rule of thumb.

When point 2 above applies, encourage to commit pure style changes
separately, and to add style-only commits to '.git-blame-ignore-revs'.


    [15 lines not shown]
DeltaFile
+30-22share/man/man9/style.9
+30-221 files

FreeBSD/src c1567d4sys/dev/iwx if_iwx.c

iwx: Re-activate the 32-bit boundary cross check on 64-bit architectures

__SIZEOF_*__ is in bytes, not in bits...

Reported by:    brooks
Fixes:          35da55c28dbb ("iwx: Fix 32-bit compilation")
MFC after:      1 minute
MFC to:         stable/15
Sponsored by:   The FreeBSD Foundation
DeltaFile
+3-3sys/dev/iwx/if_iwx.c
+3-31 files