Commit graph

290132 commits

Author SHA1 Message Date
Brooks Davis 4517b7a2d5 Add another commit to .git-blame-ignore-revs 2024-03-15 23:11:52 +00:00
Brooks Davis 66957ade1e bsd.opts.mk: drop transtion aid for NO_* options
Setting NO_CTF, NO_DEBUG_FILES, NO_INSTALLLIB, NO_MAN, NO_PROFILE,
and NO_WARNS was deprecated in 2014 and made an error prior to the
13.0.0 release in commit d3a5bf95f2.
Likewise, NO_WERROR was made an error prior to 13.0.0 in commit
7fa2f2a62f.

Remove this transition aid making these variables no-ops as setting them
will result in an error on all supported releases.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44345
2024-03-15 23:00:46 +00:00
Brooks Davis b12090676c lib{c,sys}: correctly expose sched_getcpu
When moving the implementation, I failed to move the symbol entry.

Reviewed by:	kib
Fixes:		84dd0c080b libc: libc/gen/sched_getcpu_gen.c -> libsys/
Differential Revision:	https://reviews.freebsd.org/D44112
2024-03-15 22:52:07 +00:00
David E. O'Brien 87740ff2ac diff(1) add FreeBSD HISTORY 2024-03-15 15:26:12 -07:00
David E. O'Brien 63a6bd2fc8 SYSCTL(9): correct typo 2024-03-15 14:53:10 -07:00
David E. O'Brien c4ff9276a9 strnlen(3): add HISTORY
Complete 4b7f35db's HISTORY's train of thought
2024-03-15 14:52:47 -07:00
PauAmma 140119a60d ifconfig.8: add missing "be"
Reviewed by:	allanjude, bjk
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D44022
2024-03-15 14:16:53 -07:00
Gleb Smirnoff 2497c70f81 vnet: remove unneeded backslash
Fixes:	430e0e409c
2024-03-15 12:17:04 -07:00
John Baldwin e48770de68 arm64: Use void pointers for arguments to arm64_get_writable_addr
No functional change, but this reduces diffs with CheriBSD downstream.

Reviewed by:	andrew
Sponsored by:	University of Cambridge, Google, Inc.
Differential Revision:	https://reviews.freebsd.org/D44344
2024-03-15 10:10:24 -07:00
John Baldwin 66658b0f27 arm busdma: Fix parameter types to exclusion_bounce_check
These are bus addresses not CPU virtual addresses.

Reviewed by:	andrew
Sponsored by:	University of Cambridge, Google, Inc.
Differential Revision:	https://reviews.freebsd.org/D44343
2024-03-15 10:10:07 -07:00
John Baldwin 1e3f42b6ba arm64: Switch the address argument to cpu_*cache* to a pointer
No functional change, but this reduces diffs with CheriBSD downstream.

Reviewed by:	andrew
Sponsored by:	University of Cambridge, Google, Inc.
Differential Revision:	https://reviews.freebsd.org/D44342
2024-03-15 10:09:49 -07:00
John Baldwin eab7ae7811 arm64 gicv3: Use void pointers instead of vm_offset_t
This removes the need for local diffs in CheriBSD where vm_offset_t
is an address and not the same as a uintptr_t.  No functional change.

Reviewed by:	imp, andrew
Sponsored by:	University of Cambridge, Google, Inc.
Differential Revision:	https://reviews.freebsd.org/D44341
2024-03-15 10:09:29 -07:00
John Baldwin 1b38f851d8 nvmecontrol: Update the test for a valid firmare revision slot
Reported by:	Coverity Scan
CID:		1539214
Fixes:		7485926e09 nvme: Firmware revisions in the firmware slot info logpage are ASCII strings
2024-03-15 08:18:47 -07:00
Warner Losh d2a824c29d share/mk: Don't install only differing in case files on case insensitive fs
MacOS has case insensitive filesystems by default. So trying to link
between foo.X and FOO.X causes an error of some sort since we unlink the
old foo file destroying the newly installed foo due to the insensitive
nature of the FS. Assume that this is true on darwin/macos, though it is
only try by default there.

Perhaps install should grow smarts to know when this is the case, though
that looked much trickier. There didn't seem to be a flag to check. This
would be better, imho, since we could still write the METALOG data
correctly (images created from these metalogs are imperfect due to this
relatively issue...).

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D44347
2024-03-15 09:01:25 -06:00
Warner Losh a00f9e4e81 scsi: Stop installing both cam.4 and CAM.4
There's no real benefit from installing both cam.4 and CAM.4. The latter
is not an kernel option. This hits a pathological case in mlinks: we're
trying to link to another file and the second link fails on
case-preserving, case-insensitive filesystems, like on MacOS by default.
Since we don't need both, avoid this pathological case.

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D44346
2024-03-15 09:01:25 -06:00
Baptiste Daroussin 9eae9233fd nuageinit: be case insentive when looking got labels
Reported by:	Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
2024-03-15 15:15:03 +01:00
Baptiste Daroussin 5c318f5ce3 pkgbase: remove packages which do not exists anymore 2024-03-15 14:51:40 +01:00
Baptiste Daroussin b8c053c9a6 nuageinit: add missing comment and descriptions for the package 2024-03-15 11:39:20 +01:00
Baptiste Daroussin c051f22bce mtree: add the directory for the nuageinit tests 2024-03-15 10:42:53 +01:00
Baptiste Daroussin 0e2bf3002f src.conf(5): regen after addition of nuageinit 2024-03-15 09:22:43 +01:00
Baptiste Daroussin a42d6f7601 nuageinit: add basic support for cloudinit.
this is a very early script to support cloudinit, it does not intend to
be a full featured cloudinit client, but will support a good enough
subset to be viable in most case.

It support nocloud and openstack config-2 config drive mode (iso9660 or
msdosfs)

The following features are currently supported:
- adding users (including a default user named 'freebsd' with password
  'freebsd'
- adding groups
- adding ssh keys
- static ipv4, static ipv6, dynamic ipv4

With this one is able to use the 'bring your own image feature" out of
box.

It is expected that the script grows the support of other clouds
supporting cloud-init, contributions are welcomed.

It is designed to be only run once via the firstboot mecanism.

Sponsored by:	OVHCloud
MFC After:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D44141
2024-03-15 09:22:16 +01:00
Kyle Evans 3705d679a6 if_wg: use proper barriers around pkt->p_state
Without appropriate load-synchronization to pair with store barriers in
wg_encrypt() and wg_decrypt(), the compiler and hardware are often
allowed to reorder these loads in wg_deliver_out() and wg_deliver_in()
such that we end up with a garbage or intermediate mbuf that we try to
pass on.  The issue is particularly prevalent with the weaker
memory models of !x86 platforms.

Switch from the big-hammer wmb() to more explicit acq/rel atomics to
both make it obvious what we're syncing up with, and to avoid somewhat
hefty fences on platforms that don't necessarily need this.

With this patch, my dual-iperf3 reproducer is dramatically more stable
than it is without on aarch64.

PR:		264115
MFC after:	1 week
Reviewed by:	andrew, zlei
Differential Revision:	https://reviews.freebsd.org/D44283
2024-03-14 20:19:21 -05:00
Rick Macklem 89f1dcb3eb vfs_vnops.c: Use va_bytes >= va_size hint to avoid SEEK_DATA/SEEKHOLE
vn_generic_copy_file_range() tries to maintain holes
in file ranges being copied, using SEEK_DATA/SEEK_HOLE
where possible,

Unfortunately SEEK_DATA/SEEK_HOLE operations can take
a long time under certain circumstances.
Although it is not currently possible to know if a file has
unallocated data regions, the case where va_bytes >= va_size
is a strong hint that there are no unallocated data regions.
This hint does not work well for file systems doing compression,
but since it is only a hint, it is still useful.

For the case of va_bytes >= va_size, avoid doing SEEK_DATA/SEEK_HOLE.

Reviewed by:	kib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D44509
2024-03-14 17:35:32 -07:00
Gordon Bergling 6a6ec90681 OpenBSM: Remove $FreeSBD$ tags from the configuration files
In e61dc6cac4 the configuration
files were taken off the vendor branch to help mergemaster
comparing them.

Since mergemaster will be deprecated and $FreeBSD$ tags aren't
used anymore, remove them.

While here, sync audit_filter with upstream commit 5e6da76 (typo).

Reviewed by:	imp
Approved by:	imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D44318
2024-03-14 07:02:44 +01:00
Simon J. Gerraty f974ced38a Update dirdeps.mk et al
bmake-20240309 includes updates to dirdeps and meta mode makefiles
2024-03-13 22:51:08 -07:00
Simon J. Gerraty 3ff501040b bmake Makefile.config 2024-03-13 22:08:29 -07:00
Simon J. Gerraty 51ca8a7a7d bmake updated config.h 2024-03-13 22:03:50 -07:00
Simon J. Gerraty c59c3bf34d Merge bmake-20240309
Merge commit '368b06ce6b0135d6de13f7265f6dcbaeb791b3bb'
2024-03-13 21:56:57 -07:00
Gleb Smirnoff ab8f59ceaf rack: don't define TCPOUTFLAGS
as the code doesn't use tcp_outflags.  This should fix gcc builds.
2024-03-13 21:07:59 -07:00
Simon J. Gerraty 368b06ce6b Need a blank line after brief summary 2024-03-13 19:16:35 -07:00
Simon J. Gerraty a6b892e1c7 Import bmake-20240309
Intersting/relevant changes since bmake-20240108

ChangeLog since bmake-20240108

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

	* boot-strap: tests can take a long time; use a cookie to
	skip them if bmake has not been updated since tests last
	ran successfully.

	* Makefile: Cygwin handles MANTARGET man

	* unit-tests/Makefile: set BROKEN_TESTS for Cygwin

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

	* VERSION (_MAKE_VERSION): 20240309
	Merge with NetBSD make, pick up
	o set .ERROR_EXIT to the exit status of .ERROR_TARGET
	this allows a .ERROR target to ignore the case of
	.ERROR_EXIT==6 which just means that the build actually
	failed somewhere else.

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

	* VERSION (_MAKE_VERSION): 20240303

	* var.c: on IRIX we need both inttypes.h and stdint.h

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

	* VERSION (_MAKE_VERSION): 20240301
	Merge with NetBSD make, pick up
	o export variables with value from target scope
	when appropriate.

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

	* VERSION (_MAKE_VERSION): 20240212
	Merge with NetBSD make, pick up
	o remove unneeded conditional-compilation toggles
	INCLUDES, LIBRARIES, POSIX, SYSVINCLUDE, SYSVVARSUB,
	GMAKEEXPORT NO_REGEX and SUNSHCMD

	* configure.in: add check for regex.h

	* var.c: replace use of NO_REGEX with HAVE_REGEX_H

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

	* VERSION (_MAKE_VERSION): 20240204
	Merge with NetBSD make, pick up
	o var.c: fix some lint (-dL) mode parsing issues

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

	* VERSION: (_MAKE_VERSION): 20240202
	Merge with NetBSD make, pick up
	o make.1: note that arg to :D and :U can be empty
	o var.c: $$ is not a parse error when .MAKE.SAVE_DOLLARS=no

mk/ChangeLog since bmake-20240108

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

	* install-mk (MK_VERSION): 20240309

	* meta.sys.mk: _metaError: if .ERROR_EXIT == 6, we do not
	want to save the .ERROR_META_FILE

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

	* install-mk (MK_VERSION): 20240220

	* sys.dirdeps.mk, dirdeps-targets.mk, init.mk:
	do not set .MAIN: dirdeps in sys.dirdeps.mk
	dirdeps-targets.mk will do that for top-level builds
	and init.mk will do it for others.
	This allows a Makefile which has no need of 'dirdeps' to
	set .MAIN for itself and "just work".

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

	* bsd.*.mk: for makefiles that get a bsd. symlink,
	use _this in  multiple inclusion tags since .PARSEFILE will not
	DTRT when such a makefile is included directly by Makefile and
	automatically (without bsd. prefix).
	Since we cannot guarantee that our sys.mk will be used, we provide
	a default _this in each makefile that gets a bsd. prefix such that
	the value is the same regardless of bsd. prefix.

	* subdir.mk: drop the !target guard on $SUBDIR_TARGETS

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

	* install-mk (MK_VERSION): 20240212

	* SPDX-License-Identifier: BSD-2-Clause
	Add SPDX-License-Identifier to inidicate that I consider
	my copyright on any of these makefiles equivalent to BSD-2-Clause

	* autoconf.mk: allow for configure.ac as currently recommended

	* subdir.mk: support @auto
	which is replaced with each subdir that
	has a [Mm]akefile.

	* subdir.mk: include local.subdir.mk if it exists.

	* subdir.mk: rework to handle .WAIT

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

	* subdir.mk: _SUBDIRUSE report the target we are entering subdirs for.

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

	* prog.mk: treat empty SRCS the same as undefined

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

	* Avoid undefined errors in lint (-dL) mode

	* man.mk (CMT2DOC_FLAGS): note that -mm does mdoc(7)

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

	* install-mk (MK_VERSION): 20240128

	* FILES: add ccm.dep.mk for C++ modules
	add suffixes.mk for common location for generic SUFFIX rules.

	* auto.dep.mk autodep.mk meta.autodep.mk: include ccm.dep.mk
	replace OBJ_EXTENSIONS with OBJ_SUFFIXES

	* autodep.mk: leverage CXX_SUFFIXES for __depsrcs
	and update style (spaces around = etc)

	* init.mk: add OBJS_SRCS_FILTER to filter SRCS when
	setting OBJS

	* meta2deps.py: handle multiple ./ embedded in path better.
2024-03-13 19:14:41 -07:00
Mark Peek 63a7c4be4a hyperv/hn: Don't return error when setting media to autoselect
Setting media to autoselect would always return EOPNOTSUPP.
As autoselect is the only valid media, this change now returns
success instead.

PR:		264253
Reported by:	Prakash Shiva <prakashs0234@gmail.com>
Reviewed by:	Dexuan Cui <decui microsoft com>, whu
Approved by:	whu
MFC after:	2 weeks
2024-03-14 00:05:19 +00:00
Konstantin Belousov 220ee18f19 netinet/tcp_var.h: always define IS_FASTOPEN() for kernel compilation env
and drop the definition for userspace (which matched TCP_RFC7413) since
it depends on presence of the kernel option.

Reviewed by:	glebius, rscheff
Sponsored by:	NVIDIA networking
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D44349
2024-03-14 01:20:58 +02:00
John Baldwin a7b9f4d96e Bump __FreeBSD_version for bus resource API change
Specifically, the change to remove redundant rid and type arguments
from bus_* when passing an allocated struct resource.
2024-03-13 15:14:23 -07:00
John Baldwin 9dbf5b0e68 new-bus: Remove the 'rid' and 'type' arguments from BUS_RELEASE_RESOURCE
The public bus_release_resource() API still accepts both forms, but
the internal kobj method no longer passes the arguments.
Implementations which need the rid or type now use rman_get_rid() or
rman_get_type() to fetch the value from the allocated resource.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44131
2024-03-13 15:05:54 -07:00
John Baldwin 2baed46e85 new-bus: Remove the 'rid' and 'type' arguments from BUS_*ACTIVATE_RESOURCE
The public bus_activate/deactivate_resource() API still accepts both
forms, but the internal kobj methods no longer pass the arguments.
Implementations which need the rid or type now use rman_get_rid() or
rman_get_type() to fetch the value from the allocated resource.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44130
2024-03-13 15:05:54 -07:00
John Baldwin d77f2092ce new-bus: Remove the 'type' argument from BUS_MAP/UNMAP_RESOURCE
The public bus_map/unmap_resource() API still accepts both forms, but
the internal kobj methods no longer pass the argument.
Implementations which need the type now use rman_get_type() to fetch
the value from the allocated resource.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44129
2024-03-13 15:05:54 -07:00
John Baldwin fef01f0498 new-bus: Remove the 'type' argument from BUS_ADJUST_RESOURCE
The public bus_adjust_resource() API still accepts both forms, but the
internal kobj method no longer passes the argument.  Implementations
which need the type now use rman_get_type() to fetch the value from
the allocated resource.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44128
2024-03-13 15:05:54 -07:00
John Baldwin 582b84cd25 pcib: Use rman_get_type in internal functions
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44127
2024-03-13 15:05:54 -07:00
John Baldwin 3351964c5e bhnd: Use rman_get_type in bhndb_find_resource_limits
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44126
2024-03-13 15:05:53 -07:00
John Baldwin 0ecee1602e acpi: Use rman_get_type in acpi_is_resource_managed
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44125
2024-03-13 15:05:53 -07:00
John Baldwin 9edb8d0aed new-bus: Introduce a simpler bus API for managing resources
Remove the 'type' and 'rid' arguments from the wrapper bus API
functions (e.g. bus_release_resource) that accept a struct resource.
The "new" versions extract the 'type' and/or 'rid' from the passed in
resource object via rman_get_type and rman_get_rid.

This commit adds the new API as functions with a _new suffix.  Wrapper
macros choose between the old and new functions based on the number of
arguments provided to the macro.  This commit does not change the ABI
but can be safely MFCd to older branches so long as older kernels use
rman_set_type when allocating resources.

Future commits will push the removal of these extraneous arguments
through the bus implementation.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44124
2024-03-13 15:05:53 -07:00
John Baldwin 1b9bcffff3 sys: Set the type of allocated bus resources
Use rman_set_type to set the type of allocated resources everywhere
rman_set_rid is currently called.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44123
2024-03-13 15:05:53 -07:00
John Baldwin b30a80b655 rman: Add rman_get/set_type
This permits associating a resource type (e.g. SYS_RES_MEMORY) with a
struct resource.

I considered adding a new field to struct rman to store the type and
only providing rman_get_type as an accessor.  However, changing
'struct rman' is an ABI breakage.  I might revisit this in main, but
the current approach is MFC'able.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44122
2024-03-13 15:05:53 -07:00
Richard Scheffenegger 85df11a1de ktls: deep copy tls_enable struct for in-kernel tcp consumers
Doing a deep copy of the keys early allows users of the
tls_enable structure to assume kernel memory.
This enables the socket options to be set by kernel threads.

Reviewed By:	#transport, tuexen, jhb, rrs
Sponsored by:	NetApp, Inc.
X-NetApp-PR:	#79
Differential Revision:	https://reviews.freebsd.org/D44250
2024-03-13 13:23:13 +01:00
Brooks Davis bf8a3a816d libc/softfloat: we don't export _fp[gs]et* symbols
Remove attempts to use NetBSD __weak_alias macros to export _-prefixed
versions of various fp[sg]et* symbols under softfloat.  __weak_alias
isn't defined so we didn't export them and thus the Symbol.map entries
were wrong.

Reviewed by:	jhibbits
Differential Revision:	https://reviews.freebsd.org/D44327
2024-03-13 20:35:41 +00:00
John Baldwin f980f48f13 Revert "new-bus: Disable assertions for rman mismatches for activate/deactivate"
With recent fixes to the ACPI and pcib drivers to translate mapping
requests of child resources into mappings of sub-ranges of parent
resources these assertions should now be true.

This reverts commit ed88eef140.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D43691
2024-03-13 13:19:10 -07:00
Brooks Davis ccf4d5eed2 lib{c,sys}: fix powerpcspe build
libsys/powerpc/Symbol.sys.map was removed due to all symbols moving to
libc.

Fixes:		d7847a8d35 lib{c,sys}: return wrapped syscall APIs to libc
2024-03-13 20:09:41 +00:00
Gleb Smirnoff e4315bbc85 tcp: move struct tcp_ifcap declaration under _KERNEL
Reviewed by:		rscheff, tuexen, kib
Differential Revision:	https://reviews.freebsd.org/D44340
2024-03-13 12:14:18 -07:00
Brooks Davis d7847a8d35 lib{c,sys}: return wrapped syscall APIs to libc
These provide standard APIs, but are implemented using another system
call (e.g., pipe implemented in terms of pipe2) or are interposed by the
threading library to support cancelation.

After discussion with kib (see D44111), I've concluded that it is
better to keep most public interfaces in libc with as little
as possible in libsys.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D44241
2024-03-13 18:36:02 +00:00