Commit graph

297304 commits

Author SHA1 Message Date
Bjoern A. Zeeb
b4886c4ece rtw88/rtw89: avoid duplicate top-level directory with debugfs
If people like me having multiple cards in the same system
creating the debugfs dirctory leads to a panic upon attaching
the 2nd card due to the duplicate name.
Rather than using the hard coded driver name, use the device name
(e.g., rtw880, rtw881, rtw882).
This solves two issues: it avoids the duplicate name and we get
individual debugging/statistic information for each card.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
X-Note:		ath1[01]k and mt76 likely will need a similar change
2025-01-31 23:53:31 +00:00
Bjoern A. Zeeb
446eab491e rtw89: turn on debugfs support
Following 07f6575585 also turn on debugfs support for rtw89.

Sponnsored by:	The FreeBSD Foundation
MFC after:	3 days
2025-01-31 23:53:31 +00:00
Bjoern A. Zeeb
1b840f09b6 LinuxKPI: 802.11: remove rate_lowest_index()
rate_lowest_index() is no longer used anywhere in our code.
Garbage collect it.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2025-01-31 23:53:31 +00:00
Bjoern A. Zeeb
c75a558d07 LinuxKPI: 802.11: implement ieee80211_get_{he,eht}_iftype_cap{,_vif}
Implement the combination of all four functions, the *_vif versions
from mac80211.h as a wrapper to the non-*_vif ones in cfg80211.h.
Put the function pairs next to each other and in the right files
and harmonize argument naming, etc.

Both of them have shown up too often in the todo-tracing to bother
enough to implement them now for a time in the future when we will
support HE/EHT.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2025-01-31 23:53:30 +00:00
Bjoern A. Zeeb
ecb2e5f9c3 LinuxKPI; 802.11 initalize ic_vht_cap.supp_mcs
Given the channel struct has an extra bool we cannot assign the
information 1:1 to net80211.  While the caps where assigned the
suppoerted mcs sets were not.  Fix that.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2025-01-31 23:53:30 +00:00
Gleb Smirnoff
2d99af9410 tcp: remove check for condition that never happens
A tcpcb in TCPS_LISTEN has always socket in SO_ACCEPTCONN.  One block
above there is an assertion that proves that this never happens.  We
stopped ever clearing SO_ACCEPTCONN back in 779f106aa1.

This reverts commit 982c1675ff.

Reviewed by:		cc, markj
Differential Revision:	https://reviews.freebsd.org/D48710
2025-01-31 14:24:24 -08:00
John Baldwin
858280e60f nvmecontrol devlist: Annotate connected Fabrics hosts
If a Fabrics host is connected, use the discovery log entry from the
reconnect parameters to output the transport type and address.

Reviewed by:	chuck
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D48731
2025-01-31 15:49:11 -05:00
John Baldwin
ad9dc97e4d nvmecontrol devlist: Handle disconnected Fabrics hosts
If a Fabrics host is disconnected, use the cached controller data
instead of reading the cdata via a pass-through command.  In addition,
annotate disconnected hosts including the amount of time since the
connection was lost.

Reviewed by:	chuck
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D48220
2025-01-31 15:48:21 -05:00
John Baldwin
38e1083940 nvmf: Add NVMF_CONNECTION_STATUS ioctl
This returns an nvlist indicating if a Fabrics host is connected and
the time of the most recent disconnection.

Reviewed by:	imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D48219
2025-01-31 15:47:58 -05:00
John Baldwin
4298ce72f6 nvme/nvmf: Add NVME_GET_CONTROLLER_DATA ioctl to fetch cached cdata
Both nvme and nvmf cache a copy of the controller's identify data in
the softc.  Add an ioctl to fetch this copy of the cdata.  This is
primarily useful for allowing commands like 'nvmecontrol devlist' to
work against a disconnected Fabrics host.

Reviewed by:	dab, imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D48218
2025-01-31 15:46:49 -05:00
Alfredo Mazzinghi
88b187401d iflib: Simplify CACHE_PTR_NEXT
Reviewed by:	Krzysztof Galazka <krzysztof.galazka@intel.com>
Obtained from:	CheriBSD
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D48446
2025-01-31 15:41:45 -05:00
John Baldwin
f66a407de2 sys: Add cpu_update_pcb hook
This MD function is invoked before dumping register set notes when
writing out a core dump to ensure that the PCB for a given thread is
up to date.  This provides a centralized place to update the PCB with
values of the current thread for each arch rather than doing this work
in each register set's get method.

Discussed with:	jrtc27
Reviewed by:	kib, markj
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D44910
2025-01-31 15:40:29 -05:00
John Baldwin
17b7a0c595 nvmft: Don't offline a port being removed if it is already offline
This is generally harmless but can trigger spurious warnings on the
console due to duplicate attempts to disable LUNs.

Sponsored by:	Chelsio Communications
2025-01-31 15:13:52 -05:00
Jessica Clarke
4015ff43cb vm: Fix overflow issues in vm_page_startup
Firstly, pagecount is a u_long so we should ensure j is the same for the
sake of 64-bit systems. Secondly, ptoa is just a macro, and does not
cast its argument, so in order to handle PAE systems correctly we need
to cast j to vm_paddr_t (the type of startp).

Fixes:	0078df5f02 ("vm_phys: reduce touching of page->pool fields")
2025-01-31 18:37:27 +00:00
Jean-Sébastien Pédron
e5764cf075
linuxkpi: Don't destroy the mutex in xa_destroy()
[Why]
The mutex initialized in `xa_init_flags()` is not destroyed here on
purpose. The reason is that on Linux, the xarray remains usable after a
call to `xa_destroy()`. For instance the i915 DRM driver relies on that
during the initialixation of its GuC. Basically, `xa_destroy()` "resets"
the structure to zero but doesn't really destroy it.

Reviewed by:	manu
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48762
2025-01-31 17:00:50 +01:00
Jean-Sébastien Pédron
2ee1311820
lindebugfs: Add debugfs_lookup()
[Why]
This function is used by hhe DRM generic code starting with Linux 6.7.

Reviewed by:	manu
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48761
2025-01-31 17:00:50 +01:00
Jean-Sébastien Pédron
f570760e5f
linuxkpi: Add several headers to reproduce namespace pollution
[Why]
The i915 DRM driver relies on this chain of includes to access the
definition of `struct tasklet_struct` in `<linux/interrupt.h>`.

Reviewed by:	imp, manu
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48760
2025-01-31 17:00:49 +01:00
Jean-Sébastien Pédron
73281513fc
linuxkpi: Add pci_wake_from_d3()
[Why]
This is used by the amdgpu DRM driver starting with Linux 6.7.

[How]
The function just returns 0 for now.

Reviewed by:	manu
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48759
2025-01-31 17:00:49 +01:00
Jean-Sébastien Pédron
8bdb76f202
linuxkpi: Add dev_is_removable()
[Why]
This is used by the amdgpy DRM driver starting from Linux 6.7.

[How]
The function always returns false, like `pci_is_thunderbolt_attached()`
because we don't have an API for this in FreeBSD yet.

Reviewed by:	manu
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48758
2025-01-31 17:00:49 +01:00
Jean-Sébastien Pédron
e3cf2321b0
linuxkpi: Add get_file_active()
[Why]
This is used by the i915 DRM driver starting from Linux 6.7.

Reviewed by:	manu
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48757
2025-01-31 17:00:49 +01:00
Jean-Sébastien Pédron
1de8fcf419
linuxkpi: Add Linux 6.7 get_file_rcu() variant
[Why]
In Linux 6.7, the signature of `get_file_rcu()` changed significantly,
going from:

    bool get_file_rcu(struct linux_file *f);

... to:

    struct linux_file * get_file_rcu(struct linux_file **f);

I.e., both the argument and the return value changed in an incompatible
way.

This is used by the i915 DRM driver.

[How]
This patch introduces the variant and hide the new prototype behind
`LINUXKPI_VERSION >= 60700`.

Reviewed by:	manu
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48756
2025-01-31 17:00:49 +01:00
Jean-Sébastien Pédron
be818f265e
linuxkpi: Use same field names in struct xarray as Linux
[Why]
The i915 DRM driver started to access the `xa_lock` field in Linux 6.7.

Reviewed by:	manu
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48754
2025-01-31 17:00:48 +01:00
Jean-Sébastien Pédron
668fe90dc8
linuxkpi: Add xa_alloc_cyclic_irq()
[Why]
This function is used by the i915 DRM driver starting with Linux 6.7.

Reviewed by:	manu
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48753
2025-01-31 17:00:48 +01:00
Jean-Sébastien Pédron
3fd7fd4974
linuxkpi: Add __assign_bit()
[Why]
This function is used by the i915 DRM driver in Linux 6.7.

Reviewed by:	manu
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48752
2025-01-31 17:00:48 +01:00
Jean-Sébastien Pédron
2da778e62e
linuxkpi: Include <linux/{types,io}.h> from <video/vga.h>
[Why]
Some files in the i915 DRM driver in Linux 6.7 depend on these implicit
inclusions.

Reviewed by:	manu
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48751
2025-01-31 17:00:48 +01:00
Jean-Sébastien Pédron
08c2f6cf46
linuxkpi: Unify definition of outb()
[Why]
It is already defined in <asm-generic/io.h> to use the FreeBSD versions.

Reviewed by:	manu
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48750
2025-01-31 17:00:48 +01:00
Jean-Sébastien Pédron
d526b2115e
linuxkpi: Add num_online_nodes()
[Why]
This is used by the amdkfd DRM driver in Linux 6.7.

Reviewed by:	manu
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48749
2025-01-31 17:00:47 +01:00
Jean-Sébastien Pédron
f4ffe67739
linuxkpi: Add private_data to struct shrinker
[Why]
This field is used by the i915 DRM driver in Linux 6.7.

Reviewed by:	manu
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48748
2025-01-31 17:00:47 +01:00
Jean-Sébastien Pédron
479c61bd5f
linuxkpi: Add pci_get_base_class()
[Why]
This new API is used by the amdgpu DRM driver is Linux 6.7.

[How]
This is the same as `pci_get_class()` except that it searches a PCI
device matching the base class only; the subclass is ignored.

Reviewed by:	manu
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48746
2025-01-31 17:00:47 +01:00
Jean-Sébastien Pédron
c118e4da12
pci: Add pci_find_base_class_from()
[Why]
linuxkpi needs to export `pci_get_base_class()` for DRM drivers from
Linux 6.7.

[How]
This new function searches a PCI device with the given base class and
returns it, regardless of its subclass.

The behavior is the same as `pci_find_class_from()` but the subclass is
ignored.

Reviewed by:	manu
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48745
2025-01-31 17:00:47 +01:00
Jean-Sébastien Pédron
cd245b7941
linuxkpi: Add kstrtou32()
[Why]
This is used by the amdgpu DRM driver in Linux 6.7.

Reviewed by:	manu
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48744
2025-01-31 17:00:47 +01:00
Jean-Sébastien Pédron
03e39d3d42
linuxkpi: Declare PCI_IRQ_LEGACY even for linuxkpi 6.7
[Why]
DRM drivers in Linux 6.7 already use this constant.

Reviewed by:	manu
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48742
2025-01-31 17:00:46 +01:00
Jean-Sébastien Pédron
2cd5324153
linuxkpi: Add idr.h -> radix-tree.h -> rcupdate.h includes
[Why]
Some files in DRM rely on namespace pollution: they use the
<linux/rcupdate.h> API without including it explicitly.

[How]
Reproduce the Linux chain of includes even if it means nothing on
FreeBSD. This allows consumers of <linux/idr.h> to "inherit"
<linux/rcupdate.h> API.

Reviewed by:	manu
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48741
2025-01-31 17:00:46 +01:00
Jean-Sébastien Pédron
9136a44a2d
linuxkpi: Add <linux/cec.h>
Reviewed by:	manu
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48740
2025-01-31 17:00:42 +01:00
Mark Johnston
afc38f1f23 sysctl: Add a regression test which runs sysctl -a
Run sysctl -a during the test suite so that KASAN/KMSAN have a chance to
catch something.

Inspired by https://jprx.io/cve-2024-54507/

Reviewed by:	jhb, emaste
MFC after:	2 weeks
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D48659
2025-01-31 15:22:24 +00:00
Alexander Leidinger
1c2ae9233b Limit some cc options based upon features
Limit the use of stack clash protection and zeroregs based upon
compiler features:
 - switch unconditional use of stack clash protection into a compiler
   feature
 - limit the use of stack clash protection on unsupported architectures
   (I did not wade into the source of each compiler to determine when
   support arrived for each architecture, I used the compiler version
   when it was introduced with what is supported currently)
 - add a safeguard for stack clash protection in places where we have no
   SSP provisions (we may not need it, but better safe than sorry when
   something changes or is overridden by the user)
 - limit the use of zeroregs the same way, so that even specifying it
   will not lead to build failures (useful for universe builds when
   WITH_ZEROREGS is specified in src.conf)

Differential Revision:	https://reviews.freebsd.org/D48724
2025-01-31 13:15:29 +01:00
Andrew Gallatin
36fdc42c6a mlx5en: Fix SIOCSIFCAPNV
In 4cc5d081d8, a change was introduced that manipulated
drv_ioctl_data->reqcap using IFCAP2 bits.  This was noticed
when creating a mixed lagg with mce0 and ixl0 caused the
interfaces' txcsum caps to be disabled.

Fixes: 4cc5d081d8
Reviewed by: glebius
Sponsored by: Netflix
MFC After: 7 days
2025-01-30 20:57:35 -05:00
Kirk McKusick
6cd973d903 Update date of ffs.4 manual page. 2025-01-30 17:31:08 -08:00
Kirk McKusick
1111a44301 Defer the January 19, 2038 date limit in UFS1 filesystems to February 7, 2106
UFS1 uses a signed 32-bit value for its times. Zero is
January 1, 1970 UTC. Negative values of 32-bit time predate
January 1, 1970 back to December 13, 1901. The maximum positive
value for 32-bit time is on January 19, 2038 (my 84th birthday).
On that date, time will go negative and start registering from
December 13, 1901. Note that this issue only affects UFS1 filesystems
since UFS2 has 64-bit times. This fix changes UFS1 times from
signed to unsigned 32-bit values. With this change it will no longer
be possible to represent time from before January 1, 1970, but it
will accurately track time until February 7, 2106. Hopefully there
will not be any FreeBSD systems using UFS1 still in existence by
that time (and by then I will have been dead long enough that no-one
will know at whom to yell :-).

It is possible that some existing UFS1 systems will have set times
predating January 1, 1970. With this commit they will appear as
later than the current time. This commit checks inode times when
they are read into memory and if they are greater than the current
time resets them to the current time. By default this reset happens
silently, but setting the sysctl vfs.ffs.prttimechgs=1 will cause
console messages to be printed whenever a future time is changed.

Reviewed-by: kib
Tested-by:   Peter Holm
MFC-after:   1 week
Differential Revision: https://reviews.freebsd.org/D48472
2025-01-30 17:31:08 -08:00
Simon J. Gerraty
a69ac6ee79 Fix mangled bmake makefile 2025-01-30 17:02:45 -08:00
Simon J. Gerraty
6a7405f5a6 Merge bmake-20250125
Merge commit '5ad769f660f3d00853bc739f82d9bc62f6a682cb'
2025-01-30 15:51:52 -08:00
Simon J. Gerraty
5ad769f660 Import bmake-20250125
Intersting/relevant changes since bmake-20240711

ChangeLog since bmake-20240711

2025-01-25  Simon J Gerraty  <sjg@beast.crufty.net>

	* VERSION (_MAKE_VERSION): 20250125
	Merge with NetBSD make, sync up below change.

	* unit-tests/Makefile: remove $TMPDIR via .END
	to avoid failure in test on NFS - since the temp file for the
	target script is open and thus gets renamed by the server rather
	than removed.

2025-01-20  Simon J Gerraty  <sjg@beast.crufty.net>

	* VERSION (_MAKE_VERSION): 20250120
	Merge with NetBSD make, pick up
	o use FORK_FUNCTION so it can be forced to fork when doing coverage.
	o main.c: avoid memory allocation in error path after exec failure.

2025-01-16  Simon J Gerraty  <sjg@beast.crufty.net>

	* VERSION (_MAKE_VERSION): 20250116
	Merge with NetBSD make, pick up
	o clarify that undefined expressions are allowed in dependencies
	o simplify code for evaluating the '!=' variable assignment

2025-01-11  Simon J Gerraty  <sjg@beast.crufty.net>

	* VERSION (_MAKE_VERSION): 20250111
	Merge with NetBSD make, pick up
	o replace "Malformed conditional" with "Variable is undefined"
	when appropriate

2025-01-10  Simon J Gerraty  <sjg@beast.crufty.net>

	* VERSION (_MAKE_VERSION): 20250110
	Merge with NetBSD make, pick up
	o job.c: remove some unnecessary layers in job handling
	o unit-tests: test expressions based on undefined variables

2025-01-01  Simon J Gerraty  <sjg@beast.crufty.net>

	* VERSION (_MAKE_VERSION): 20250101
	Merge with NetBSD make, pick up
	o var.c: reduce pointer indirections when unexporting a variable

2024-12-12  Simon J Gerraty  <sjg@beast.crufty.net>

	* VERSION (_MAKE_VERSION): 20241212
	* mk/ updates

2024-11-24  Simon J Gerraty  <sjg@beast.crufty.net>

	* VERSION (_MAKE_VERSION): 20241124
	Merge with NetBSD make, pick up
	o var.c: fix confusing error message when overriding a read-only
	variable

2024-11-22  Simon J Gerraty  <sjg@beast.crufty.net>

	* VERSION (_MAKE_VERSION): 20241122
	Merge with NetBSD make, pick up
	o unit-tests/Makefile: optimize running of tests skip extra cat
	in 99% of cases.

2024-11-15  Simon J Gerraty  <sjg@beast.crufty.net>

	* VERSION (_MAKE_VERSION): 20241114
	Merge with NetBSD make, pick up
	o make.1: note that MAKEOBJPREFIX should be absolute path
	also that it can be set via makefile if suitable care taken.

2024-11-10  Simon J Gerraty  <sjg@beast.crufty.net>

	* VERSION (_MAKE_VERSION): 20241110
	Merge with NetBSD make, pick up
	o make: allow .../ (search here and above) in
	.MAKE.MAKEFILE_PREFERENCE and -f argument.

2024-11-03  Simon J Gerraty  <sjg@beast.crufty.net>

	* VERSION (_MAKE_VERSION): 20241101
	Merge with NetBSD make, pick up
	o parse.c: report filename:linenumber in parse debug output

2024-09-21  Simon J Gerraty  <sjg@beast.crufty.net>

	* VERSION (_MAKE_VERSION): 20240921
	Merge with NetBSD make, pick up
	o make.1: Only list the defaults for MAKEFILE_PREFERENCE once.

	* Makefile: use genfiles.mk to generate ${MAN}
	so that it can be tuned for local site.
	Ensure MAN  is defined before including Makefile.inc

	* Makefile: use MK_GEN_MAN to make it easier to control whether we
	generate ${MAN}

2024-09-16  Simon J Gerraty  <sjg@beast.crufty.net>

	* VERSION (_MAKE_VERSION): 20240909

	* arch.c: fix NetBSD PR 58597

2024-09-01  Simon J Gerraty  <sjg@beast.crufty.net>

	* Makefile: use SUBDIR.${MK_TESTS} so that we skip
	unit-tests for obj and clean when FreeBSD is building WITHOUT_TESTS

	* VERSION (_MAKE_VERSION): 20240901
	Merge with NetBSD make, pick up
	o reduce line length in error messages
	o var.c: simplify printing of an evaluation stack element

2024-08-29  Simon J Gerraty  <sjg@beast.crufty.net>

	* VERSION (_MAKE_VERSION): 20240828
	Merge with NetBSD make, pick up
	o add more context to error message about recursive variables
	o treat recursive variables non-fatally - continue parsing to end
	of makefile

2024-08-12  Simon J Gerraty  <sjg@beast.crufty.net>

	* VERSION (_MAKE_VERSION): 20240808
	Merge with NetBSD make, pick up
	o improve some error messages for better clarify and readability

2024-07-22  Simon J Gerraty  <sjg@beast.crufty.net>

	* VERSION (_MAKE_VERSION): 20240722
	Merge with NetBSD make, pick up
	o job.c: remove dead code

2024-07-21  Simon J Gerraty  <sjg@beast.crufty.net>

	* VERSION (_MAKE_VERSION): 20240720
	Merge with NetBSD make, pick up
	o compat.c: do not run commands that have parse or evaluation errors.
	o var.c: remove wrong error message about an undefined variable

mk/ChangeLog since bmake-20240711

2025-01-10  Simon J Gerraty  <sjg@beast.crufty.net>

	* rust.mk: use RUST_LIBS and RUST_PROGS

2025-01-01  Simon J Gerraty  <sjg@beast.crufty.net>

	* install-mk (MK_VERSION): 20250101

	* use W flag to :S and :C rather than :tW

2024-12-16  Simon J Gerraty  <sjg@beast.crufty.net>

	* rust.mk: add RUSTFLAGS if needed

2024-12-12  Simon J Gerraty  <sjg@beast.crufty.net>

	* init.mk (OBJS_SRCS_FILTER): apply this as
	${OBJS_SRCS_FILTER:ts:} as we do in FreeBSD.

2024-12-03  Simon J Gerraty  <sjg@beast.crufty.net>

	* install-mk (MK_VERSION): 20241202

	* setopts.sh: needed by newlog.sh

2024-11-22  Simon J Gerraty  <sjg@beast.crufty.net>

	* meta.sys.mk: add META_MODE_XTRAS to META_MODE to make it
	easier to add things like 'env' when debugging.

	* install-mk (MK_VERSION): 20241122

	* rust.mk: rename CARGO* to RUST_CARGO* so I don't feel
	like this makefile should be renamed to cargo.mk

2024-11-11  Simon J Gerraty  <sjg@beast.crufty.net>

	* dirdeps.mk: add DIRDEPS_CACHED_ENV to dirdeps-cached and
	DIRDEP_USE_EPILOGUE to _DIRDEP_USE

2024-10-30  Simon J Gerraty  <sjg@beast.crufty.net>

	* meta.sys.mk: if MK_META_ERROR_TARGET is yes and NEWLOG_SH is
	set, and ERROR_LOGDIR already exists, hook _rotateErrorLog to
	.BEGIN target.

2024-10-27  Simon J Gerraty  <sjg@beast.crufty.net>

	* options.mk: add support for DEBUG_OPTIONS (similar to
	DEBUG_DIRDEPS) to allow us to see where options get set.
	Eg. DEBUG_OPTIONS="STAGING*" gives:

	bmake[1]: "mk/options.mk" line 89: sys.mk: MK_STAGING=yes (MK_DIRDEPS_BUILD=no)
	bmake[1]: "mk/options.mk" line 66: local.init.mk: MK_STAGING=yes
	bmake[1]: "mk/options.mk" line 66: local.init.mk: MK_STAGING_PROG=no
	bmake[1]: "mk/options.mk" line 89: own.mk: MK_STAGING_MAN=yes (MK_STAGING=yes)
	bmake[1]: "mk/options.mk" line 89: own.mk: MK_STAGING_PROG=no (MK_STAGING=yes)
	bmake[1]: "mk/options.mk" line 89: own.mk: MK_STAGING_RUST=no (MK_STAGING_PROG=no)

	* own.mk: fix setting of STAGE_OBJTOP (normally set by sys.dirdeps.mk)

2024-10-26  Simon J Gerraty  <sjg@beast.crufty.net>

	* rust.mk: add some documentation and support for staging

2024-10-25  Simon J Gerraty  <sjg@beast.crufty.net>

	* rust.mk: a means of integrating Rust projects into a larger build.

2024-10-18  Simon J Gerraty  <sjg@beast.crufty.net>

	* dirdeps-targets.mk: if DEBUG_DIRDEPS_TARGETS and we found
	STATIC_DIRDEPS_CACHE, report its relative path.

2024-09-30  Simon J Gerraty  <sjg@beast.crufty.net>

	* dirdeps.mk: tweak the debug message for "Loading" a
	Makefile.depend file, always report what the actual makefile is
	with the DIRDEP it is for.
	Remove the redundant "Looking" message.

2024-09-26  Simon J Gerraty  <sjg@beast.crufty.net>

	* meta2deps.py: when raising AssertionError include meta file name
	with $SB trimmed if possible.

2024-09-23  Simon J Gerraty  <sjg@beast.crufty.net>

	* meta2deps.py: replace assert() with raise AssertionError when we
	detect missing eXits, to ensure a meaningful message gets into
	log.

2024-09-21  Simon J Gerraty  <sjg@beast.crufty.net>

	* install-mk (MK_VERSION): 20240921

	* FILES: add genfiles.mk

2024-09-20  Simon J Gerraty  <sjg@beast.crufty.net>

	* install-mk (MK_VERSION): 20240920

	* cython.mk: Get PYTHON_VERSION from PYTHON

2024-08-31  Simon J Gerraty  <sjg@beast.crufty.net>

	* subdir.mk: add ${SUBDIR.yes} - allows for SUBDIR.${MK_*}
	  and handle subdir with '-' in its name.

2024-08-23  Simon J Gerraty  <sjg@beast.crufty.net>

	* install-mk (MK_VERSION): 20240820

	* links.mk: Allow a filter to be applied to SYMLINKS etc.
	It is up to [BUILD_][SYM]LINKS_FILTER to do something sane.
	Also only claim we are making a symlink if the value changed.
2025-01-30 15:38:13 -08:00
Dag-Erling Smørgrav
4a1b0a9e2b unifdef: Restore damaged test case.
The input for the hash_comment test case was damaged in a cleanup sweep.
Restore the original input and tweak it slightly so it no longer matches
the regex used in said sweep.

Sponsored by:	Klara, Inc.
Fixes: 5e3934b15a
2025-01-30 22:38:07 +01:00
Dag-Erling Smørgrav
c63af363c2 unifdef: Fix collision check when adding symbols.
findsym() is intended for use while parsing input, so it should not be
called from addsym2() or indirectsym(), which are called before any
input is processed.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D48733
2025-01-30 22:10:46 +01:00
Colin Percival
ace4637ee0 vmimage.subr: Redirect etcupdate log to stdout
While we're here, send the etcupdate log from generating base.txz
to stdout instead of /dev/null (see e972e408d1) as well.

Reviewed by:	emaste, gordon, jrtc27
MFC after:	1 week
Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D48719
2025-01-30 11:29:53 -08:00
Zhenlei Huang
08aa7128de sysctl: Teach sysctl to attach and run itself in a jail
This allows the parent jail to retrieve or set kernel state when child
does not have sysctl(8) installed (e.g. light weighted OCI containers
or slim jails).

This is especially useful when manipulating jail prison or vnet sysctls.
For example, `sysctl -j foo -Ja` or `sysctl -j foo net.fibs=2`.

Reviewed by:	dfr (previous version), markj
MFC after:	1 week
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D48618
2025-01-31 02:20:41 +08:00
Zhenlei Huang
6193855fc7 sysctl: Refactor function parsefile()
Let the caller open the file and pass in the file handler. This can
benefit an upcoming change so that we will have cleaner logic.

No functional change intended.

Suggested by:	markj
MFC after:	1 week
2025-01-31 02:20:41 +08:00
Zhenlei Huang
903c7cdac5 vnet: Fix style nits
MFC after:	3 days
2025-01-30 23:59:35 +08:00
John Baldwin
ec282601f7 nvmecontrol: Only do name resolution once for Fabrics connections
Reuse the addrinfo structure from the admin queue to establish
connections to I/O queues for the TCP transport.

Reviewed by:	dab, imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D48456
2025-01-30 10:50:58 -05:00
John Baldwin
10d188ae2c nvmecontrol: Consolidate error paths in connect_nvm_queues()
Zero the I/O queue array earlier so that disconnect_nvm_queues() can
be safely used for earlier failures.

Suggested by:	dab
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D48654
2025-01-30 10:50:38 -05:00