Commit Graph

309368 Commits

Author SHA1 Message Date
Pouria Mousavizadeh Tehrani bc301fee4c routing: Add tests for metric
Add tests to make sure:
* Default metric is enforced.
* Lowest metric wins.
* Deleting routes by specifying gateway/metric works.

Reviewed by:	markj
Differential Revision: https://reviews.freebsd.org/D57016
2026-05-21 00:25:11 +03:30
Pouria Mousavizadeh Tehrani 1f03c62e43 netstat(1): Show metric value for routes
Add metric support and show its value in wide flag and
libxo output.
Also, add metric to the description of wide flag (`-w`) in
routing display (`-r`) section of manual page.

Reviewed by:	markj (manpage)
Discussed with:	markj
Differential Revision: https://reviews.freebsd.org/D57011
2026-05-21 00:25:10 +03:30
Pouria Mousavizadeh Tehrani d87e5b28b7 route.8: Describe metric modifier
Describe `-metric` argument in the route manual.

Discussed with:	ziaee
Differential Revision: https://reviews.freebsd.org/D57025
2026-05-21 00:25:09 +03:30
Pouria Mousavizadeh Tehrani 2e2d402d06 route(8): Add metric argument
Add support for metric in route command.

Differential Revision: https://reviews.freebsd.org/D56335
2026-05-21 00:25:08 +03:30
Pouria Mousavizadeh Tehrani f15b8a8f1d route(8): Show metric value in monitor route
Reviewed by:	glebius
Differential Revision: https://reviews.freebsd.org/D56326
2026-05-21 00:25:07 +03:30
Pouria Mousavizadeh Tehrani 6dd429aeab route(8): Show metric value in get route
Reviewed by:	glebius
Differential Revision: https://reviews.freebsd.org/D56325
2026-05-21 00:25:05 +03:30
Pouria Mousavizadeh Tehrani b9a246a917 rtnetlink.4: Add RTA_PRIORITY
Add metric implementation of netlink to manual.

Reviewed by:	markj
Differential Revision: https://reviews.freebsd.org/D56324
2026-05-21 00:25:04 +03:30
Pouria Mousavizadeh Tehrani 73acfc5863 netlink: Add RTA_PRIORITY support (metric)
* Use our new 32-bit metric for RTA_PRIORITY support.
* Update snl library for new RTA_PRIORITY support.
* return RTA_PRIORITY for both MPATH and non-MPATH routes.

Reviewed by:	glebius (previous version)
Discussed with:	markj
Differential Revision: https://reviews.freebsd.org/D56323
2026-05-21 00:25:03 +03:30
Pouria Mousavizadeh Tehrani c0256b31ef routing: Add support for metric
In our routing stack implementation, metric is an attribute
of the nexthop, not the route itself.
Store metric in nhop_priv which is control-plane data of
nexthop, filter the nexthops by metric and populate the mpath
slots in nexthop group with only the lowest metric nexthops
for use in the forwarding path.

`cmp_priv()` compares nhops based on priv hash.
Add metric compare logic to it and only return nexthops
with different metrics if the input nexthop's metric is
zero (wildcard).
Also, add support for metric via rtsock by introducing rmx_metric.

Finally, remove the upper 8-bit reservation of weight for
administrative distance.

Reviewed by:	adrian
Discussed with:	markj
Relnotes:	yes
Differential Revision: https://reviews.freebsd.org/D56322
2026-05-21 00:25:00 +03:30
Ed Maste 59601a75d6 cap_net.3: Clarify monotonic reduction in permitted operations
Reviewed by:	markj, oshogbo
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57141
2026-05-20 16:49:22 -04:00
Mark Johnston 2afb4c979f bsdconfig: Make sure that SSID names are properly escaped
The f_menu_wpa_scan_results() function returns a list of networks
discovered by a scan.  The untrusted network names are evaluated in
f_dialog_menu_wireless_edit.  The quoting applied in
f_menu_wpa_scan_results() protects against evaluation of something like
"$(whoami)" but one can add single quotes to defeat that.

Pass the SSID names through f_shell_escape to work around this.  Escape
single quotes in f_dialog_wireless_edit() and f_menu_wireless_configs()
too for consistency.

I note that this module doesn't seem to actually work, see e.g.,
bugzilla PR 229883.

Approved by:	so
Security:	FreeBSD-SA-26:23.bsdinstall
Security:	CVE-2026-45255
Reported by:	Austin Ralls
Reviewed by:	dteske, des
Differential Revision:	https://reviews.freebsd.org/D56974
2026-05-20 19:34:51 +00:00
Mark Johnston 0f15f53590 bsdinstall: Avoid invoking eval on the wlan SSID list
The wlanconfig utility is not careful about handling untrusted network
names, which can contain shell metacharacters.  Factor network selection
into a subroutine and use the `set -- "$@"` trick to build up a list of
positional parameters for bsddialog without evaluating them.

Approved by:	so
Security:	FreeBSD-SA-26:23.bsdinstall
Security:	CVE-2026-45255
Reported by:	Austin Ralls
Reviewed by:	dteske, des, asiciliano
Differential Revision:	https://reviews.freebsd.org/D56973
2026-05-20 19:34:50 +00:00
Mariusz Zaborski a10bc81d33 libcasper: switch from select(2) to poll(2)
The previous implementation used FD_SET() on a stack-allocated fd_set,
which is an out-of-bounds write whenever the socket fd is >= FD_SETSIZE
(1024).

poll(2) takes an array indexed by slot rather than by fd value, so it
has no FD_SETSIZE limit.

Approved by:	so
Security:	FreeBSD-SA-26:22.libcasper
Security:	CVE-2026-39461
Reported by:    Joshua Rogers
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D56695
2026-05-20 19:34:50 +00:00
Mark Johnston dea055a0e8 ptrace: Fix validation of PT_SC_REMOTE arguments
- Fix an off-by-one in the system call number check.  A value of
  SYS_MAXSYSCALL was permitted.
- Validate the system call number after we've dealt with
  syscall(2)/__syscall(2), since they pass the syscall number as an
  argument.
- When the syscall number is for syscall(2) or __syscall(2), we must
  make sure that nargs > 0 to avoid an underflow when shifting arguments
  down.

Add regression tests.

Approved by:	so
Security:	FreeBSD-SA-26:21.ptrace
Security:	CVE-2026-45253
Fixes:		140ceb5d95 ("ptrace(2): add PT_SC_REMOTE remote syscall request")
Reported by:	Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai
Reviewed by:	kib, emaste
Differential Revision:	https://reviews.freebsd.org/D56978
2026-05-20 19:34:50 +00:00
Alan Somers d91c459a93 fusefs: Handle buggy servers' LISTXATTR response
The fuse protocol requires server to respond to LISTXATTR with a
NUL-terminated string.  If they don't, report an error rather than
attempt to scan through uninitialized memory for a NUL.

Approved by:	so
Security:	FreeBSD-SA-26:20.fusefs
Security:	CVE-2026-45252
admbugs:	1039
Reported by:	Joshua Rogers
Sponsored by:	ConnectWise
2026-05-20 19:34:50 +00:00
Mark Johnston 4c09834afa netmap: Drain selinfo sleepers in nm_os_selinfo_uninit()
Approved by:	so
Security:	FreeBSD-SA-26:19.file
Security:	CVE-2026-45251
2026-05-20 19:34:50 +00:00
Mark Johnston f95da272b8 jaildesc: Make sure to drain selinfo sleepers in jaildesc_close()
Otherwise they may be left on a freed selinfo list after the
corresponding jaildesc struct is freed.  This can be exploited to
elevate privileges.

Remove the JDF_SELECTED micro-optimization.  doselwakeup() is a no-op if
no one ever called selrecord() on the file description, so I see no
reason to complicate the code to avoid the call.

Add some regression tests.

Approved by:	so
Security:	FreeBSD-SA-26:19.file
Security:	CVE-2026-45251
Fixes:		66d8ffe304 ("jaildesc: add kevent support")
Reviewed by:	kib, jamie
Differential Revision:	https://reviews.freebsd.org/D56945
2026-05-20 19:34:50 +00:00
Mark Johnston 4b6a23eb8a procdesc: Make sure to drain selinfo sleepers in procdesc_free()
Otherwise they are left on a freed list after procdesc_free() is called.
This can be exploited to elevate privileges.

Remove the PDF_SELECTED micro-optimization.  doselwakeup() is a no-op if
no one ever called selrecord() on the file description, so I see no
reason to complicate the code to avoid the call.

Add some regression tests.

Approved by:	so
Security:	FreeBSD-SA-26:19.file
Security:	CVE-2026-45251
Reported by:	75Acol, Lexpl0it, fcgboy, and robinzeng2015
Reviewed by:	kib, oshogbo
Fixes:		cfb5f76865 ("Add experimental support for process descriptors")
Differential Revision:	https://reviews.freebsd.org/D56887
2026-05-20 19:34:50 +00:00
Teddy Engel c028080749 ipfilter: Fix NULL dereferences in ipf_checkicmp6matchingstate()
Add NULL checks for ic6 (the ICMPv6 header pointer from fin->fin_dp)
and oic (the inner ICMPv6 header from ofin.fin_dp after ipf_makefrip).
These pointers can be NULL when processing malformed ICMPv6 error
packets with extension headers.

Also fix the length validation: the original check (fin->fin_plen <
sizeof(ip6_t)) could never trigger because an earlier check already
ensures fin->fin_plen >= ICMP6ERR_MINPKTLEN (48). Replace with a proper
check that fin->fin_dlen contains at least ICMPERR_ICMPHLEN +
sizeof(ip6_t) bytes to ensure sufficient data exists for both the
ICMPv6 error header and the embedded IPv6 header.

PR:		288333
MFC after:	1 week
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2214
Signed-off-by:	Teddy Engel <engel.teddy@gmail.com>
2026-05-20 08:33:43 -07:00
Teddy Engel cdc40489a7 ipfilter: Add NULL check for fin_m in ipf_pr_icmp6()
Add NULL check for fin->fin_m before calling M_LEN() in the ICMPv6
error handling code path. When ipf_checkicmp6matchingstate() calls
ipf_makefrip() with a synthesized fr_info_t that has fin_m set to
NULL, the subsequent call to ipf_pr_ipv6hdr() can reach ipf_pr_icmp6()
which would crash when trying to access the mbuf via M_LEN().

PR:		288333
MFC after:	1 week
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2214
Signed-off-by:	Teddy Engel <engel.teddy@gmail.com>
2026-05-20 08:33:43 -07:00
Teddy Engel 68ed81631a ipfilter: Add NULL check for fin_dp in ICMP packet handlers
Add NULL checks for fin->fin_dp in ipf_pr_icmp6() and ipf_pr_icmp()
before dereferencing. When processing packets with IPv6 extension
headers, ipf_pr_pullup() can succeed but fin->fin_dp may still be NULL
due to extension header processing leaving insufficient data for the
protocol header.

PR:		288333
MFC after:	1 week
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2214
Signed-off-by:	Teddy Engel <engel.teddy@gmail.com>
2026-05-20 08:33:43 -07:00
Cy Schubert 8dfb0805fc ipfilter: Validate length before checksum
Validate the length of the packet listed in the mbuf is the same as
the calculated packet length. If not reject the packet and bump the
bad packet stat.

PR:		295198
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D57095
2026-05-20 08:32:37 -07:00
Alexander Ziaee c796cc5aff nlist.3: Move deprecation notice after intro
Its more clear and good practice for the first sentence of a description
to describe what something is, because there are a lot of different use
cases for documentation.

Fixes:		94b7a33568 ("nlist.3: Add discouraged use notice")
Reviewed by:		emaste
Differential Revision:	https://reviews.freebsd.org/D57128
2026-05-20 11:09:16 -04:00
Mark Johnston e6be6dedee kinst/arm64: Handle an additional PC-relative instruction
"ldr <reg>, <literal>" loads a value from a literal memory address into
a register.  It's PC-relative and so cannot be directly implemented
using the trampoline mechanism.  Unfortunately, on arm64 it can't easily
be emulated either since the return-to-EL1 handler does not restore
callee-saved registers, so like adr/adrp, we simply don't handle it.
These instructions are fairly rare in an arm64 kernel.

While here, refactor the code so that all instruction decoding is done
in one place: introduce an enum type which characterizes the instruction
type, add a helper to map instructions to enum values, and store the
corresponding enum value in the probe description.

Reviewed by:	christos
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D56988
2026-05-20 14:49:41 +00:00
Mark Johnston d6f0e671d0 kinst/arm64: Fix return values from kinst_invop()
After commit 853cd87234 it became invalid for kinst_invop() to return
0: dtrace_invop_start() would convert this to a sentinel value
indicating that it did not consume the breakpoint, and so we'd just
call kdb_trap() to handle it.

Change kinst_invop() to return NOP_INSTR after handling a matching
breakpoint.  NOP_INSTR is handled by advancing the ELR, so we have to
compensate by subtracting INSTR_SIZE before returning.

Reviewed by:	christos
MFC after:	1 week
Fixes:		853cd87234 ("arm64: Clean up usage of the dtrace invop handler")
Differential Revision:	https://reviews.freebsd.org/D56987
2026-05-20 14:49:28 +00:00
Zishun Yi b36fd09a83 amd64/vmparam: Fix KASAN shadow map size in comment
The address range 0xfffff78000000000 - 0xfffff7bfffffffff spans exactly 256GB
(0x4000000000 bytes), not 512GB.

For a 2TB kernel map, based on the KASAN 1:8 shadow map ratio, the required
shadow map size is indeed 256GB. The current comment incorrectly states 512GB,
which can be misleading and cause confusion.

Reviewed by:	markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D57129
2026-05-20 14:35:15 +00:00
Gleb Smirnoff e924a2c80b netlink: fix unsigned overflow on a truncated message
PR:			295106
Submitted by:		Robert Morris <rtm@lcs.mit.edu>
Reviewed by:		pouria, melifaro
Differential Revision:	https://reviews.freebsd.org/D56916
2026-05-20 07:27:52 -07:00
Gleb Smirnoff e145afc9eb netlink: factor out compatibility code from inlined function
This is a refactor of 228c632ab3.  First, move compatibility one level
up, where we yet work with the full header.  Second, move this rarely
executed code outside of the inline function.  Should be no functional
change.

Reviewed by:		pouria, melifaro
Differential Revision:	https://reviews.freebsd.org/D56915
2026-05-20 07:27:39 -07:00
Konstantin Belousov d9c31658df kern_umtx.c: remove dead code
It was a placeholder for the access control for process-shared umtx
memory, which is not needed.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential revision:	https://reviews.freebsd.org/D57122
2026-05-20 16:31:30 +03:00
Alexander Ziaee 9096a8b1c8 crypto driver manuals: Add crypto to search index
While here, tag spdx and sync the drivers in crypto(4)/SEE ALSO.

MFC after:		2 days (add back hifn)
Differential Revision:	https://reviews.freebsd.org/D57060
2026-05-20 09:25:54 -04:00
Mateusz Piotrowski d04da19acb d.7: Document no support for ddi_pathnam(), getmajor(), and getminor()
MFC after:	3 days
2026-05-20 14:36:40 +02:00
Justin Hibbits 31855427d9 dpaa: Restore Semihalf license header
This is a "new" file, but is mostly copied from if_dtsec_fdt.c, so need to
retain the original license header in addition to the new one.

Reviewed by:	ziaee
Differential Revision:	https://reviews.freebsd.org/D57123
2026-05-19 22:21:55 -04:00
Justin Hibbits cd3cc6e910 i2c/sensors: Add driver for W83793 hardware monitor
The Winbond/Nuvoton W83793G system monitor chip includes many features
not currently supported by this driver.  The following are currently
supported:

* Up to 6 temperature sensors, 4 of which have 10-bit resolution
  (8.2),two with 8-bit resolution (no decimal component)
* Up to 12 fans
  - Fans 0-4 (1-5 on the datasheet) are always enabled.  The remaining 7
    fans are individually enabled.
* Multiple voltage sensors, reading up to 10 voltage sources.  Sysctls
  are labeled to match the datasheet.
* Chassis open detection.

The W83793AG is a feature-reduced version, which lacks 3 thermal diodes
and 2 voltage monitors.  Since there is no way to tell the difference
between the W83793AG and W83793G programmatically, sensors reported on
the W83793AG will report strange values.

Temperature sensors and 7 of the fans can be individually enabled on the
chip, but currently not configured by this driver.  The driver only
reports what was configured by the firmware.  Additionally, this driver
numbers the sensors and fans according to the datasheet, so even if, for
instance, fan 8 is disabled, it would skip from fan 7 to fan 9, it does
not renumber.  This makes it easier to follow for hardware debugging
purposes.

Missing features:
* Smart Fan support
* Fan PWM control
* ASF (Alert Standard Format)

Only Bank 0 registers are used at this time.

Reviewed by:	adrian
Differential Revision:	https://reviews.freebsd.org/D56776
2026-05-19 22:05:00 -04:00
Ed Maste 3c07cfb252 elfdump: Decode SHT_LLVM_ADDRSIG section header type
Reported by:	bz
Sponsored by:	The FreeBSD Foundation
2026-05-19 19:54:07 -04:00
John Baldwin d84a691a35 powerpc: Remove stale include line from MPC85XX
The stale include line caused config -m to fail with an error trying
to parse the config file during make universe/tinderbox which in turn
caused universe/tinderbox to abort without building any powerpc
kernels (or subsequent architectures such as riscv64) with the error:

make[2]: freebsd/main/Makefile:767: Target architecture for powerpc/conf/MPC85XX unknown.  config(8) likely too old.
        in .for loop from freebsd/main/Makefile:761 with kernel = MPC85XX
        in make[2] in directory "freebsd/main"

make[2]: stopped making "universe_kernels" in freebsd/main
*** Error code 1

Reported by:	npn, many others
Fixes:		fd8d34ce27 ("dpaa: Migrate from NCSW base to a home-grown driver")
2026-05-19 15:53:46 -04:00
Ryan Libby 296c174835 vnlru: avoid trigger calculation when force < 2
Reviewed by:	kib (previous version), olce
Sponsored by:	Dell Inc.
Differential Revision:	https://reviews.freebsd.org/D56950
2026-05-19 11:07:57 -07:00
John Baldwin 8de34a8422 arm64/iommu: Add a missing close parenthesis
Fixes:		6dc813301a ("sys: Use is_pci_device instead of direct comparisons to devclasses")
Sponsored by:	Chelsio Communications
2026-05-19 13:30:01 -04:00
John Baldwin 8c9dc47b5f vnic: Add missing #include
Reported by:	bz, olivier
Fixes:		6dc813301a ("sys: Use is_pci_device instead of direct comparisons to devclasses")
Sponsored by:	Chelsio Communications
2026-05-19 13:18:00 -04:00
Sergey A. Osokin 9958d0f1dc bsd-family-tree: add OpenBSD 7.9 2026-05-19 10:33:30 -04:00
Mark Johnston eeffed5aa0 tests/if_carp: Run all tests with execenv=jail
Otherwise failures can occur when running tests in parallel since some
tests reuse jail names.

MFC after:	1 week
2026-05-19 14:29:12 +00:00
Kyle Evans 8dad29555a linuxkpi: fix 32-bit arm build
The new KPI is only used in <asm/set_memory.h>, but it's provided in
linux_page.c.  The latter only includes the former indirectly by way of
<linux/io.h>, and that's only conditionally included outside of 32-bit
ARM there.

All of our archs have the necessary pmap_page_set_memattr(), so just
move the declaration into <linux/page.h> instead of trying to reason
about the usability of <asm/set_memory.h> directly in linux_page.c.

Reported by:	jenkins (via ivy)
2026-05-19 08:47:35 -05:00
Abdelkader Boudih 65341ec317 snd_hda: Reassign duplicate HDMI/DP pin sequences instead of disabling
Some firmware (e.g. Apple EFI on Sandy Bridge Mac hardware) programs all
HDMI/DP output pins in an association with identical sequence numbers.

The existing code disables the entire association on the first
duplicate, leaving HDMI/DP audio non-functional.

For digital output pins (HDMI/DP) with seq=0 duplicates, search for the
next free sequence slot and reassign the duplicate rather than
disabling.

The seq=0 restriction targets the known Apple firmware pattern; any
other duplicate sequence is more likely a genuine firmware error and the
association is still disabled.

Update first after reassignment so that hpredir is not left pointing at
a stale sequence. Non-digital and input associations retain the existing
disable behaviour.

MFC after:	1 week
Reviewed by:	christos
Differential Revision:	https://reviews.freebsd.org/D55473
2026-05-19 14:25:51 +02:00
Dag-Erling Smørgrav 1cfc208a07 tmpfs: Overhaul option handling on remount
On remount, we must accept all the same options as on initial mount.
For parameters which we're unable to modify on the fly, fail only if
the new value is different from the existing one.

PR:		295096
MFC after:	1 week
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D57044
2026-05-19 08:54:28 +02:00
Dag-Erling Smørgrav 4617a6cb82 nlist: Handle multiple symbol tables
* Instead of looking for and stopping at the first SHT_SYMTAB section,
  iterate over all SHT_DYNSYM and SHT_SYMTAB sections until we've either
  found all our symbols or run out.

* Perform bounds checks on section and string table offsets and sizes
  before attempting to mmap() the string table.

* Perform bounds checks on individual symbol table entries before
  attempting to access the corresponding strings.

* Stop treating _Foo and Foo as the same symbol.

This unbreaks OpenSSH which uses nlist(3) to verify PKCS#11 providers.

PR:		295336
MFC after:	1 week
Fixes:		77909f5978 ("Initial elf nlist support [...]")
Fixes:		644b4646c7 ("OpenSSH: Update to 10.1p1")
Reviewed by:	kib, emaste
Differential Revision:	https://reviews.freebsd.org/D57034
2026-05-19 08:53:35 +02:00
Adrian Chadd 8d36ec1c9c net80211: migrate wk_rxmic / wk_rxmic in TKIP code to accessors
These are the last two uses of the wk_rxmic / wk_txmic macros.
Everything should be using the accessor methods at ths point.

Reviewed by:	bz
Differential Revision:	https://reviews.freebsd.org/D54790
2026-05-18 22:28:49 -07:00
Adrian Chadd e56f7becc7 iwx: clean up / document noise floor and RSSI fetching
* Document what iwx_rxmq_get_signal_strength() is doing in a comment,
  noting what the firmware returns and what math is being done on it
  to turn it into a dBm value.

* Document what iwx_get_noise() is supposed to do, that we can't just
  go do math with log numbers like we're doing, but also that we're
  seeing zeros in this firmware (AX210), which may mean we're decoding
  using the wrong structs.

* Swizzle around the RSSI calculation as a function, add min/max RSSI
  values, and calculate RSSI against the noise floor.

* And handle the lowest noise floor value - it can't be -127dBm as
  that will throw things off.  Cap it at -100dBm which is a little
  lower than the thermal noise floor at 20MHz (-98dBm), but it matches
  IWX_MIN_DBM.

Differential Revision:	https://reviews.freebsd.org/D53780
2026-05-18 22:27:59 -07:00
Konstantin Belousov f6f5eb3190 linux/linux_common.h: make header self-contained
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2026-05-19 07:23:47 +03:00
Kyle Evans 67f7f2781d linuxkpi: work with numpages > 1 in the set_pages_*() KPIs
These calls are used for buddy pages at least in drm's ttm_pool, which
leads to a panic when we invoke lowmem handlers and drm tries to shrink
the pool.

Cope with numpages > 1 by traversing the contiguous pages and executing
the adjustment there, as well, as suggested by markj@.  Previous
versions have tried to use the corresponding `set_memory_*()` functions,
but it is believed that not updating `md.pat_mode` breaks subsequent
userspace mappings in ways that may result in things like screen tearing
or other artifacts when running i915kms.

This stabilized my amdgpu laptop running two VMs, chromium and a
concurrent buildworld.

Reviewed by:	bz, markj
Differential Revision:	https://reviews.freebsd.org/D57004
2026-05-18 22:22:21 -05:00
Ed Maste 762e451b31 nlist.3: Add stab(5) Xref
Commit 876a17321c removed the a.out Xref as nlist(3) no longer
supports a.out, but this left nlist(3) without a reference to a page
documenting struct nlist.

struct nlist is documented in both a.out(5) and stab(5), so add an Xref
to the latter.

Reported by:	brooks
Fixes: 876a17321c ("nlist.3: Replace a.out(5) Xref with elf(5)")
2026-05-18 20:16:13 -04:00
Ed Maste 94b7a33568 nlist.3: Add discouraged use notice
It is a relic from a.out days and is poorly specified. Although ELF
support was added to nlist, there are better ways to access ELF data.

Reviewed by:	kib
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57078
2026-05-18 19:56:00 -04:00