FreeBSD/src 1ce195dcrypto/heimdal/kdc mit_dump.c

heimdal: Pass the correct pointer to realloc when growing a string buffer

The realloc in my_fgetln was trying to grow the pointer to the string
buffer, not the string buffer itself.

In function 'my_fgetln',
    inlined from 'mit_prop_dump' at crypto/heimdal/kdc/mit_dump.c:156:19:
crypto/heimdal/kdc/mit_dump.c:119:13: error: 'realloc' called on unallocated object 'line' [-Werror=free-nonheap-object]
  119 |         n = realloc(buf, *sz + (*sz >> 1));
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
crypto/heimdal/kdc/mit_dump.c: In function 'mit_prop_dump':
crypto/heimdal/kdc/mit_dump.c:139:11: note: declared here
  139 |     char *line = NULL;
      |           ^~~~

Reviewed by:    rmacklem, cy
Fixes:          a93e1b731ae4 ("heimdal-kadmin: Add support for the -f dump option")
Differential Revision:  https://reviews.freebsd.org/D54933
(cherry picked from commit 03d8ac948b1ad9c419b294c3129b7da58d818363)
DeltaFile
+1-1crypto/heimdal/kdc/mit_dump.c
+1-11 files

FreeBSD/src 51bb8e4crypto/heimdal/lib/hdb keys.c

heimdal: Pass the correct pointer to free in an error case

This fixes a warning reported by GCC 14 on stable/14:

crypto/heimdal/lib/hdb/keys.c:241:13: warning: 'free' called on pointer 'ext' with nonzero offset 16 [-Wfree-nonheap-object]
  241 |             free(hist_keys);
      |             ^~~~~~~~~~~~~~~
crypto/heimdal/lib/hdb/keys.c:234:15: note: returned from 'calloc'
  234 |         ext = calloc(1, sizeof (*ext));
      |               ^~~~~~~~~~~~~~~~~~~~~~~~

Reviewed by:    rmacklem, cy
Fixes:          5000d023a446 ("heimdal-kadmin: Add support for the -f dump option")
Differential Revision:  https://reviews.freebsd.org/D54932
(cherry picked from commit b26a7af438f36dcde86f39a681123cc2140affb2)
DeltaFile
+1-1crypto/heimdal/lib/hdb/keys.c
+1-11 files

FreeBSD/src 5d6dfa5share/man/man5 src.conf.5

src.conf.5: regen documenting WITH_IPFILTER_IPFS

(cherry picked from commit b9b1262a8ef95857101e538145703894e3b880b7)
DeltaFile
+5-1share/man/man5/src.conf.5
+5-11 files

FreeBSD/src f981908tools/build/options WITH_IPFILTER_IPFS

options: describe WITH_IPFILTER_IPFS

Add a description for WITH_IPFILTER_IPFS.

Fixes:          0ff0c19e7f70 ("ipfilter: Disable ipfs(8) by default")
(cherry picked from commit c112ad75605ccdfcb8bbce2f57b0e7a077f057f8)
DeltaFile
+3-0tools/build/options/WITH_IPFILTER_IPFS
+3-01 files

FreeBSD/src 7ae432esys/kern vfs_mount.c

vfs_mount.c: Don't call VFS_MOUNT() if only exports are being updated

PR#293198 reports a hang within ZFS when exports
are being updated concurrently with a VOP_SETEXTATTR().
The hang appears to be caused by mishandling of the
z_teardown_lock, but fixing handling of this lock appears
to be a major effort. Since the hang occurs when
VFS_MOUNT() acquires a write/exclusive z_teardown_lock,
which rarely occurs, except when exports are being updated,
this patch avoids the VFS_MOUNT() call for this case.

Avoiding a VFS_MOUNT() call fixes the hang for the case
reported by PR#293198 and is also an optimization.
As such, this patch avoids the VFS_MOUNT() call when only exports
are being updated similar to what was already being done
within vnet prisons.

PR:     293198

(cherry picked from commit 935cf3284f520c90a63baaadb762caaa30084f5c)
DeltaFile
+31-21sys/kern/vfs_mount.c
+31-211 files

FreeBSD/src 4791189usr.sbin/syslogd/tests syslogd_format_test_common.sh

syslogd/tests: use kern.features to detect INET support

This fixes INET feature detection with kernel configs
that do not include the kern.conftxt sysctl, such as
riscv64 currently[0].

[0] https://ci.freebsd.org/view/Test/job/FreeBSD-main-riscv64-test/16514/testReport/usr.sbin.syslogd/syslogd_forwarded_format_test/O_flag_bsd_forwarded_legacy/

Reviewed by:    markj
Approved by:    emaste (mentor)
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55383

(cherry picked from commit c721ceeb3ef0b29d06e6c3c634579f3bc85cc28b)
DeltaFile
+1-2usr.sbin/syslogd/tests/syslogd_format_test_common.sh
+1-21 files

FreeBSD/src 86a8a67sys/riscv/conf GENERIC

riscv: GENERIC: enable KERN_TLS

This unskips 585 sys/kern/ktls_test testcases[0] in CI. All 585 tests currently pass.

[0] https://ci.freebsd.org/view/Test/job/FreeBSD-main-riscv64-test/16514/testReport/sys.kern/

Approved by:            emaste (mentor)
MFC after:              3 days
Sponsored by:           The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55376

(cherry picked from commit 1e649491b8567151270095fda3bce8faea394952)
DeltaFile
+1-0sys/riscv/conf/GENERIC
+1-01 files

FreeBSD/src 49ab036share/man/man4 multicast.4

multicast.4: Fix disabling multicast forwarding

Reviewed by: markj, glebius
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55266

(cherry picked from commit f2c2e5b0bf9def01b10651b9802fa38d07d9d265)
DeltaFile
+22-4share/man/man4/multicast.4
+22-41 files

FreeBSD/src 97b7f73sys/riscv/conf GENERIC

riscv: GENERIC: enable KERN_TLS

This unskips 585 sys/kern/ktls_test testcases[0] in CI. All 585 tests currently pass.

[0] https://ci.freebsd.org/view/Test/job/FreeBSD-main-riscv64-test/16514/testReport/sys.kern/

Approved by:            emaste (mentor)
MFC after:              3 days
Sponsored by:           The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55376

(cherry picked from commit 1e649491b8567151270095fda3bce8faea394952)
DeltaFile
+1-0sys/riscv/conf/GENERIC
+1-01 files

FreeBSD/src b0476eesecure/lib/libcrypto/man/man3 Makefile

OpenSSL: install EVP_CIPHER_CTX_get_app_data.3 once

A separate EVP_CIPHER_CTX_get_app_data.3 was added in the OpenSSL 3.5.5
import, but the link to EVP_EncryptInit.3 was still being installed
which stomped on the file and created inconsistent entries in the METALOG.

Reviewed by:    emaste
Found by:       package_check script in Cirrus-CI
Fixes:          1731fc70f734 ("OpenSSL: update vendor sources to match 3.5.5 content")
Sponsored by:   Innovate UK
Differential Revision:  https://reviews.freebsd.org/D55332

(cherry picked from commit c4130a8a84e1ce0fc9c05d2b48f83e66ade302aa)
DeltaFile
+0-1secure/lib/libcrypto/man/man3/Makefile
+0-11 files

FreeBSD/src b4305c9usr.bin/less lesspipe.sh

lesspipe: Allow zstd to operate on a symlink

By default zstd refuses to operate on symlinks, so for example
`zless /var/crash/vmcore.last.zst` failed to view the uncompressed core
file.  Add -f to the zstd command line to allow operation on symlinks.

Reviewed by:    delphij
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55101
DeltaFile
+1-1usr.bin/less/lesspipe.sh
+1-11 files

FreeBSD/src 16822dasys/dev/acpi_support acpi_panasonic.c

acpi_panasonic: Clear wireless RF_KILL on boot and resume

On Panasonic FZ-Y1 and similar models, the EC latches RF_KILL on
shutdown and suspend when battery is at certain level, causing wireless
to boot with hard block.

Call WLSW.SHRF during attach and resume to clear the block.

Tested on Panasonic FZ-Y1 with Intel Wireless 7265.

Reviewed by:    adrian, obiwac
Approved by:    adrian, obiwac
Differential Revision:  https://reviews.freebsd.org/D55265
DeltaFile
+36-0sys/dev/acpi_support/acpi_panasonic.c
+36-01 files

FreeBSD/src 477ab96share/misc committers-ports.dot

Add records about new ports committer (nxjoseph)

Update Mentor and Mentee Information to follow step
5 of the Committers Guide.

Reviewed by:    osa, vvd (mentors)
Approved by:    osa (mentor)
Differential Revision:  https://reviews.freebsd.org/D55457
DeltaFile
+4-0share/misc/committers-ports.dot
+4-01 files

FreeBSD/src 3ca02a7sys/dev/vt vt_core.c, sys/teken teken.c teken.h

vt: Fix handling of backtab

PR: 292463
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2002

(cherry picked from commit 5fec99caff3ac4f476bb88078ebf85fbecf6afb3)
DeltaFile
+6-0sys/dev/vt/vt_core.c
+4-0sys/teken/teken.c
+2-0sys/teken/teken.h
+12-03 files

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