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)
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)
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)
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)
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
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
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
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)
Extend the script to collect gprof data
While we're at it, switch to simple waiting from communicate() calls.
(cherry picked from commit e2bedc7d69926426a710d035df51e0a0812d38b1)
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)
Extend the script to collect gprof data
While we're at it, switch to simple waiting from communicate() calls.
(cherry picked from commit e2bedc7d69926426a710d035df51e0a0812d38b1)
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)
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)
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()")
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)
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)