FreeBSD/src 6ba2f08bin/ls ls.c

ls: --group-directories requires stat information

Fixes:  8b92977857f8
DeltaFile
+4-4bin/ls/ls.c
+4-41 files

FreeBSD/src 6f0c293sys/powerpc/powerpc cpu.c

Fix latency spikes on return from stop on POWER9+

On POWER9 and higher platforms, cpu_idle_power9() directly control the external
interrupt enable lines when entering / exiting stop states.  This does not
provide needed information to the rest of the kernel regarding the core going
into a stop state, and results in random, significant latency spikes (>200ms)
due to the stopped core not receiving wakeup interrupts in a deterministic
manner.

Bring cpu_idle_power9() in line with cpu_idle_powerx() by using spinlock
entry / exit to control the interrupt state vs. direct MSR read / write.

Signed-off-by: Timothy Pearson <tpearson at raptorengineering.com>
DeltaFile
+19-10sys/powerpc/powerpc/cpu.c
+19-101 files

FreeBSD/src 58f7730sys/powerpc/powerpc cpu.c

Add machdep.cpu_idle_max_stop_state tunable

Multiple idle and deep sleep states are supported on Power7+ platforms, with
each state having a characteristic latency and effect on system real-time
performance.

Add a tunable to allow a maximum sleep state (maximum theoretical sleep-related
latency) to be set, in order to better support specific latency-sensitive
applications / real time workloads.

Signed-off-by: Timothy Pearson <tpearson at raptorengineering.com>
DeltaFile
+39-1sys/powerpc/powerpc/cpu.c
+39-11 files

FreeBSD/src c669b08sys/vm vm_phys.c vm_page.c

vm_phys: reduce touching of page->pool fields

Change the usage of the pool field in vm_page structs.

Currently, every page belongs to a pool, and the pool field identifies
that pool, whether the page is allocated or free.

With this change, the pool field of the first page of a free block is
used by the buddy allocator to identify its pool, but the buddy
allocator makes no guarantees about the pool field value for allocated
pages. The buddy allocator requires that a pool parameter be passed as
part of freeing memory. A function that allocates memory may use the
pool field of a page to record what pool to pass as that parameter
when the memory is freed, but might not need to do so for every
allocated page.

Suggested by:   alc
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D45409
DeltaFile
+66-57sys/vm/vm_phys.c
+50-47sys/vm/vm_page.c
+20-15sys/vm/vm_reserv.c
+3-3sys/vm/vm_phys.h
+1-1sys/vm/vm_kern.c
+140-1235 files

FreeBSD/src 6d48eaftools/build checkstyle9.pl

checkstyle9.pl: don't require Signed-off-by for committers

Silence the warning about Signed-off-by: lines if the Author: is using a
FreeBSD.org address.  We don't require the lines in direct FreeBSD
commits so the warning is just noise in this case.

Reviwed by:     imp, emaste
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1577
DeltaFile
+6-1tools/build/checkstyle9.pl
+6-11 files

FreeBSD/src 81b076etests/sys/netinet fibs_test.sh

fibs tests: Fix test failures and simplify

The tests previously expected the invoker to pass a list of FIBs to use.
However, they now run in separate VNET jails, so we can simply expand
the FIB array as needed in each test.  Modify each test to simply set
net.fibs as needed and grab FIB numbers starting at 1.

A number of tests were also broken by commit 9206c7996198
("usr.bin/netstat: -n should not print symbolic names"), so fix those.

Reviewed by:    asomers
Fixes:          9206c7996198 ("usr.bin/netstat: -n should not print symbolic names")
MFC after:      2 weeks
Sponsored by:   Klara, Inc.
Sponsored by:   Stormshield
Differential Revision:  https://reviews.freebsd.org/D48585
DeltaFile
+12-31tests/sys/netinet/fibs_test.sh
+12-311 files

FreeBSD/src 0fb33e0share/mk bsd.cpu.mk

bsd.cpu.mk: Add _CPUFLAGS to CXXFLAGS as well

PR: 180365
Reviewed by: imp
Sponsored by: Netflix
DeltaFile
+1-0share/mk/bsd.cpu.mk
+1-01 files

FreeBSD/src cc6d72cshare/mk bsd.cpu.mk

bsd.cpu.mk: Remove xscale reference

We've retired all the armv5te support, so we don't need this here anymore.

Sponsored by:           Netflix
DeltaFile
+1-5share/mk/bsd.cpu.mk
+1-51 files

FreeBSD/src c8b89c1usr.sbin/periodic periodic.sh periodic.conf

periodic: set _localbase for periodic scripts from within periodic.conf

Set _localbase variable from within /etc/defaults/periodic.conf
for use by periodic scripts.

This fixes e5d7100c09, no other functional changes intended.

Reported by:            gahr, otis
Reviewed by:            markj, gahr
MFC after:              2 weeks
Differential Revision:  https://reviews.freebsd.org/D47486
DeltaFile
+4-8usr.sbin/periodic/periodic.sh
+9-0usr.sbin/periodic/periodic.conf
+13-82 files

FreeBSD/src 8d5d973sbin/kldstat kldstat.8

kldstat.8: Polish options

+ Align and alphabetize options
+ -q: s/Only/Quietly/ for search
+ Tag SPDX

MFC after:              3 days
Reviewed by:            gbe, carlavilla, mhorne
Approved by:            carlavilla, mhorne (mentors)
Differential Revision:  https://reviews.freebsd.org/D48325
DeltaFile
+11-9sbin/kldstat/kldstat.8
+11-91 files

FreeBSD/src 347eb42usr.sbin/bsdinstall/scripts zfsboot

bsdinstall/zfsboot: Remove unused global variable

In an AMA session on the FreeBSD Discord, it was revealed that no
logic remains calling GPART_BOOTCODE_PARTONLY. It was removed in
aa2a0e0fc311 for FreeBSD 12. git grep shows no other references.
No functional change intended.

MFC after:              2 weeks
Fixes:                  aa2a0e0fc311 (Enable new UEFI+GELI support)
Reported by:            Antranig Vartanian <antranigv at freebsd.am>
Reviewed by:            emaste, mhorne
Approved by:            emaste, mhorne (src)
Approved by:            mhorne, carlavilla (mentors)
Differential Revision:  https://reviews.freebsd.org/D48086
DeltaFile
+0-1usr.sbin/bsdinstall/scripts/zfsboot
+0-11 files

FreeBSD/src c19f1adsys/dev/pci pci_host_generic.c

pci_host_generic: Use SYS_RES_MEMORY for the parent of I/O resource ranges

When a SYS_RES_IOPORT resource crosses a pci_host_generic bridge, it
is translated into a memory access for an associated range, so use
SYS_RES_MEMORY for the resource allocated from the parent.

Tested by:      markj
Differential Revision:  https://reviews.freebsd.org/D44207
DeltaFile
+8-13sys/dev/pci/pci_host_generic.c
+8-131 files

FreeBSD/src 010ee82lib/libsys setfib.2

setfib.2: Note that the number of FIBs can be adjusted after boot

Reviewed by:    zlei, imp
MFC after:      2 weeks
Sponsored by:   Klara, Inc.
Sponsored by:   Stormshield
Differential Revision:  https://reviews.freebsd.org/D48545
DeltaFile
+9-4lib/libsys/setfib.2
+9-41 files

FreeBSD/src 960c5bbsys/net if_vxlan.c

if_vxlan(4): Invoke vxlan_stop event handler only when the interface is configured

It is harmless but pointless to invoke vxlan_stop event handler when the
interface was not previously configured. This change will also prevent
an assert panic from t4_vxlan_stop_handler().

Reviewed by:    kib
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D48494
DeltaFile
+6-2sys/net/if_vxlan.c
+6-21 files

FreeBSD/src 0ec9398usr.sbin/makefs/tests makefs_zfs_tests.sh, usr.sbin/makefs/zfs fs.c

makefs: Handle special file types when creating a zpool

Previously, anything other than a regular file, directory or symlink
would cause makefs to exit with an assertion failure.  Make it a bit
more resilient to user error: print a warning and skip the file.  Add a
regression test wherein we create an image from a devfs mount.

PR:             283583
MFC after:      2 weeks

(cherry picked from commit ce878284318e71217d8d8f43f7d590b6c338d3aa)
DeltaFile
+32-7usr.sbin/makefs/zfs/fs.c
+22-0usr.sbin/makefs/tests/makefs_zfs_tests.sh
+54-72 files

FreeBSD/src 4b04f5dusr.bin/xinstall xinstall.c

install: Fix METALOG ouptut for numeric -o and -g args

install's -o and -g flags both accept a name or a numeric argument.
In -U -M (non-root METALOG) mode it always emitted uname= and gname= in
the METALOG, but these are not appropriate for numeric IDs.

If the -o and/or -u arguments parse as an ID, emit uid= and/or gid=
respectively.

Note that if an argument is valid as both a name and numeric ID we will
prefer the name in normal (non -U -M) mode and the ID in -U -M mode.  We
don't want to require a passwd db in non-root mode, and entirely-numeric
user or group names are a terrible idea so just accept this discrepancy.

PR:             284119
Reviewed by:    jlduran
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48504
DeltaFile
+16-4usr.bin/xinstall/xinstall.c
+16-41 files

FreeBSD/src ecf605dsys/dev/hid hid.c hid.h

hid: Correctly handle signed/unsigned quantities in kernel HID parser.

Wrong signedness of usage value results in inverted range check in hmt(4)
driver that allows out of bound array access leading to panic.

Reported by:    many
Sponsored by:   Future Crew, LLC
Obtained from:  NetBSD
NetBSD PR:      kern/53605
PR:             274014, 282592

(cherry picked from commit 38b67578fb4bbf568f7012ca3921a4d15cfe7c5d)
(cherry picked from commit 1dda3a6ed9c51adc908fee4db5917b1232fa932c)
DeltaFile
+48-43sys/dev/hid/hid.c
+16-16sys/dev/hid/hid.h
+64-592 files

FreeBSD/src 1dda3a6sys/dev/hid hid.c hid.h

hid: Correctly handle signed/unsigned quantities in kernel HID parser.

Wrong signedness of usage value results in inverted range check in hmt(4)
driver that allows out of bound array access leading to panic.

Reported by:    many
Sponsored by:   Future Crew, LLC
Obtained from:  NetBSD
NetBSD PR:      kern/53605
PR:             274014, 282592

(cherry picked from commit 38b67578fb4bbf568f7012ca3921a4d15cfe7c5d)
DeltaFile
+48-43sys/dev/hid/hid.c
+16-16sys/dev/hid/hid.h
+64-592 files

FreeBSD/src ffcefe5sys/dev/sound/pcm channel.h channel.c

sound: Make CHN_REMOVE_SAFE() the default

Commit 27b932e32fab ("sound: Safely remove channel from list in one
pass") optimized CHN_REMOVE_SAFE() to perform almost equally to
CHN_REMOVE(), so we can turn CHN_REMOVE_SAFE() into CHN_REMOVE() without
fears of performance regressions, while also being more robust.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    dev_submerge.ch
Differential Revision:  https://reviews.freebsd.org/D48249
DeltaFile
+1-4sys/dev/sound/pcm/channel.h
+1-1sys/dev/sound/pcm/channel.c
+2-52 files

FreeBSD/src 27b932esys/dev/sound/pcm channel.h

sound: Safely remove channel from list in one pass

The CHN_REMOVE_SAFE() macro did two traversals of the channel list to
remove a channel, one to check whether the channel is an element of the
list, and a second traversal through SLIST_REMOVE(). Reduce this to one
traversal, while still preventing a NULL dereference in case the channel
in question is not present in the list.

While here, rename the macro arguments to something more descriptive.

MFC after:      1 week
Reviewed by:    christos
Differential Revision:  https://reviews.freebsd.org/D48207
DeltaFile
+15-10sys/dev/sound/pcm/channel.h
+15-101 files

FreeBSD/src 27ef5d4sys/dev/sound/pcm sound.h, tests/sys/sound pcm_read_write.c Makefile

sound: Unit test the pcm sample read and write macros

Main goal is to have a unit test, with sample test data that is verified
against the current macro implementation of pcm sample read and write
functions. With a test in place, we can proceed on a planned refactoring
of the sample read and write code, and confidently check the new code
for regressions.

Implementation of the unit test itself has to avoid any cast or
conversion affected by endianness, to make the tests compatible with all
machine architectures.

MFC after:      1 week
Reviewed by:    christos, markj
Differential Revision:  https://reviews.freebsd.org/D48330
DeltaFile
+509-0tests/sys/sound/pcm_read_write.c
+64-64sys/dev/sound/pcm/sound.h
+4-0tests/sys/sound/Makefile
+577-643 files

FreeBSD/src edc19f8sys/netlink/route rt.c

netlink: restore the ability to delete PINNED routes

route(8) had such ability before migration to netlink. To be able
to delete PINNED routes we pass RTM_F_FORCE to rib_del_route_px()
when userland uses RTF_PINNED flag with RTM_DELETE command.
This is hackish way for route(8) tool, that third-party software
usually doesn't use.

PR:             279988
Tested by:      franco at opnsense org
Discussed with: glebius
Differential Revision:  https://reviews.freebsd.org/D46301

(cherry picked from commit 3ce003c8b6151f7764b7934de11c789d6b84ee5c)
DeltaFile
+2-1sys/netlink/route/rt.c
+2-11 files

FreeBSD/src e98f79csys/netpfil/ipfw ip_fw_dynamic.c

ipfw: use only needed TCP flags for state tracking

This fixes stateful firewall failures  after adding TH_AE flag
into TH_FLAGS.

Reported by:    ronald
Fixes:          347dd05

(cherry picked from commit 9ea8d692f4cb552902b9e8394260d7f3cf4aefb0)
DeltaFile
+2-1sys/netpfil/ipfw/ip_fw_dynamic.c
+2-11 files

FreeBSD/src e29ffd4sys/netlink/route rt.c

netlink: restore the ability to delete PINNED routes

route(8) had such ability before migration to netlink. To be able
to delete PINNED routes we pass RTM_F_FORCE to rib_del_route_px()
when userland uses RTF_PINNED flag with RTM_DELETE command.
This is hackish way for route(8) tool, that third-party software
usually doesn't use.

PR:             279988
Tested by:      franco at opnsense org
Discussed with: glebius
Differential Revision:  https://reviews.freebsd.org/D46301

(cherry picked from commit 3ce003c8b6151f7764b7934de11c789d6b84ee5c)
DeltaFile
+2-1sys/netlink/route/rt.c
+2-11 files

FreeBSD/src 7dc4805sys/netpfil/ipfw ip_fw_dynamic.c

ipfw: use only needed TCP flags for state tracking

This fixes stateful firewall failures after adding TH_AE flag
into TH_FLAGS.

Reported by:    ronald
Fixes:          347dd05

(cherry picked from commit 9ea8d692f4cb552902b9e8394260d7f3cf4aefb0)
DeltaFile
+2-1sys/netpfil/ipfw/ip_fw_dynamic.c
+2-11 files

FreeBSD/src 8f6b66asys/riscv/include cpufunc.h, sys/riscv/vmm vmm_fence.c vmm_sbi.c

riscv vmm: implement SBI RFNC extension.

The RISC-V SBI (Supervisor Binary Interface) RFNC (fence) extension is used
to provide a standardized mechanism for enforcing memory and I/O ordering
between different execution contexts or cores in a system. Specifically, it
allows supervisors (such as an operating system kernel) to request certain
synchronization operations across CPUs or harts (hardware threads) via the
SBI.

Differential Revision:  https://reviews.freebsd.org/D48441
DeltaFile
+208-0sys/riscv/vmm/vmm_fence.c
+41-13sys/riscv/vmm/vmm_sbi.c
+43-0sys/riscv/vmm/vmm_fence.h
+22-0sys/riscv/vmm/riscv.h
+15-0sys/riscv/include/cpufunc.h
+9-0sys/riscv/vmm/vmm_riscv.c
+338-131 files not shown
+339-137 files

FreeBSD/src 18270a7contrib/spleen spleen-32x64.bdf spleen-16x32.bdf

contrib/spleen: Update to Spleen 2.1.0

Merge commit 'e364562a4012d6d9cb334795b97e929cfa2a5dff'
DeltaFile
+5,487-2,363contrib/spleen/spleen-32x64.bdf
+3,009-1,293contrib/spleen/spleen-16x32.bdf
+1,754-742contrib/spleen/spleen-8x16.bdf
+2,362-6contrib/spleen/spleen-12x24.bdf
+1,450-6contrib/spleen/spleen-6x12.bdf
+41-28contrib/spleen/README.md
+14,103-4,4383 files not shown
+14,139-4,4439 files

FreeBSD/src e364562. spleen-32x64.bdf spleen-16x32.bdf

Vendor import of Spleen font 2.1.0
DeltaFile
+5,487-2,363spleen-32x64.bdf
+3,009-1,293spleen-16x32.bdf
+1,754-742spleen-8x16.bdf
+2,362-6spleen-12x24.bdf
+1,450-6spleen-6x12.bdf
+41-28README.md
+14,103-4,4383 files not shown
+14,139-4,4439 files

FreeBSD/src eaede4e. .git-blame-ignore-revs

git-blame-ignore-revs: list rtld-elf reformatting

Sponsored by:   The FreeBSD Foundation
DeltaFile
+5-0.git-blame-ignore-revs
+5-01 files

FreeBSD/src 78b5dadlibexec/rtld-elf/i386 reloc.c

rtld-elf/i386/reloc.c: apply clang-format

Discussed with: emaste, imp
Sponsored by:   The FreeBSD Foundation
Differential revision:  https://reviews.freebsd.org/D48509
DeltaFile
+176-171libexec/rtld-elf/i386/reloc.c
+176-1711 files