loader: Test GCC cross builds as part of universe.sh
Sicne we have gcc15 in Jenkins, and since people are actually using it,
add cross building tests to universe.sh to avoid build breakage when
hacking on loader.efi (and others). UEFI makes it too easy to mix
pointers and integers since it deals in an odd mix of
EFI_PHYSICAL_ADDRESS and pointers...
Sponsored by: Netflix
loader.efi: Fix build with gcc due to pointer / int issues on 32-bit build
Use (uintptr_t) casts to cast the EFI_PHYSICAL_ADDDRESS to a pointer.
Fixes: afee781523e4 ("loader.efi: Recognize new memdisk=<url> and memcd=<url> options")
Sponsored by: Netflix
Reviewed by: rlibby
Differential Revision: https://reviews.freebsd.org/D57893
libpfctl: fix memory leak
When we snl_init_writer() we allocate memory in the struct snl_state in the struct pfctl_handle.
This memory was never released again, leading to a memory leak. We still
had a reference to the memory and would release it on pfctl_close()
(so valgrind did not detect it as a leak), but long-lived users (e.g.
bsnmpd) would eventually run out of memory.
Explicitly reset the snl_state when we're done to prevent this.
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit fcb31b57112425a4eb64241651a0206108105298)
libpfctl: retrieve family id only once
Look up the pfctl family id when we open the handle, rather than for
every function call.
This saves us a lot of netlink calls, at the expense of storing one
extra int in the handle.
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit 2a478dfc7f9cd60037939e121026bf26a01e8c41)
ping/tests: expect bell chars from stderr after initial status
After 141bb85798 and 8bda488114f3, ping(8) first writes and flushes the
initial status to stdout, then writes notification bell characters to stderr.
This patch corrects the expected order of the output to stdout and stderr.
This is a temporary fix; the test should be rewritten to separate the output
streams and run expectations on each individually.
Reviewed by: des
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
VOP_VPUT_PAIR(): handle the case when dvp == vp
Reviewed by: jah, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57824
files: riscv, arm64: Remove redundant 'ofw_cpu.c'
Should have been removed when that line was moved from 'files.arm' to
'files'.
Fixes: 14e1a2cd295d ("Move ofw_cpu file to the main files conf file.")
MFC after: 2 weeks
Event: Halifax Hackathon 202606
Location: Seat 36K in AC667, over Maine near Canadian border
Sponsored by: The FreeBSD Foundation
hwpstate_amd(4): Style: End brace of struct initializers on new line
Fixes: 191f47bcd650 ("hwpstate_amd: Refactor the cpufreq code by using delegation pattenr")
MFC after: 2 weeks
Event: Halifax Hackathon 202606
Location: Dalhousie CS Faculty building
Sponsored by: The FreeBSD Foundation
hwpstate_intel(4): Debug sysctl: Style
Introduce 'error', set it to the result of rdmsr_safe() and use 'error'
as the test expression.
No functional change (intended).
Fixes: 29b8220b179b ("hwpstate_intel: Use ipi instead of thread_lock + sched_bind")
MFC after: 2 weeks
Event: Halifax Hackathon 202606
Location: Dalhousie CS Faculty building
Sponsored by: The FreeBSD Foundation
hwpstate_intel(4): Debug sysctl: Fix retrieving the pkg-level MSR
IA32_HWP_REQUEST_PACKAGE_CONTROL is never set in 'sc->req'. Just
discriminate on 'hwp_pkg_ctrl', which indicates the hardware capability
as indicated by CPUID.
Fixes: 29b8220b179b ("hwpstate_intel: Use ipi instead of thread_lock + sched_bind")
MFC after: 2 weeks
Event: Halifax Hackathon 202606
Location: Dalhousie CS Faculty building
Sponsored by: The FreeBSD Foundation