1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-21 07:15:49 +00:00
Commit Graph

295725 Commits

Author SHA1 Message Date
Graham Percival
10343013a4 manuals: Fix some .Bl -tag lists
Signed-off-by:	Graham Percival <gperciva@tarsnap.com>
Reviewed by:	mhorne, Alexander Ziaee <concussious.bugzilla@runbox.com>
MFC after:	3 days
Sponsored by:	Tarsnap Backup Inc.
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1528
2024-11-18 13:30:40 -04:00
Konstantin Belousov
645f8bcba9 ps.1: remove stray tab which breaks columns alignment
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2024-11-18 14:23:43 +02:00
Kristof Provost
83641335f9 pf: clean up pflow sockets on jail removal
pflow opens sockets in the kernel to transmit netflow information.
If this is done in a (vnet) jail these sockets end up preventing the removal of
the jail. The VNET_SYSUNINIT() vnet_pflowdetach() function doesn't get called,
but that's the function that would remove the sockets.

Install a callback on the PR_METHOD_REMOVE jail callback and close the sockets
there. This ensures that the jail can get cleaned up.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D47545
2024-11-18 11:06:46 +01:00
Peter Holm
43778a593f stress2: Added zfs test scenarios 2024-11-18 10:46:28 +01:00
Peter Holm
55aa53fbf2 stress2: Added a zfs regression test scenario 2024-11-18 10:40:16 +01:00
Matthew Nygard Dodd
f4f46a2eef hidraw(4): update hgd_actlen in HIDRAW_GET_REPORT ioctl
HIDRAW_GET_REPORT ioctl is documented to update hgd_actlen on return
with the number of bytes copied.  It does not do this.

Reviewed by:	wulf
PR:		282790
MFC after:	1 week
2024-11-18 07:31:39 +03:00
Matthew Nygard Dodd
0b5d86b38a uhid(4): update ugd_actlen in USB_GET_REPORT ioctl
USB_GET_REPORT ioctl is documented to update ugd_actlen on return with
the number of bytes copied.  It does not do this.

Reviewed by:	wulf
PR:		282790
MFC after:	1 week
2024-11-18 07:31:24 +03:00
Colin Percival
d54fdd1663 release: Remove empty suffix from file names
For "release" builds (as opposed to "snapshot" builds -- in this
context BETAs and RCs are "releases") ${SNAP_SUFFIX} is empty; but it
stuck into some ociimages filenames via a copy-and-paste error.

The final filenames on the download mirrors were not affected, so
this does not need to be merged to releng/14.2.

MFC after:	3 days
Sponsored by:	Amazon
2024-11-17 16:18:20 -08:00
Warner Losh
1bfc84289e cdefs.h: Fix bad version
It's -isoC-2024 not -isoC2023. Fix it

Noticed by: gperciva@tarsnap.com
Sponsored by: Netflix
2024-11-17 16:55:58 -07:00
Michael Tuexen
8caa2f5351 tcp: define tcp_lro_log() only when TCP_BLACKBOX is defined
Reviewed by:		rrs, Peter Lei
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D47401
2024-11-17 19:21:01 +01:00
Alan Cox
8c8d36b9d1 vm: static-ize vm_page_alloc_after()
This function is only intended for the internal use of the VM system.

Reviewed by:	dougm, kib, markj
Differential Revision:	https://reviews.freebsd.org/D47644
2024-11-17 12:19:00 -06:00
Jose Luis Duran
2a657b4ee9
ktrace.1: Add ARGS and ENVS as default trace points
After commit 65a4daeaf3 ("ktrace: log execve(2) arguments and
environment"), "a" and "e" are part of the default set of trace points.

Reviewed by:	markj
Approved by:	emaste (mentor)
Fixes:	65a4daeaf3 ("ktrace: log execve(2) arguments and environment")
Differential Revision:	https://reviews.freebsd.org/D47648
2024-11-17 18:12:06 +00:00
Adrian Chadd
8b51df0d4f wpa: add support for GCMP-128 and BIP-128.
If net80211 announces support for GCMP and/or BIP then configure it
appropriately.

GCMP will be used by WPA3 in the future, and BIP is required for
802.11w/MFP (which is also required by WPA3.)

Differential Revision: https://reviews.freebsd.org/D46499
2024-11-17 10:04:58 -08:00
Adrian Chadd
3d0d43d25a net80211: remove IEEE80211_FC0_QOSDATA
This is unused by anything in the tree; anything using it should be
instead using one of the frame type macros.

Differential Revision: https://reviews.freebsd.org/D47503
2024-11-17 09:53:16 -08:00
Adrian Chadd
c249cc3822 net80211: migrate FC0_TYPE_MASK / FC0_SUBTYPE_MASK frame type checks to macros
* Add macros for the management and control frame type checks that
  I've come across in the drivers.
* Delete some now old code (eg ath's ieee80211_is_action()) as there's now
  a macro for it.

Local testing:

* not yet, I have a lot of wifi devices to find and test against

Differential Revision: https://reviews.freebsd.org/D47500
2024-11-17 09:53:04 -08:00
Mark Johnston
aab7f19974 sh tests: Fix ktrace usage now that envvars are traced by default
Some sh tests use ktrace to see whether a particular file, specified in
the environment, was accessed by the shell.  After commit 65a4daeaf3,
this test matches the ktrace record generated by execve.

Use ktrace to only log name lookups, to avoid such false matches.

Fixes:	65a4daeaf3 ("ktrace: log execve(2) arguments and environment")
2024-11-17 17:37:34 +00:00
Mark Johnston
6817f3375b conf: Fix KCSAN enablement checking
Fixes:	6e3875ebcf ("sys: move SAN and COVERAGE options handling to kern.mk")
2024-11-17 16:40:33 +00:00
Michal Meloun
b882d21558 arm: link all .rodata variants into one output section
MFC after:	1 week
2024-11-17 12:35:55 +01:00
Michal Meloun
60e72eb16a arm: align data section to the supersection.
Offset based data section alignment is probably not applicable to any system
other than i386.

MFC after:	4 week
2024-11-17 12:05:42 +01:00
Michal Meloun
d98a18d032 arm: add read_frequently, read_mostly and exclusive_cache_line sections to linker script.
MFC after:	1 week
2024-11-17 12:05:14 +01:00
Michal Meloun
1701dfae1b arm: fix symbols around the .ARM.exidx section
Insert a direct assignment to the location counter to ensure that orphaned
sections cannot be emitted between the _exidx_start symbol and the .ARM.exidx
section.

Discussed with:	jrtc27
MFC after:	1 week
2024-11-17 12:00:45 +01:00
Michal Meloun
0381f0b63b arm: Fix typo in ldscript.arm.
MFC after:	1 week
2024-11-17 12:00:45 +01:00
Mitchell Horne
4b4e88d942 aw_wdog: disable timer on attach
Otherwise it may cause system reset before the watchdog can be pat. This
is consistent with other watchdog drivers.

Tested on Allwinner D1.

Reviewed by:	manu
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D47517
2024-11-16 15:55:27 -04:00
Doug Moore
f334c0b8b3 vm_page: use iterators in alloc_contig_domain
Restructure a bit of code to allow vm_page_alloc_contig_domain to use
pctrie iterators for lookup and insertion into the object radix tree,
to improve performance.

Reviewed by:	alc
Differential Revision:	https://reviews.freebsd.org/D47036
2024-11-16 13:15:05 -06:00
Mitchell Horne
184d0b3fe3 aw_syscon: enable for Allwinner D1 (riscv)
Add the relevant compatible string and build glue. Update the man page
with relevant compat strings.

Reviewed by:	manu
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D47516
2024-11-16 15:04:04 -04:00
Julien Cassette
c5c02a131a riscv: Allwinner D1 clock and reset driver
Add the SOC_ALLWINNER_D1 config option, following other platforms.

Co-authored-by:	mhorne
Reviewed by:	manu (previous version)
Sponsored by:	The FreeBSD Foundation (in part)
Differential Revision:	https://reviews.freebsd.org/D47515
2024-11-16 15:04:04 -04:00
Mitchell Horne
9ddd516b88 riscv: enable allwinner RTC
For the Allwinner D1 (Nehza) SBC.

This RTC driver is also a clock provider, which registers two fixed
clocks. In all the devices we currently support, the names of the clocks
are present in the "clock-output-names" property of the device tree.
This is not the case for the D1 DTS, as this property does not appear in
upstream. Therefore the clock definitions are statically assigned a
name, which is overridden when specified.

Reviewed by:	manu
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D47514
2024-11-16 15:04:04 -04:00
Ed Maste
4ef07eb080 getentropy: Add Git hashes corresponding to SVN references
getentropy has a comment about a special case to support kernels between
SVN revisions r331280 and r337999.  Add the corresponding Git hashes so
there's a usable reference after Subversion infrastructure disappears.

Sponsored by:	The FreeBSD Foundation
2024-11-16 10:22:46 -05:00
Ed Maste
2c2f741363 mfc-candidates: Improve hash expansion
`git rev-parse` is the canonical way to turn a short hash (or other
commit-ish) into a full hash.

Sponsored by:	The FreeBSD Foundation
2024-11-16 09:56:07 -05:00
Jose Luis Duran
12cbad923d
nanobsd: Fix typos
Fix a number of typos in the code or comments.
Files under dhcpd, embedded, pcengines, and rescue were intentionally
omitted. These directories will be reviewed at a later date.

PR:		269884
Reviewed by:	imp, zlei
Approved by:	emaste (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D47587
2024-11-16 07:11:16 +00:00
Jose Luis Duran
0f7b0db5dd
nanobsd: Fix cust_comconsole search patterns
The current patterns are outdated, and may produce "offifexists", after
e310437971 ("For video consoles, only launch a getty if the device
exists.").

Fix the expressions to:

1. Disable getty(8) on the virtual syscons(4) or vt(4) terminals
   (/dev/ttyv*).
2. Enable the use of the first serial port as the system console.

Reviewed by:	imp
Approved by:	emaste (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D47586
2024-11-16 07:08:24 +00:00
Jose Luis Duran
4223c668e4
nanobsd: Use the real path for NANO_PACKAGE_DIR
As users may have the Pkg directory as a symbolic link to the NanoBSD
"package dump directory".  In commit 9af130ae8c, cust_pkgng() was
greatly improved, however as a side effect of using a nullfs mount, the
directories and files must not be symlinks.

Fix it by using NANO_PACKAGE_DIR realpath().

PR:		269884
Reviewed by:	imp
Approved by:	emaste (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D47532
2024-11-16 07:06:14 +00:00
Jose Luis Duran
4db04f5e3a
nanobsd: Update fill_pkg.sh
fill_pkg.sh is a script that links a package and its dependencies from a
"package dump" directory (like /usr/ports/packages/All) to a specified
directory (NANO_PACKAGE_DIR), for cust_pkgng()[*].

Update the script by:

- Using `make package-name` instead of `make -V pkgname`
- Looking for package files with *.pkg instead of *.txz
- Adding a -c option that copies the files instead of linking them[*]

[*] After 9af130ae8c cust_pkgng() cannot be used with a directory
populated by fill_pkg.sh, because it uses a nullfs mount, which doesn't
follow symlinks, therefore the links inside NANO_PACKAGE_DIR will not
work.

PR:		269884
Reviewed by:	imp
Approved by:	emaste (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D47531
2024-11-16 07:01:27 +00:00
Jose Luis Duran
f6f311d8cd
nanobsd.8: Chase usage string updates
Update the manual page for NanoBSD to match its usage.

Reviewed by:	emaste, imp
Approved by:	emaste (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D47505
2024-11-16 06:58:41 +00:00
Jose Luis Duran
e5579f98c0
nanobsd: Avoid read-only file system warnings
The default setting of some loader or rc variables generate warnings
because the file system is read-only:

Set the following options to avoid printing these warnings:

/boot/defaults/loader.conf:

- hostuuid_load="NO" to disable loading /etc/hostid early at boot time
- entropy_cache_load="NO" to disable loading cached entropy at boot time
- kern.random.initial_seeding.disable_bypass_warnings="1" to disable
  logging a warning if the 'bypass_before_seeding' knob is enabled
  (enabled by default) and a request is submitted prior to initial
  seeding

/etc/defaults/rc.conf:

- kldxref_enable="NO" to disable building linker.hints files with
  kldxref(8)
- entropy_boot_file="NO" to disable very early (used at early boot-time)
  entropy caching through reboots
- entropy_dir="NO" to disable caching entropy via cron

While here, move rc.conf options before sourcing vendor.conf, so they
can be overridden.

PR:		277601
Reviewed by:	imp
Approved by:	emaste (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D47502
2024-11-16 06:55:57 +00:00
Jose Luis Duran
3c5d19a40d
nanobsd: Fix parallel make
The NANO_NCPU (number of CPUs) value gets ignored by the build script
when setting the NANO_PMAKE (parallel make) value.

Fix it by setting the NANO_PMAKE later in the process.

PR:		277269
Reviewed by:	imp, emaste
Approved by:	emaste (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D47476
2024-11-16 06:55:25 +00:00
Jose Luis Duran
999f288a0e
nanobsd: Add missing options to usage()
-B suppress installs (both kernel and world)
-I build disk image from existing build/install
-W suppress installworld

PR:		277269
Reviewed by:	imp, emaste
Approved by:	emaste (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D47475
2024-11-16 06:54:58 +00:00
Ed Maste
566c039d1e fork: Document _Fork (and fork) as POSIX 2024
Also remove some information from HISTORY that is no longer needed (and
could be confusing), now that _Fork is part of a standard.

Reported by:	kib
Reviewed by:	imp, kib
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47588
2024-11-15 23:05:40 -05:00
Colin Percival
976e1d36be release: Don't copy container images into /ftp/
These are installed into /ociimages/ and stage onto the download site
at /OCI-IMAGES/; they don't belong in the same directory as the
"distribution" .txz files.

Fixes:		d03c82c28d ("release: add optional OCI images")
MFC after:	1 minute
Sponsored by:	Amazon
2024-11-15 13:51:47 -08:00
Ed Maste
586c651f2b mfc_candidates: remove leftover message
When I first converted mfc-candidates to Lua I did not implement -X
(exclude file), and just emitted a message that -X wasn't implemented.
Support was implemented before I pushed the change but I forgot to
remove the message.

Fixes: 48f3fcabea ("mfc-candidates: Convert to Lua")
Sponsored by: The FreeBSD Foundation
2024-11-15 16:39:23 -05:00
Ed Maste
48f3fcabea mfc-candidates: Convert to Lua
d51c590023 added a Lua script to process the lists of candidate and
completed MFC commits to address sorting issues in the original shell
implementation.

Instead of having a mix of shell and Lua, just implement the entire
tool in Lua.  This is more maintainable and gives a reasonable
improvement in performace.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47416
2024-11-15 15:09:53 -05:00
Randall Stewart
12fc79619a Change the SOCKBUF_LOCK calls to use the more refined SOCK_XXXBUF_LOCK/UNLOCK.
The socket buffer locking used to be standard on SOCKBUF_LOCK/UNLOCK. But we are now
moving to a more elegant SOCK_SENDBUF_LOCK/UNLOCK and SOCK_RECVBUF_LOCK/UNLOCK.
Lets get BBR and Rack to use these updated macros.

Reviewed by:glebius, tuexen, rscheff
Differential Revision:https://reviews.freebsd.org/D47542
2024-11-15 12:37:05 -05:00
Andrew Gallatin
4605a99b51 aio: remove write-only jobid & kernelinfo
The jobid (which was stored in kernelinfo) was used to look up
jobs until 1ce9182407, where it became essentially write only.
Remove it to simplify the code and pave the way for future work
to make aio scale better.

Note this has been slated for removal "soon" for 18 years.

Suggested by: jhb
Reviewed by: kib
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D47583
2024-11-15 10:47:46 -05:00
Dag-Erling Smørgrav
79af8f72b3 gpiospi: Fix module dependencies.
MFC after:	3 days
Reviewed by:	ray
Differential Revision:	https://reviews.freebsd.org/D47570
2024-11-15 06:55:14 +01:00
Ed Maste
dfa0ac74c2 libc: indicate existing functions that are POSIX 2024
Reviewed by:	brooks, imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47581
2024-11-14 21:32:20 -05:00
Warner Losh
f6ed9cd68c cdefs.h: Document the _XOPEN_SOURCE - 0 construct
Various System V Interface Definition editions, as well as the X/Open
group portability guide issue 4, recommend defining _XOPEN_SOURCE and
broadly intimating it means the same thing as _POSIX_SOURCE == 2.

Starting in X/Open issue 5 (1995), _XOPEN_SOURCE needs to be defined to
be 500 to bring in the newer interfaces. However, it is still common hat
sources define _XOPEN_SOURCE to be blank. To deal with that, we subtract
0 from _XOPEN_SOURCE to make the other expressions well formed.

While here, document that we should define _POSIX_C_SOURCE to be 199209
based on the SVID, the first version of the Single Unix Specification,
and X/Open CAE issue 4, version 2. Also document that historically this
has been a NOP. Any value of _XOPEN_SOURCE < 500 (including it being
blank) was not viewed as a request for a restricted namespace.

Reviewed by:		brooks (earlier version)
Differential Revision:	https://reviews.freebsd.org/D47584
Sponsored by:		Netflix
2024-11-14 19:01:12 -07:00
Warner Losh
75b635c774 cdefs: update for C23 and POSIX24
Also tweak a few placs where we can now use macros for C23 and POSIX24.

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D47580
2024-11-14 19:01:12 -07:00
Warner Losh
f95d9ec921 cdefs: Bump the defaults for 'all'
Bump default to POSIX at 202405, C at 2023 and xopen at 800...

Sponsored by:		Netflix
Reviewed by:		brooks
Differential Revision:	https://reviews.freebsd.org/D47578
2024-11-14 19:01:12 -07:00
Warner Losh
aec6c812be cdefs: Add FreeBSD _C23_SOURCE extension
Add _C23_SOURCE extension to mirror the _C11_SOURCE define. Unsure how
useful this is.

Sponsored by:		Netflix
Reviewed by:		brooks
Differential Revision:	https://reviews.freebsd.org/D47577
2024-11-14 19:01:12 -07:00
Warner Losh
4afcb82193 cdefs: Support _ISOC23_SOURCE and --std=c23
If either _ISOC23_SOURCE is defined or --std=c23 (or higher) is
specified, then default to the making the ISO C visibility to 2023.
This mirrors what glibc does, so update the comment for this change to
_ISOCxx_SOURCE values.  We currently implement xx = 11 or 23. C17 added
no new defines or symbols, so we follow glibc's lead and ommit it.
However, we don't implement the C95, C99 or C2y versions. These are
non-standard and the first two don't seem to be relevant, and the latter
is also experimental.

Sponsored by:		Netflix
Reviewed by:		brooks
Differential Revision:	https://reviews.freebsd.org/D47576
2024-11-14 18:58:17 -07:00