awk: Update to 20250116 bsd-feature 2dce54b053d4
Update to 20250116 upstream. This fixes issues with bad line numbers,
hex numbers, an indirection in variable dereferencing and prevent
openfile from reading directories.
Jan 14, 2025
Fix incorrect error line number issues. unput has
no business managing lineno. Thanks to Ozan Yigit.
Jan 05, 2025
Fix hex detection in is_valid_number.
Fix indirect field specification with non-numeric string
eg. $("foo") in indirect. This is not illegal.
Thanks to Arnold Robbins.
Jan 01, 2025
Fixed openfile to not try to read from a directory.
Thanks to Arnold Robbins.
Sponsored by: Netflix
x86: Fixes for nmi/pmi interrupt sharing
- Fix a bug where the semantics of refcount_release() were
reversed. This would lead to the nmi interrupt being prematurely
masked in the local apic, leading to an out-of-tree profiling
tool only getting results the first time it was run.
- Stop executing nmi handlers after one claims the interrupt.
The core2 hwpmc handler seems to be especially heavy, and running it
in addition to vtune's handler caused roughly 50% of the nmi interrupts
to be lost (and caused vtune to give worse results).
Reviewed by: bojan
Sponsored by: Netflix
arm64: Hook up efi_rt_arch_call in efirt.ko
Note that this requires marking efi_rt_fault as a non-preemptible
local symbol.
Co-authored-by: Jessica Clarke <jrtc27 at FreeBSD.org>
Reviewed by: imp, andrew
Obtained from: CheriBSD
Fixes: d7f930b80e89 ("arm64: Implement efi_rt_arch_call")
Differential Revision: https://reviews.freebsd.org/D48715
share/mk: Remove more support for building profiled libraries
- Remove documentation of profiled library support from bsd.README
- Remove rules to create individual .po files. The rules to generate
an archive from these files was already removed, so these .po rules
aren't used.
Reviewed by: emaste
Fixes: 3750ccefb862 ("Retire MK_PROFILE infrastructure")
Differential Revision: https://reviews.freebsd.org/D48819
Cirrus-CI: Check for final "Uptime" message
The last thing printed by the kernel after shutdown is Uptime: <time>.
In the CI boot test script add a check for this, to ensure that shutdown
is successful. A test branch of mine panicked during shutdown, but
still reported success in Cirrus-CI.
Reviewed by: kevans
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48823
rtld: clear any holes in the struct utrace_rtld passed to kernel logger
This should avoid an (almost) false positive from Valgrind, by filling
the padding on LP64.
PR: 284563
Reported by: Paul Floyd <pjfloyd at wanadoo.fr>
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D48854
bhyve/riscv: clean up SBI handlers.
Similar to kernel SBI clean up patch, do clean up in userspace SBI part:
- use standard SBI error codes;
- remove unused function.
Differential Revision: https://reviews.freebsd.org/D48829
bhyve: Sleep for a short period after VM_EXITCODE_DEBUG exits
Apply 2e2b8afa52da6 for RISC-V:
As on amd64 and aarch64 APs will repeatedly exit until they are
brought online, so this hack helps avoid burning CPU time during
guest bootup.
Reviewed by: corvink, markj
Differential Revision: https://reviews.freebsd.org/D48811
riscv vmm: various fixes in APLIC.
- Implement Level-sensitive interrupts
- Disable up to 32 interrupts by a single query (CLRIE register handling)
- Implement reading from DOMAINCFG
All of this needed for Linux guest.
Differential Revision: https://reviews.freebsd.org/D48808
bhyve/riscv: fix HSM extension handling.
Pass private data from supervisor as the second argument on secondary
CPU startup.
This is used by Linux guest.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D48807
riscv vmm: clean up SBI code
- Use SBI standard error codes (with respect to the spec)
- riscv_send_ipi() now takes cpuset_t* as an argument
Differential Revision: https://reviews.freebsd.org/D48575
Revert "rc.d: Add hastd as a prereq for devd"
This reverts commit 2d17f44a5ae6e948c3a93cac30b8315d127ba900. It hangs
the boot. It turns out I installed my test on the wrong machine and
rebooted the other one...
Sponsored by: Netflix
hptrr: Better error recovery
This bug and https://www.mail-archive.com/freebsd-stable@freebsd.org/msg124458.html
both have this fix. It turns unknown errors into an autosense failure, which causes
us to grab the sense buffer manually. It also sets a condition that we use to retry
timed out commands that jmg reports as being helpful.
I'm torn on committing it. The code seems fine in terms of fixing
things. But this is a 10-year-old bug with few other bugs and a short CC
list for a driver that might go away in 15 anyway. I'm going to commit
and close the bug, and MFC it in a week, unless someone complains (which
seems unliekly, given the age of this hardware, I susepct most of it is
out of service).
Suggested by: jmg, Scott Long
PR: 191135
MFC After: 1 week
Reviewed by: imp
netlink: initialize VNET context with VNET_SYSINIT()
With the initial check-in netlink(4) was very conservative with regards to
using memory and intrusiveness to the kernel and network stack. In
particular it would initialize the VNET context only on the first actuall
call to socket(PF_NETLINK), saving on allocation of a struct nl_control of
size 224 bytes.
Now it is clear that netlink(4) is primary citizen of FreeBSD, with a set
of system tools using it. So resort to normal VNET_SYSINIT() and with
that shave a lot of complexity, since after the change V_nl_ctl is
immutable.
netlink: rename functions that manipulate group membership of a pcb
Use nlp_ prefix for them, cause they operate on single pcb. Use words
"join" and "leave" instead of "add" and "del", cause we aren't creating
or destroying groups, we are just joining or leaving.
Really assert locks instead of just having "locked" suffix.
mpt: replace mpt_prt with mpt_lprt in mpt_cam.c
Replace mpt_prt with mpt_lprt with DEBUG level to print kernel pointers
only at the debug level.
PR: 238662
Signed-off-by: Fuqian Huang <huangfq.daxian at gmail.com>
Reviewed-by: imp
mpt: print req->index rather than the pointer itself in mpt.c
Print req->index instead of printing the pointer itself to avoid kernel
pointer leakage.
PR: 238661
Signed-off-by: Fuqian Huang <huangfq.daxian at gmail.com>
Reviewed-by: imp
unlink, rmdir: call notify_upper from VOP pre method instead of syscall
Suppose that there are two or more nullfs mounts over some fs, and
suppose the we unlink a file on one of the nullfs mount.
This way notify_upper get called from the lower vnode as well, allowing
the other nullfs mounts to note that and drop their caches for the
unlinked vnode.
PR: 254210
Reviewed by: olce
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D48825
pf: send ICMP destination unreachable fragmentation needed when appropriate
Just like we do for IPv6, generate an ICMP fragmentation needed packet if we're
going to need fragmenation for IPv4 as well (i.e. DF is set). Do so before full
processing, so we generate it with pre-NAT addreses, just as we do for IPv6.
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D48805
pfil: set PFIL_FWD for IPv4 forwarding
Just like we already do for IPv6 set the PFIL_FWD flag when we're forwarding
IPv4 traffic. This allows firewalls to make more precise decisions.
Reviewed by: glebius
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D48824
arch.7: Update version reference to 13.0
This document is intended to be a reference for supported FreeBSD
versions, so update text to refer to 13.0 and later.
Sponsored by: The FreeBSD Foundation