FreeBSD/src 66797b4usr.sbin/pw pw.8

pw.8: spell
DeltaFile
+1-1usr.sbin/pw/pw.8
+1-11 files

FreeBSD/src 2b728d3sys/x86/cpufreq hwpstate_amd.c

hwpstate_amd(4): Move 'struct get_cppc_regs_data' & co. closer to use

No functional change (intended).

Sponsored by:   The FreeBSD Foundation
DeltaFile
+22-22sys/x86/cpufreq/hwpstate_amd.c
+22-221 files

FreeBSD/src c6a0eb7sys/x86/cpufreq hwpstate_amd.c

hwpstate_amd(4): Rename '*set_autonomous_hwp*()' => 'enable_cppc*()'

This is to better reflect that we are really enabling CPPC in these
functions and because we are likely to stop activating CPPC autonomous
mode by default in the near future.

No functional change (intended).

Sponsored by:   The FreeBSD Foundation
DeltaFile
+4-4sys/x86/cpufreq/hwpstate_amd.c
+4-41 files

FreeBSD/src a78e7c2sys/x86/cpufreq hwpstate_amd.c

hwpstate_amd(4): Update copyright

Sponsored by:   The FreeBSD Foundation
DeltaFile
+5-0sys/x86/cpufreq/hwpstate_amd.c
+5-01 files

FreeBSD/src 4285340sys/x86/cpufreq hwpstate_amd.c

hwpstate_amd(4): Style: Align 'machdep.hwpstate_amd_cppc_enable'

Align it like the rest.

No functional change (intended).

Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-1sys/x86/cpufreq/hwpstate_amd.c
+1-11 files

FreeBSD/src ebcd80fsys/x86/cpufreq hwpstate_amd.c

hwpstate_amd(4): Rename PSTATE_CPPC internal flag

While here, also rename check_cppc_enabled() => check_cppc_in_use().

No functional change (intended).

Sponsored by:   The FreeBSD Foundation
DeltaFile
+16-18sys/x86/cpufreq/hwpstate_amd.c
+16-181 files

FreeBSD/src 951788esys/x86/cpufreq hwpstate_amd.c

hwpstate_amd(4): 'epp' sysctl leaf to operate on real EPP hardware values

We were using percents, for compatibility with hwpstate_intel(4), but
this looses granularity that might be important in some scenarios or
with specific CPU models.

For consistency, hwpstate_intel(4) should be changed accordingly, at the
expense of breaking compatibility.

For release notes: Introduction of hwpstate_amd(4) deserves a release
note, even if the original commit was not tagged.  Functionality
introduced by recent commits tagged with "Relnotes" should be mentioned
along that one.

PR:             292615
Reviewed by:    aokblast
Relnotes:       yes
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55009
DeltaFile
+8-13sys/x86/cpufreq/hwpstate_amd.c
+8-131 files

FreeBSD/src cec0ab0sys/x86/cpufreq hwpstate_amd.c

hwpstate_amd(4): Style: Sort headers

And separate includes from the rest with an additional newline.

Sponsored by:   The FreeBSD Foundation
DeltaFile
+5-4sys/x86/cpufreq/hwpstate_amd.c
+5-41 files

FreeBSD/src 7689e68sys/x86/cpufreq hwpstate_amd.c

hwpstate_amd(4): Add knobs to get/set all fields of CPPC_REQUEST

This will allow experimentations and finer-grained tuning to the full
extent allowed by the hardware, which is especially important given that
the spec leaves to hardware implementors an important leeway in
interpreting CPPC's numeric parameters, causing the same settings to
have different effects on different CPU models.

PR:             292615
Reviewed by:    aokblast (older version)
Relnotes:       yes
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55010
DeltaFile
+42-12sys/x86/cpufreq/hwpstate_amd.c
+42-121 files

FreeBSD/src df7b4dcsys/x86/cpufreq hwpstate_amd.c

hwpstate_amd(4): Sane defaults for min/max perf on insane capabilities

If the CPPC_CAPABILITY_1 register stays at its reset value (0) even
after enabling CPPC, as observed in the field (see the referenced PR
below), use sane min/max performance limits as hinted by the ACPI spec,
i.e., all 0s for the minimum value and all 1s for the maximum one.

While here, let's cope upfront with some more insane situations, where
the minimum value would be greater than the maximum one, but also if
they would be equal which does not seem to make sense at all in the CPPC
frame (and, anyway, in this case, the actual minimum and maximum values
we program should have no effect at all).  That last case actually also
covers the one exposed in the previous paragraph.

PR:             292615
Reviewed by:    aokblast
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55007
DeltaFile
+24-5sys/x86/cpufreq/hwpstate_amd.c
+24-51 files

FreeBSD/src 6db204dsys/x86/cpufreq hwpstate_amd.c

hwpstate_amd(4): Factor out setting the CPPC_REQUEST register

In preparation for creating other knobs to tweak values in this register
beyond just the EPP (Efficiency/Performance Preference).

While here, add a herald comment before the softc structure indicating
how we achieve atomicity when modifying the softc.

Reviewed by:    aokblast
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55008
DeltaFile
+71-27sys/x86/cpufreq/hwpstate_amd.c
+71-271 files

FreeBSD/src bd58239sys/x86/cpufreq hwpstate_amd.c

hwpstate_amd(4): attach(): More diagnostic on CPPC enable

When the 'debug.hwpstate_verbose' tunable/sysctl knob is set, dump the
initial content of the CPPC_CAPABILITY_1 and CPPC_REQUEST registers.

If, after enabling CPPC, reading/writing some MSR fails during the attach
sequence, print a diagnostic.  However, once CPPC is enabled, we cannot
go back (disabling it is impossible), so we'll attach even if fiddling
with other MSRs failed.

While here, move diagnostic printing on attach out of the callback that
is executed on (potentially) another CPU and with interrupts disabled,
putting it into the attach routine itself.

While here, fix format for printing the CPU ID.

PR:             292615
Reviewed by:    aokblast (older version)
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55006
DeltaFile
+85-50sys/x86/cpufreq/hwpstate_amd.c
+85-501 files

FreeBSD/src 8aac1e9sys/x86/cpufreq hwpstate_amd.c

hwpstate_amd(4): Register dump: Fine-grained error reporting

If some of the registers cannot be read, report that but continue trying
reading the others.  This also has the side benefit of simplifying code.

While here, use sbuf_new_for_sysctl(), and rename 'res' and 'ret', which
are to contain error values, to 'error'.

While here, remove the test on getting the per-cpu structure, as if it
is not present we would have already crashed on device attach.

While here, fix format for printing the CPU ID.

PR:             292615
Reviewed by:    aokblast (older version)
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55005
DeltaFile
+71-39sys/x86/cpufreq/hwpstate_amd.c
+71-391 files

FreeBSD/src 2f47676sys/dev/qlnx/qlnxe qlnx_os.c ecore_l2.c

qlnxe: Overhaul setting the multicast MAC filters

When operating the multicast MAC filters, the current usage of
ECORE_FILTER_ADD and ECORE_FILTER_REMOVE are rather misleading.
ECORE_FILTER_ADD reads "adding new filter", but it actually removes
any existing filters and then addes a new one. ECORE_FILTER_REMOVE
reads "removing a filter", but it actually removes all filters.
Let's use ECORE_FILTER_REPLACE and ECORE_FILTER_FLUSH instead to
avoid confusion.

In the current implementation, only one MAC address is passed to
ecore_sp_eth_filter_mcast() and any previously installed filters are
removed, hence it breaks the multicast function. That can be observed
via either assigning new IPv6 addresses to the interface or putting
the interface as a member of lagg(4) interface with LACP aggregation
protocol. Fix that by calculating the multicast filter bins directly
from multicast MAC addresses and replace the filters every time
the bins changes.


    [23 lines not shown]
DeltaFile
+37-153sys/dev/qlnx/qlnxe/qlnx_os.c
+21-20sys/dev/qlnx/qlnxe/ecore_l2.c
+3-8sys/dev/qlnx/qlnxe/ecore_vf.c
+4-5sys/dev/qlnx/qlnxe/ecore_l2_api.h
+1-4sys/dev/qlnx/qlnxe/qlnx_def.h
+66-1905 files

FreeBSD/src 572d409sys/dev/qlnx/qlnxe qlnx_os.c

qlnxe: Allow tapping the TX packets

Currently only the packets in the RX path can be captured by tcpdump
as the ETHER_BPF_MTAP call in the TX path is missing. Add it so that
packets in both directions can be captured.

Approved by:    re (cperciva)
PR:             290973
Reviewed by:    kbowling
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D54891

(cherry picked from commit 968647502ec21464ad3aecc7577ff0e8dfd41693)
(cherry picked from commit 425b9cec0b8ce15a6e67d54a73f4f38dc66a4ccc)
(cherry picked from commit ddfe98e8ccb120a0a5c42b2288694ecd2b70c80c)
DeltaFile
+1-0sys/dev/qlnx/qlnxe/qlnx_os.c
+1-01 files

FreeBSD/src 1e23939sys/dev/qlnx/qlnxe qlnx_os.c qlnx_def.h

qlnxe: Refactor setting the promiscuous and allmulti mode

There are two entry points to set the promiscuous and allmulti mode.
One is ioctl, and another is the init routine. Given they share almost
the identical logic, refactor a little to make the code more clear.

While here, for the ioctl, translate the error to EINVAL to avoid
confusing the net stack.

Approved by:    re (cperciva)
Reviewed by:    kbowling
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D54890

(cherry picked from commit 45b1718fadae7d56051ba04ef9d7a175a602a226)
(cherry picked from commit b8d2c1c367465506b66a1696483caec1d04b2ea0)
(cherry picked from commit 00ab0df79364f4567ad61f6a66eba1b2f0a7d507)
DeltaFile
+38-46sys/dev/qlnx/qlnxe/qlnx_os.c
+0-1sys/dev/qlnx/qlnxe/qlnx_def.h
+38-472 files

FreeBSD/src 133eae6sys/modules/qlnx/qlnxev Makefile

qlnxev: Remove now unneeded include for opt_inet.h

Since the change [1], this is not required anymore.

This change partially reverts commit 8a847947153e.

[1] 4012b63889e4 qlnxe: Let ether_ioctl() handle SIOCSIFADDR ioctl

Approved by:    re (cperciva)
Reviewed by:    kbowling
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D54889

(cherry picked from commit ec7950fe42344900567cb72c83845ea4dc5a7114)
(cherry picked from commit 926e44b4983408dd8a4f5d7eb695de75b373548d)
(cherry picked from commit e1a051fd53a026ce6902c5d1df9d99e14e8675d1)
DeltaFile
+0-1sys/modules/qlnx/qlnxev/Makefile
+0-11 files

FreeBSD/src be25693sys/dev/qlnx/qlnxe qlnx_os.c, sys/modules/qlnx/qlnxe Makefile

qlnxe: Let ether_ioctl() handle SIOCSIFADDR ioctl

Since the change [1], the init routine qlnx_init() works as intended.
Let ether_ioctl() handle SIOCSIFADDR to simplify the code.

Combined with the change [1], this shall be a better fix for PR 287445.

[1] c10e6bc0f007 qlnxe: Avoid reinitializing the interface when it is already initialized

Approved by:    re (cperciva)
PR:             287445
Reviewed by:    kbowling
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D54888

(cherry picked from commit 4012b63889e40bb877bc0e4c8da1792bce472c08)
(cherry picked from commit 0f383f74b7398161c12a290e50b060baf45d2800)
(cherry picked from commit 20ffe22fcfe13b48a8e993cbf565f9cd9229a4b3)
DeltaFile
+0-25sys/dev/qlnx/qlnxe/qlnx_os.c
+0-1sys/modules/qlnx/qlnxe/Makefile
+0-262 files

FreeBSD/src 7d0345dsys/dev/qlnx/qlnxe qlnx_os.c

qlnxe: Avoid reinitializing the interface when it is already initialized

qlnx_init_locked() unconditionally uninitialize the interface thus is
actually reinitializing the interface. Well the init routine qlnx_init()
is to initialize the interface by net stack when assigned with the first
inet or inet6 address. The ioctl SIOCSIFADDR for the first inet6 address
is handled by ether_ioctl() thus the interface is reinitialized no matter
it was initialized or not.

Add a driver status check for that to avoid reinitializing. Further plan
is removing SIOCSIFADDR ioctl from the driver and let ether_ioctl() handle
it.

Approved by:    re (cperciva)
Reviewed by:    kbowling
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D54887

(cherry picked from commit c10e6bc0f0079e90cb484323ad71d437f1882422)

    [2 lines not shown]
DeltaFile
+2-1sys/dev/qlnx/qlnxe/qlnx_os.c
+2-11 files

FreeBSD/src 0671ffesys/dev/qlnx/qlnxe qlnx_os.c

qlnxe: Prevent potential concurrency between ioctls

The driver-managed status flags should be lock protected to be touched.
Also this can serialize ioctls those check the IFF_DRV_RUNNING status.

Approved by:    re (cperciva)
Reviewed by:    kbowling
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D54886

(cherry picked from commit 0df8a998a9fe28af659cb401c537c6d785e55f81)
(cherry picked from commit 285b25c080faf71c60de36e834ef31cf70e6b50d)
(cherry picked from commit 6e5b12acb66a9e269801b8d88c8f9838044d631c)
DeltaFile
+9-8sys/dev/qlnx/qlnxe/qlnx_os.c
+9-81 files

FreeBSD/src f8e20e7sys/dev/qlnx/qlnxe qlnx_os.c

qlnxe: Fix setting the unicast MAC filter of RX path

When an Ethernet interface is added to lagg(4) as a child interface, its
type, aka if_type, is changed from IFT_ETHER to IFT_IEEE8023ADLAG. Well
changing the link-layer address of the lagg(4) interface will be
propagated to all child interfaces, hence the drivers of child interfaces
shall not presume the type of the interface will not be changed.

Meanwhile, on initializing, an ifnet has been fully attached and it is
guaranteed to have non-null link-layer address so stop NULL checking for
it.

Approved by:    re (cperciva)
Reviewed by:    kbowling
Fixes:          792226e53023 qlnxe: Allow MAC address override
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D54885

(cherry picked from commit f250852c9a0c1021c3be4b498e27cfc7b42a81db)

    [2 lines not shown]
DeltaFile
+3-13sys/dev/qlnx/qlnxe/qlnx_os.c
+3-131 files

FreeBSD/src 36ebcb4sys/dev/qlnx/qlnxe qlnx_os.c qlnx_def.h

qlnxe: Avoid memcpy with same source and destination

In case the device is VF, qlnx_get_mac_addr() returns ha->primary_mac
hence it ends up memcpy with same source and destination. Refactor
slightly to avoid that.

Approved by:    re (cperciva)
Reviewed by:    kbowling
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D54884

(cherry picked from commit 3aeeedc7e0dc231c16406ff64f4a08a716964c40)
(cherry picked from commit 6462189595047800337aaf052e397d1aade3f9a7)
(cherry picked from commit ea1143bddbc3671f49219a6b2a054965deea0c63)
DeltaFile
+7-6sys/dev/qlnx/qlnxe/qlnx_os.c
+0-1sys/dev/qlnx/qlnxe/qlnx_def.h
+7-72 files

FreeBSD/src 6444869sys/dev/qlnx/qlnxe qlnx_os.c

qlnxe: Remove a pointless copy back from the link-layer address

On ifnet attaching, ether_ifattach() makes the link-layer address by
shadow copying the ha->primary_mac. Well, the link-layer address will
not be altered during attaching, thus it is pointless to copy it back.

No functional change intended.

Approved by:    re (cperciva)
Reviewed by:    kbowling
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D54883

(cherry picked from commit 4ac3081b282800158df7abe93f307d76e1b5b808)
(cherry picked from commit 23ffd1650cc431e762387d384ede99ae085bc130)
(cherry picked from commit 7d7cee09b9a4ac5cbcbac79cb7ccfef5d6db1e0f)
DeltaFile
+0-2sys/dev/qlnx/qlnxe/qlnx_os.c
+0-21 files

FreeBSD/src 7bf81e3bin/ls ls.c, bin/ls/tests ls_tests.sh

ls: check fts_children() for errors that may not surface otherwise

In particular, if one simply does a non-recursive `ls` on a directory
that is not accessible, there are some classes of errors that may cause
it to fail that wouldn't be surfaced unless we do an fts_read() that
will recurse into the inaccessible directory.  Catch those kinds of
errors here since we cannot expect to an FTS_ERR/FTS_DNR entry to follow
up on them.

PR:             287451
Reviewed by:    kib
Discusssed with:        des
Differential Revision:  https://reviews.freebsd.org/D51056
DeltaFile
+30-0bin/ls/tests/ls_tests.sh
+17-0bin/ls/ls.c
+47-02 files

FreeBSD/src e894544usr.sbin/pw pw.8

pw: make manual page more friendly for uid/gid search

pw.8 structure is quite different from usual manual page, especially in
describing -o option usage.  Specifically, these paragraphs do not
contain "uid/gid" terms, and have "user id"/"group id" instead,
making searching for "override duplicate safety belt" difficult.
Try to simplify such searches.

Also, clarify uid/gid space between 100 and 1000 as "somewhat special",
as it actually is.

Discussed on:   russian telegram FreeBSD group
Reviewed by:    eugen, novel
MFC after:      1 week
DeltaFile
+7-4usr.sbin/pw/pw.8
+7-41 files

FreeBSD/src c182cf6sys/net if_lagg.c

lagg: Avoid dropping locks when starting the interface

The init routine of a lagg(4) interface will not change during the whole
lifecycle. So we can call lagg_init() directly instead of through the
function pointer. Well, that requires a drop and pickup lock, which
unnecessarily expose a small race window. Refactor lagg_init() into
lagg_init_locked() and call the later one to avoid that.

Meanwhile, delay updating the driver managed status until after the
interface is really ready.

Reviewed by:    markj
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D55198
DeltaFile
+19-17sys/net/if_lagg.c
+19-171 files

FreeBSD/src 7156959usr.bin/diff diffdir.c, usr.bin/diff/tests diff_test.sh

diff: Improve directory loop detection

When we're done processing a directory, remove its entry from the tree
of visited inodes, ensuring that we only report a loop when we encounter
a descendant-to-ancestor link, not when we encounter a cousin-to-cousin
or sibling-to-sibling link.

MFC after:      1 week
Reported by:    Bakul Shah <bakul at iitbombay.org>
Sponsored by:   Klara, Inc.
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D55248
DeltaFile
+17-3usr.bin/diff/diffdir.c
+5-0usr.bin/diff/tests/diff_test.sh
+22-32 files

FreeBSD/src 0fb940fusr.bin/xinstall xinstall.c, usr.bin/xinstall/tests install_test.sh

install: Expect EINTR while copying

Both copy_file_range() and read() / write() in our fallback loop can be
interrupted before copying anything at all, in which case it returns -1
and sets errno to EINTR.  If that happens, we should retry, not fail.

While here, drop the size argument from copy() (we always want to copy
the entire file anyway) and add test cases which exercise the metalog
and digest functionality.

PR:             293028
MFC after:      1 week
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D55168
DeltaFile
+22-22usr.bin/xinstall/xinstall.c
+38-0usr.bin/xinstall/tests/install_test.sh
+60-222 files

FreeBSD/src 7aa3066bin/cp utils.c

cp: Expect EINTR while copying

Both copy_file_range() and copy_fallback() can be interrupted before
they have read anything at all, in which case they return -1 and set
errno to EINTR.  If that happens, we should retry, not fail.

PR:             293028
MFC after:      1 week
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D55167
DeltaFile
+5-2bin/cp/utils.c
+5-21 files

FreeBSD/src 89589b6sys/amd64/amd64 initcpu.c pmap.c, sys/amd64/include md_var.h

amd64: add LASS support

In short, LASS enforces all kernel memory accesses to have bit 63 set to
1, and all userspace accesses have bit 63 set to 0.  Violations of these
rules cause #GP. There are natural loopholes, like SMAP with rflags.AC=1
allows kernel to access userspace.

Enablement is simple, we need to set CR4.LASS bit on all CPUs.  There
are complications when kernel has to execute code at low addresses, e.g.
for la57 trampoline, or calling into EFI RT.  The patch turns CR4.LASS
off around these regions.

LASS is officially documented in SDM, since at least rev. 085, October
2024.  Tested in simics.

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D55218
DeltaFile
+13-0sys/amd64/amd64/initcpu.c
+9-0sys/amd64/amd64/pmap.c
+4-0sys/amd64/amd64/efirt_machdep.c
+1-0sys/amd64/amd64/machdep.c
+1-0sys/amd64/include/md_var.h
+28-05 files