FreeBSD/src 61f7813stand defs.mk

stand: Force disable RETPOLINE for boot loaders

Boot loaders do not require speculative execution protection, and may be
too large if enabled.

Reported by:    Shawn Webb
Reviewed by:    dim, imp
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56068
DeltaFile
+1-0stand/defs.mk
+1-01 files

FreeBSD/src 615f1b9sys/amd64/amd64 machdep.c

kern/amd64/machdep: Replace memset in wrmsr_early_safe_end

GENERIC-KASAN kernel failed to boot on a Dell PowerEdge C6615 with
an AMD EPYC 8224P CPU; UEFI BIOS caught a #GP exception with %RIP
in kasan_memset where %GS relative pointer (curthread->td_pflags2)
was dereferenced. Investigation led to wrmsr_early_safe_end which
calls memset to clear early #GP IDT entry. Replacing memset with
__builtin_memset_inline still resulted in the compiler emitting a
call to the memset resolver in GENERIC-KASAN build and the kernel
stil faulted during boot. This version which has been successfully
tested with both GENERIC and GENERIC-KASAN kernels uses memset_early.

Signed-off-by: Kristofer Peterson <kris at tranception.com>
Reviewed-by: kib
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2069
DeltaFile
+1-1sys/amd64/amd64/machdep.c
+1-11 files

FreeBSD/src b1d3252sys/dev/nvmf/controller nvmft_controller.c

nvmf: Fix null ptr reference

Reported by:    Nikolay Denev <ndenev at gmail.com>
Reviewed by:    imp, jhb
Differential Revision:  https://reviews.freebsd.org/D55863

(cherry picked from commit 09c5bb35425bc70573c007e7f7e82be286677a87)
DeltaFile
+1-1sys/dev/nvmf/controller/nvmft_controller.c
+1-11 files

FreeBSD/src 930a790share/man/man4 rge.4, sys/dev/rge if_rge_sysctl.c if_rge.c

rge: make rx_process_limit a sysctl tunable

The number of packets processed per interrupt was hardcoded to 16.
Add a per-interface sysctl dev.rge.%d.rx_process_limit tunable so
users can adjust this value at runtime.

Signed-off-by: Christos Longros <chris.longros at gmail.com>

Reviewed by:    ziaee, adrian
Differential Revision:  https://reviews.freebsd.org/D56014
DeltaFile
+5-0share/man/man4/rge.4
+5-0sys/dev/rge/if_rge_sysctl.c
+2-1sys/dev/rge/if_rge.c
+2-0sys/dev/rge/if_rgevar.h
+14-14 files

FreeBSD/src 8f36a01share/man/man4 rge.4

rge.4: fix incorrect speed range in HARDWARE section

The HARDWARE section stated "PCIe 1GB to 1GB Ethernet devices"
which is incorrect. The RTL8125/8126/8127 chips support speeds
from 1Gbps to 10Gbps. Correct the range.

Signed-off-by: Christos Longros <chris.longros at gmail.com>

rge.4: note that the driver manages PHY directly

The rge(4) driver does not use the miibus(4) interface for PHY
management. Instead, it accesses PHY registers directly via the
chip's OCP (On-Chip Peripheral) bus. Document this in the
DESCRIPTION section.

Signed-off-by: Christos Longros <chris.longros at gmail.com>

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D55995
DeltaFile
+17-2share/man/man4/rge.4
+17-21 files

FreeBSD/src f7fd4e7sys/dev/rge if_rge.c if_rgevar.h

rge: handle interface flags changes

Handle interface flags like other drivers do.

Reviewed by:    zlei, adrian
Differential Revision:  https://reviews.freebsd.org/D55728
DeltaFile
+9-14sys/dev/rge/if_rge.c
+2-0sys/dev/rge/if_rgevar.h
+11-142 files

FreeBSD/src 151ae09lib/libc/stdlib realpath.c

realpath: Improve prev_len logic

* Save prev_len after having checked for and appended a trailing slash,
  not before.  This requires us to back up if we end up returning a
  partial result, but previously we would sometimes return a partial
  result with a trailing slash and sometimes without.

* Replace strlcat() with a faster strlcpy() since we know exactly how
  far into the buffer we are.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D55914

(cherry picked from commit 99d295e471bc362a7927047c89472e1ee2d0da6b)
DeltaFile
+7-3lib/libc/stdlib/realpath.c
+7-31 files

FreeBSD/src f5b8309lib/libc/stdlib realpath.3

realpath: Improve manual page

* Try to make the RETURN VALUES section flow better.

* Add basename(3), dirname(3), free(3) to the SEE ALSO section.

* Drop the CAVEATS section, which was obsolete the moment realpath(3)
  was added to the Single Unix Specification in 1994.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D55928

(cherry picked from commit 1aecb32021ce46d812db36b9037cdc6f423575f9)
DeltaFile
+12-24lib/libc/stdlib/realpath.3
+12-241 files

FreeBSD/src 8e987f8lib/libc/stdlib realpath.3

realpath: Improve manual page

* Try to make the RETURN VALUES section flow better.

* Add basename(3), dirname(3), free(3) to the SEE ALSO section.

* Drop the CAVEATS section, which was obsolete the moment realpath(3)
  was added to the Single Unix Specification in 1994.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D55928

(cherry picked from commit 1aecb32021ce46d812db36b9037cdc6f423575f9)
DeltaFile
+12-24lib/libc/stdlib/realpath.3
+12-241 files

FreeBSD/src f174c04lib/libc/stdlib realpath.c

realpath: Improve prev_len logic

* Save prev_len after having checked for and appended a trailing slash,
  not before.  This requires us to back up if we end up returning a
  partial result, but previously we would sometimes return a partial
  result with a trailing slash and sometimes without.

* Replace strlcat() with a faster strlcpy() since we know exactly how
  far into the buffer we are.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D55914

(cherry picked from commit 99d295e471bc362a7927047c89472e1ee2d0da6b)
DeltaFile
+7-3lib/libc/stdlib/realpath.c
+7-31 files

FreeBSD/src 41474e7usr.bin/m4 eval.c look.c

m4: Misc style fixes

MFC after:      1 week

Reviewed by:    fuz
Differential Revision:  https://reviews.freebsd.org/D55794
DeltaFile
+9-9usr.bin/m4/eval.c
+9-8usr.bin/m4/look.c
+5-7usr.bin/m4/misc.c
+2-3usr.bin/m4/main.c
+1-1usr.bin/m4/mdef.h
+1-1usr.bin/m4/expr.c
+27-296 files

FreeBSD/src f8f6f1cusr.bin/m4 eval.c mdef.h

m4: Stop abbreviating builtin names

* Stop abbreviating macro names half-randomly to 8 chars, this is no
  longer 1990.

* Likewise for function names (in particular use doindex for a function
  that is notably different from the classic index function).

* Rename a few things for more fidelity: eval is the builtin name, not
  expr and your maketemp/mkstemp conform to mkstemp semantics for better
  security.

* Rewrap a few comments that were ludicrously short.

No functional changes except improved accuracy of some error messages.

MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D55793
DeltaFile
+86-98usr.bin/m4/eval.c
+44-44usr.bin/m4/mdef.h
+33-32usr.bin/m4/main.c
+3-3usr.bin/m4/look.c
+1-1usr.bin/m4/misc.c
+1-1usr.bin/m4/extern.h
+168-1796 files

FreeBSD/src 769a6f8sys/netinet tcp_usrreq.c

tcp_usrreq: Only allocate TFO counter when required

During tcp_usr_listen(), only allocate TFO counter when required.

Reviewed by: tuexen, glebius
Differential Revision: https://reviews.freebsd.org/D56067
DeltaFile
+8-8sys/netinet/tcp_usrreq.c
+8-81 files

FreeBSD/src cd05c88. ObsoleteFiles.inc, tests/sys/netinet tcp_socket.c tcp_implied_connect.c

tests/netinet: add test for getsockname() on a disconnected TCP socket

Stack it into existing file that exercises an other corner case of our
TCP and rename the file to a more generic name.
DeltaFile
+113-0tests/sys/netinet/tcp_socket.c
+0-80tests/sys/netinet/tcp_implied_connect.c
+3-0ObsoleteFiles.inc
+1-1tests/sys/netinet/Makefile
+117-814 files

FreeBSD/src e2083e8sys/conf files, sys/dev/ufshci ufshci_acpi.c ufshci_ctrlr.c

ufshci: Support ACPI

Supports UFS host controller attachment via ACPI. Tested on the
Samsung Galaxy Book 4 Edge using Qualcomm Snapdragon X Elite.
Additionally, a quirk related to power mode change has been added.

For reference, it doesn't reach maximum speed yet. I plan to improve
it later.

Sponsored by:           Samsung Electronics
Reviewed by:            imp (mentor)
Differential Revision:  https://reviews.freebsd.org/D55986
DeltaFile
+248-0sys/dev/ufshci/ufshci_acpi.c
+62-9sys/dev/ufshci/ufshci_ctrlr.c
+9-3sys/dev/ufshci/ufshci_private.h
+2-1sys/conf/files
+3-0sys/modules/ufshci/Makefile
+324-135 files

FreeBSD/src 0850284share/man/man4 ufshci.4, sys/dev/ufshci ufshci_sysctl.c ufshci_dev.c

ufshci: add uic powermode parameter to sysctl

Adds parameters related to the performance of the UFS device.
Also update man page for the missing sysctl entries.

Sponsored by:           Samsung Electronics
Reviewed by:            imp (mentor)
Differential Revision:  https://reviews.freebsd.org/D55985
DeltaFile
+30-5sys/dev/ufshci/ufshci_sysctl.c
+33-1share/man/man4/ufshci.4
+7-5sys/dev/ufshci/ufshci_dev.c
+1-2sys/dev/ufshci/ufshci_pci.c
+2-1sys/dev/ufshci/ufshci_private.h
+73-145 files

FreeBSD/src c438698sys/dev/ufshci ufshci_req_sdb.c

ufshci: fix bug in ufshci_req_sdb_enable

When enabling the request queue, safely reset the list base address.
This was added due to a quirk in the Qualcomm UFS controller during
the process of activating it.

Sponsored by:           Samsung Electronics
Reviewed by:            imp (mentor)
Differential Revision:  https://reviews.freebsd.org/D55984
DeltaFile
+36-4sys/dev/ufshci/ufshci_req_sdb.c
+36-41 files

FreeBSD/src 82a066bsys/conf files

snd_dummy: Fix sys/conf/files entry

Fixes:          72e85a4d977e ("snd_dummy: Add to sys/conf/files and sys/conf/NOTES")
Report by:      CI
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    emaste
Differential Revision:  https://reviews.freebsd.org/D56065
DeltaFile
+1-1sys/conf/files
+1-11 files

FreeBSD/src cbac897sys/netinet6 in6_mcast.c

in6_mcast: Acquire ref to ifp and exit epoch earlier in sysctl

This patch reduces the number of witness warnings during ifmcstat(8) calls.

Reviewed by: glebius, zlei
Differential Revision: https://reviews.freebsd.org/D56052
DeltaFile
+4-4sys/netinet6/in6_mcast.c
+4-41 files

FreeBSD/src e6a77f8sys/fs/cd9660 cd9660_rrip.c

cd9660: Partial style sweep of Rock Ridge code

This mostly just fixes indentation and continuations and adds spaces
after commas and around binary operators and parentheses around return
values, but cd9660_rrip_extref() was so egregiously unreadable I
rewrote it.  Note that this was done manually, so I may have missed a
few spots, and I made no attempt to fix over-long lines.

MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55865
DeltaFile
+96-90sys/fs/cd9660/cd9660_rrip.c
+96-901 files

FreeBSD/src fa03f93contrib/file/magic/Magdir filesystems

file: Parse some UFS2 flags

This allows libmagic to recognize the FS_DOSOFTDEP, FS_SUJ, FS_GJOURNAL,
FS_ACLS, and FS_NFS4ACLS flags on a UFS2 file system.

Accepted upstream as 482259e5e952.

MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56010
DeltaFile
+5-0contrib/file/magic/Magdir/filesystems
+5-01 files

FreeBSD/src 828de70usr.sbin/syslogd syslogd.c

syslogd: Allow killing when in foreground

Normally, syslogd reacts only to SIGTERM, and ignores SIGINT and SIGQUIT
unless in debug mode.  Extend that to also apply when running in the
foreground.  Take this opportunity to comment the event loop.

MFC after:      1 week
Reviewed by:    jfree
Differential Revision:  https://reviews.freebsd.org/D55886
DeltaFile
+8-2usr.sbin/syslogd/syslogd.c
+8-21 files

FreeBSD/src 2e1cf24sys/dev/sound/pcm channel.h

sound: Remove unimplemented chn_reinit() definition

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+0-1sys/dev/sound/pcm/channel.h
+0-11 files

FreeBSD/src d048cecsys/dev/sound/pcm ac97.c

sound: Remove dead code in pcm/ac97.c

ac97_uninitmixer() does not exist also.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D56045
DeltaFile
+0-4sys/dev/sound/pcm/ac97.c
+0-41 files

FreeBSD/src 72e85a4sys/conf NOTES files

snd_dummy: Add to sys/conf/files and sys/conf/NOTES

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D56040
DeltaFile
+2-0sys/conf/NOTES
+1-0sys/conf/files
+3-02 files

FreeBSD/src 127aa05sys/dev/sound/pcm channel.c matrix.h

sound: Retire CHN_SETVOLUME() and use chn_setvolume_matrix()

CHN_SETVOLUME() is just a wrapped around chn_setvolume_matrix() anyway,
so use it directly.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55992
DeltaFile
+2-2sys/dev/sound/pcm/channel.c
+1-2sys/dev/sound/pcm/matrix.h
+0-2sys/dev/sound/pcm/channel.h
+3-63 files

FreeBSD/src f190fadsys/dev/sound sndstat.c, sys/dev/sound/pcm dsp.c mixer.c

sound: Retire CHN_GETVOLUME() and use chn_getvolume_matrix()

CHN_GETVOLUME() is just a wrapped around chn_getvolume_matrix() anyway,
so use it directly.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55991
DeltaFile
+4-4sys/dev/sound/pcm/dsp.c
+2-2sys/dev/sound/pcm/mixer.c
+2-2sys/dev/sound/sndstat.c
+0-1sys/dev/sound/pcm/channel.h
+8-94 files

FreeBSD/src edad981sys/dev/sound/pcm ac97.c

sound: Address some XXX comments regarding AC'97 IDs

These seem harmless to address. Not sure why the original author did not
just assign the appropriate names if he knew they were wrong.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D56044
DeltaFile
+2-12sys/dev/sound/pcm/ac97.c
+2-121 files

FreeBSD/src 6b91c8dsys/dev/sound/pcm feeder_rate.c

sound: Retire Z_PARANOID

It is always defined.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D56042
DeltaFile
+0-6sys/dev/sound/pcm/feeder_rate.c
+0-61 files

FreeBSD/src 71c46c8sys/tools/sound emu10k1-mkalsa.sh

sound: Retire unused emu10k1-mkalsa.sh

It is a legacy script which is no longer used. Its utility is also
unknown.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D56043
DeltaFile
+0-20sys/tools/sound/emu10k1-mkalsa.sh
+0-201 files