FreeBSD/src 21b4ec5tools/test/hwpmc pmctest.py

Split counting from sampling.

(cherry picked from commit 77153a491e3b31475f5faddb21271a0a8e0d4a9b)
DeltaFile
+21-4tools/test/hwpmc/pmctest.py
+21-41 files

FreeBSD/src 329655dtools/test/hwpmc pmctest.py

Correct the data collection arguments.  Add proper tempdirs.

(cherry picked from commit e018fedef0a6389240322da9fa4b9fa9971f6e59)
DeltaFile
+6-3tools/test/hwpmc/pmctest.py
+6-31 files

FreeBSD/src 711ab19tools/test/hwpmc pmctest.py

Start adding an exercise mode for programs under test.

In exercise mode we collect data for every available counter on a
program and keep all of that in a directory in /tmp.

(cherry picked from commit 4a1b69ade6b5e8665dfb4d0cb683854705192a68)
DeltaFile
+24-9tools/test/hwpmc/pmctest.py
+24-91 files

FreeBSD/src 259506ftools/test/hwpmc pmctest.py

Extend the script to collect gprof data

While we're at it, switch to simple waiting from communicate() calls.

(cherry picked from commit e2bedc7d69926426a710d035df51e0a0812d38b1)
DeltaFile
+27-4tools/test/hwpmc/pmctest.py
+27-41 files

FreeBSD/src 9f80b89tools/test/hwpmc pmctest.py

Convert fully to Python 3.  Remove licence text, only keep SPDX.

Update to use argparse rather than OptionParser (now deprecated).

(cherry picked from commit eb1c0d74cbb99f329767b3d565ae57a3ec032bee)
DeltaFile
+19-54tools/test/hwpmc/pmctest.py
+19-541 files

FreeBSD/src 4a9a270tools/test/hwpmc pmctest.py

Split counting from sampling.

(cherry picked from commit 77153a491e3b31475f5faddb21271a0a8e0d4a9b)
DeltaFile
+21-4tools/test/hwpmc/pmctest.py
+21-41 files

FreeBSD/src 2b00065tools/test/hwpmc pmctest.py

Extend the script to collect gprof data

While we're at it, switch to simple waiting from communicate() calls.

(cherry picked from commit e2bedc7d69926426a710d035df51e0a0812d38b1)
DeltaFile
+27-4tools/test/hwpmc/pmctest.py
+27-41 files

FreeBSD/src 4db1b93tools/test/hwpmc pmctest.py

Correct the data collection arguments.  Add proper tempdirs.

(cherry picked from commit e018fedef0a6389240322da9fa4b9fa9971f6e59)
DeltaFile
+6-3tools/test/hwpmc/pmctest.py
+6-31 files

FreeBSD/src 076e753tools/test/hwpmc pmctest.py

Start adding an exercise mode for programs under test.

In exercise mode we collect data for every available counter on a
program and keep all of that in a directory in /tmp.

(cherry picked from commit 4a1b69ade6b5e8665dfb4d0cb683854705192a68)
DeltaFile
+24-9tools/test/hwpmc/pmctest.py
+24-91 files

FreeBSD/src d967f92tools/test/hwpmc pmctest.py

Convert fully to Python 3.  Remove licence text, only keep SPDX.

Update to use argparse rather than OptionParser (now deprecated).

(cherry picked from commit eb1c0d74cbb99f329767b3d565ae57a3ec032bee)
DeltaFile
+19-54tools/test/hwpmc/pmctest.py
+19-541 files

FreeBSD/src 06b4665libexec/rc/rc.d virtual_oss

virtual_oss: use hw.snd.default_unit by default

Reviewed by:    christos
MFC after:      1 week
Signed-off-by:  Quentin Thébault <quentin.thebault at defenso.fr>
Sponsored by:   Defenso
PR:             293130
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2043
DeltaFile
+2-1libexec/rc/rc.d/virtual_oss
+2-11 files

FreeBSD/src 0076f6dsys/sys _offsetof.h

sys/_offsetof.h: pacify GCC 12's macro redefinition check

GCC 12 has a strict definition of identity (all characters including
whitespace must be identical) when comparing "redefined" macros. Make
our definition exactly match the stddef.h that comes with GCC to fix
test-includes of netlink/netlink_snl.h.  (Note: later versions of GCC
are a bit more flexible and don't have this problem.)

Reported by:    des
Sponsored by:   DARPA, AFRL
Fixes:          2adc3f0db187 ("stddef.h: centralize definition of offsetof()")
DeltaFile
+1-1sys/sys/_offsetof.h
+1-11 files

FreeBSD/src ab835b3libexec/rc debug.sh

debug.sh: Fix a typo

MFC after:              3 days
Reviewed by:            emaste, guest-seuros, sjg, ziaee
Differential Revision:  https://reviews.freebsd.org/D55416
DeltaFile
+1-1libexec/rc/debug.sh
+1-11 files

FreeBSD/src 9a20515bin/sh sh.1

sh.1: Add .sh_history and .shrc to FILES

MFC after:              3 days
Reviewed by:            bapt (previous), jilles, tembun at bk.ru
Differential Revision:  https://reviews.freebsd.org/D55295
DeltaFile
+4-0bin/sh/sh.1
+4-01 files

FreeBSD/src 3c1f696usr.sbin/trim trim.8 trim.c

trim(8): minor output correction

"trim /dev/da*" would print the following line multiple times
when given multiple agruments:

dry run: add -f to actually perform the operation

Print it once before looping over arguments.

Also, note possible suffixes P and E after offset/length
as per expand_number(3).

(cherry picked from commit 5d5848648013a189fc766e4ee3a121362905b836)
(cherry picked from commit f1b934c8138cfd98a70e305d54b2b431c842ec21)
DeltaFile
+10-8usr.sbin/trim/trim.8
+6-5usr.sbin/trim/trim.c
+16-132 files

FreeBSD/src f0a6e0ausr.sbin/trim trim.8 trim.c

trim(8): minor output correction

"trim /dev/da*" would print the following line multiple times
when given multiple agruments:

dry run: add -f to actually perform the operation

Print it once before looping over arguments.

Also, note possible suffixes P and E after offset/length
as per expand_number(3).

(cherry picked from commit 5d5848648013a189fc766e4ee3a121362905b836)
(cherry picked from commit f1b934c8138cfd98a70e305d54b2b431c842ec21)
DeltaFile
+10-8usr.sbin/trim/trim.8
+6-5usr.sbin/trim/trim.c
+16-132 files

FreeBSD/src 8df05ceusr.sbin/traceroute as.c traceroute.c, usr.sbin/traceroute6 traceroute6.c

traceroute: MFC: graceful recover after networking errors with as_server

Currently, the traceroute[6] utility does not check
for possible networking errors while talking to as_server
in case of "traceroute -a". Meantime, there is a common case
when trace is long and it has many non-responding hops
(shown as '* * *'), so as_server aborts our connection,
hence no AS numbers shown for the rest of trace.

Somewhat artifical way to reproduce the problem:

traceroute to 57.144.244.1 (57.144.244.1), 80 hops max, 48 byte packets
 5  [AS174] be2950.ccr42.fra05.atlas.cogentco.com (154.54.72.42)  74.277 ms  9.605 ms  9.599 ms
 6  [AS174] 149.11.228.19 (149.11.228.19)  9.506 ms  9.466 ms  9.420 ms
 7  [AS33182] po172.asw02.fra5.tfbnw.net (129.134.108.146)  9.725 ms  9.874 ms  9.696 ms
 8  [AS32934] psw04.fra5.tfbnw.net (157.240.59.85)  8.718 ms  8.691 ms  8.618 ms
 9  * * *
10  [AS0] edge-star-mini-shv-01-fra5.facebook.com (57.144.244.1)  9.747 ms  9.815 ms  9.699 ms


    [10 lines not shown]
DeltaFile
+20-4usr.sbin/traceroute/as.c
+21-2usr.sbin/traceroute6/traceroute6.c
+19-2usr.sbin/traceroute/traceroute.c
+1-1usr.sbin/traceroute/as.h
+61-94 files

FreeBSD/src db80ff6usr.sbin/traceroute as.c traceroute.c, usr.sbin/traceroute6 traceroute6.c

traceroute: MFC: graceful recover after networking errors with as_server

Currently, the traceroute[6] utility does not check
for possible networking errors while talking to as_server
in case of "traceroute -a". Meantime, there is a common case
when trace is long and it has many non-responding hops
(shown as '* * *'), so as_server aborts our connection,
hence no AS numbers shown for the rest of trace.

Somewhat artifical way to reproduce the problem:

traceroute to 57.144.244.1 (57.144.244.1), 80 hops max, 48 byte packets
 5  [AS174] be2950.ccr42.fra05.atlas.cogentco.com (154.54.72.42)  74.277 ms  9.605 ms  9.599 ms
 6  [AS174] 149.11.228.19 (149.11.228.19)  9.506 ms  9.466 ms  9.420 ms
 7  [AS33182] po172.asw02.fra5.tfbnw.net (129.134.108.146)  9.725 ms  9.874 ms  9.696 ms
 8  [AS32934] psw04.fra5.tfbnw.net (157.240.59.85)  8.718 ms  8.691 ms  8.618 ms
 9  * * *
10  [AS0] edge-star-mini-shv-01-fra5.facebook.com (57.144.244.1)  9.747 ms  9.815 ms  9.699 ms


    [10 lines not shown]
DeltaFile
+20-4usr.sbin/traceroute/as.c
+21-2usr.sbin/traceroute6/traceroute6.c
+19-2usr.sbin/traceroute/traceroute.c
+1-1usr.sbin/traceroute/as.h
+61-94 files

FreeBSD/src d2dea8bsys/conf options, sys/dev/uart uart_dev_ns8250.c

arm: Add EARLY_PRINTF for ns8250 on arm/aarch64 platforms.

Reviewed  by:   adrian (previous version)
MFC after:      3 weeks
DeltaFile
+39-3sys/dev/uart/uart_dev_ns8250.c
+4-0sys/conf/options
+43-32 files

FreeBSD/src dfcd04csys/net if_vlan.c

net/if_vlan.c: do not leak vlan sx slock in vlan_clone_dump_nl()

Reported by:    pho
Reviewed by:    markj
Fixes:  d4062b9f16e46f039f2b5b40dd35592b5dabf00c
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Differential revision:  https://reviews.freebsd.org/D55447
DeltaFile
+1-0sys/net/if_vlan.c
+1-01 files

FreeBSD/src 64633a5sys/kern kern_syscalls.c

kern_syscall_deregister: document syscall 0 no-op logic

Document syscall #0 being handled specially in
`kern_syscall_deregister(..)`: it's a reserved syscall and not
dynamically registered, and hence does not need to be deregistered in
the function.

Co-authored-by: ngie@
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D54326

(cherry picked from commit f384784289dba13b90138a89d3df3a8ea063aff9)
DeltaFile
+8-2sys/kern/kern_syscalls.c
+8-21 files

FreeBSD/src 10f22bdsys/kern kern_syscalls.c

kern_syscall_deregister: document syscall 0 no-op logic

Document syscall #0 being handled specially in
`kern_syscall_deregister(..)`: it's a reserved syscall and not
dynamically registered, and hence does not need to be deregistered in
the function.

Co-authored-by: ngie@
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D54326

(cherry picked from commit f384784289dba13b90138a89d3df3a8ea063aff9)
DeltaFile
+8-2sys/kern/kern_syscalls.c
+8-21 files

FreeBSD/src 6d15e0esbin/init ttys

ttys: Correct comment about required statuses

The status field also accepts onifconsole and onifexists,
so it looks crusty saying that it only accepts on and off.

Reviewed by:    imp
Closes:         https://github.com/freebsd/freebsd-src/pull/2042
DeltaFile
+3-3sbin/init/ttys
+3-31 files

FreeBSD/src 0a492ebsbin/init ttys

ttys: Align comment whitespace and wrapping

This doesn't lengthen or shorten any configuration,
only comments, so merging the configuration will be safe.

Reviewed by:    imp
Closes:         https://github.com/freebsd/freebsd-src/pull/2042
DeltaFile
+11-11sbin/init/ttys
+11-111 files

FreeBSD/src eaeb356sys/sys buf.h

buf: Relax an assertion in BUF_UNLOCK

The BUF_UNLOCK macro asserts that B_REMFREE is not set, as it is up to
the lock owner to complete the dequeue from the free list before
releasing the lock.  However, if the thread has acquired the lock
multiple times, then releasing the recursive lock should be ok.  Modify
the assertion to reflect this.

This was triggered by an out-of-tree filesystem.

Reviewed by:    kib
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D55418
DeltaFile
+1-1sys/sys/buf.h
+1-11 files

FreeBSD/src 1459b69sys/dev/asmc asmc.c

asmc: unbreak build: add missing curly brace

Fixes:  d76bb14e022 ("chore: asmc: additional style(9) cleanup")
(cherry picked from commit 9ccdf3f36e014f0060ea192ffed91a7679003355)
DeltaFile
+1-1sys/dev/asmc/asmc.c
+1-11 files

FreeBSD/src b49d30asys/dev/asmc asmc.c

asmc: unbreak build: add missing curly brace

Fixes:  d76bb14e022 ("chore: asmc: additional style(9) cleanup")
(cherry picked from commit 9ccdf3f36e014f0060ea192ffed91a7679003355)
DeltaFile
+1-1sys/dev/asmc/asmc.c
+1-11 files

FreeBSD/src acbf749sys/dev/rge if_rge.c

rge: log silicon revision during attach

The initial import from OpenBSD contained chip revision printf() calls
commented out, as OpenBSD's bare printf() style does not translate to
FreeBSD's device_printf() idiom. The result is that users cannot
distinguish RTL8125 from RTL8125B, RTL8125D_1, RTL8125D_2 etc. via
dmesg alone, even though all variants show as '<RTL8125>' from the PCI
probe string.

Add proper device_printf() calls including the raw hwrev value,
consistent with how re(4) reports chip revisions.

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

Reviewed by:    zlei, imp, adrian
Differential Revision:  https://reviews.freebsd.org/D55402
DeltaFile
+7-7sys/dev/rge/if_rge.c
+7-71 files

FreeBSD/src d1947d0sys/dev/rge if_rge.c

rge: correctly free busdma memory / zero things out only if allocated

* Only free busdma memory that was allocated
* Don't free tx/rx rings until their buffers have also been freed

PR:     kern/293307

Reviewed by:    zlei
Differential Revision:  https://reviews.freebsd.org/D55420
DeltaFile
+18-15sys/dev/rge/if_rge.c
+18-151 files

FreeBSD/src d5ca521sys/dev/rge if_rge.c

rge: fix callout setup/teardown; handle invalid ethernet address

* Do the callout init early; since some of the teardown path expects
  the callout to be valid

* Handle an invalid ethernet address by generating a local one.

PR:     kern/293307

Reviewed by:    zlei
Differential Revision:  https://reviews.freebsd.org/D55419
DeltaFile
+14-5sys/dev/rge/if_rge.c
+14-51 files