Commit graph

294423 commits

Author SHA1 Message Date
Graham Percival
c801836ff4 manuals: Fix "skipping end of block" .El errors
These were reported by `mandoc -T lint ...` as errors; this commit only
handles unnecessary .El commands.

The rendered output (in ascii and html) is not affected by this commit.

Signed-off-by:	Graham Percival <gperciva@tarsnap.com>
Reviewed by:	mhorne
MFC after:	3 days
Sponsored by:	Tarsnap Backup Inc.
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1447
2024-10-07 15:37:47 -03:00
Navdeep Parhar
52e5a66eac cxgbe(4): Use correct synchronization when marking the adapter offline.
adapter->flags are guarded by a synch_op, as noted in the comment in
adapter.h where the flags are defined.

Fixes:	5241b210a4 cxgbe(4): Basic infrastructure for ULDs to participate in adapter reset.
MFC after:	1 week
Sponsored by:	Chelsio Communications
2024-10-07 10:25:53 -07:00
Ed Maste
be9243409d pkg: improve error message
Print the complete list of url that have failed

PR:		281924
Co-authored-by: Baptiste Daroussin <bapt@FreeBSD.org>
Differential Revision: https://reviews.freebsd.org/D46983
2024-10-07 13:05:07 -04:00
Roger Pau Monné
9a73b5b1e8 xen: remove PV suspend/resume support copyright
Thew code for PV suspend/resume support has long been removed, also remove the
copyright notice associated with it.

There are still two copyright blocks with (to my understanding) slightly
different wordings of the BSD 2 clause license.  I however don't feel like
merging them due to those wording differences.

The removal of the PV suspend/resume code was done in
ed95805e90.

Sponsored by: Cloud Software Group
Reviewed by: imp
Differential revision: https://reviews.freebsd.org/D46860
2024-10-07 18:59:45 +02:00
Roger Pau Monné
9dd5105f22 xen: expose support for poweroff/reboot/suspend on xenbus
Some toolstacks won't attempt the signal power actions on xenbus unless the VM
explicitly exposes support for them.  FreeBSD supports all power actions, hence
signal on xenbus such support by setting the nodes to the value of "1".

Sponsored by: Cloud Software Group
Reviewed by: markj
Differential review: https://reviews.freebsd.org/D46859
2024-10-07 18:59:45 +02:00
Bojan Novković
596a36ddc4 vmstat: Add NOFREE page count to -s report
This change adds the number of permanently allocated pages
to the 'sum' structure report.

Differential Revision:	https://reviews.freebsd.org/D46980
Reviewed by:	markj
2024-10-07 18:46:32 +02:00
Bojan Novković
a02f9685ed vm_meter: Add counter for NOFREE pages
This change adds a new counter that tracks the total number
of permanently allocated pages.

Differential Revision:	https://reviews.freebsd.org/D46978
Reviewed by:	alc, markj
2024-10-07 18:46:32 +02:00
Doug Moore
6af02087d2 swap_pager: rename iter init functions
Add _init to the function names of the functions that initialize
iterators for swblks.

Reported by:	alc, markj
Reviewed by:	alc
Differential Revision:	https://reviews.freebsd.org/D46974
2024-10-07 11:11:33 -05:00
Ed Maste
f5c847ae84 pkg: prefer .pkg extension
.pkg is the default extension as of commit c244b1d8a3, falling back to
.txz if not found.

PR:		281924
Reviewed by:	bapt
Fixes: a2aac2f5e5 ("pkg(7): when bootstrapping first search for pkg.bsd file then pkg.txz")
Fixes: c244b1d8a3 ("pkg: settle the uniq extension to .pkg instead of .bsd")
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46977
2024-10-07 12:01:36 -04:00
Michael Tuexen
3326ab87cc getsockopt: improve locking for SOL_SOCKET level socket options
Ensure SOLISTENING() is done inside SOCK_LOCK()/SOCK_UNLOCK()
for getsockopt() handling of SOL_SOCKET-level socket options.

Reviewed by:		markj, rscheff
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D46881
2024-10-07 16:46:41 +02:00
Zhenlei Huang
8161000892 iflib: Make iflib_stop() static
It is declared as static. Make the definition consistent with the
declaration.

This follows 7ff9ae90f0 and partially reverts 09f6ff4f1a.

Reviewed by:	erj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D46185
2024-10-07 22:19:02 +08:00
Baptiste Daroussin
782766a32d genl: small cleanup
Following up from another review using basically the same code:
remove useless cast
replace uint32_t with unsigned int.

No functional changes expected
2024-10-07 15:28:54 +02:00
Ed Maste
8b41e693fc libsys: connect membarrier.2
Sponsored by:	The FreeBSD Foundation
2024-10-07 08:01:34 -04:00
Igor Ostapenko
dfcb8de5ef dummymbuf: Log the entire rule set if no delimiters are present
An empty string was printed instead.

Reviewed by:	kp
Approved by:	kp (mentor)
Differential Revision:	https://reviews.freebsd.org/D46964
2024-10-07 11:16:44 +00:00
Konstantin Belousov
3670421e21 getrlimitusage.2: add the man page
Reviewed by:	olce
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46823
2024-10-07 13:50:08 +03:00
Konstantin Belousov
cdd9629921 sysctl.3: document missing oids from kern.proc. node
Reviewed by:	olce
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46823
2024-10-07 13:50:00 +03:00
Konstantin Belousov
4e2803878f sysctl.3: document missing fixed oids from the kern. node
Reviewed by:	olce
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46823
2024-10-07 13:49:54 +03:00
Konstantin Belousov
2918dbc1cc sysctl.3: Remove KERN_QUANTUM
It is not present in the sources and 'git log -S KERN_QUANTUM main'
returns nothing.

Reviewed by:	olce
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46823
2024-10-07 13:49:46 +03:00
Baptiste Daroussin
883722891a genl: add parser for nlsysevent
genl monitor nlsysevent is now able to print the messages received
2024-10-07 12:11:20 +02:00
Baptiste Daroussin
33938d88e3 genl(1): fix typo 2024-10-07 12:08:29 +02:00
Baptiste Daroussin
f45132db21 genl: subscribe to all if no group is provided
the monitor command now subscribes too all groups if no "multicast
group" is provided, this avoid potential collision with a group that
could be named "all"
2024-10-07 12:07:07 +02:00
Baptiste Daroussin
65e7a64869 genl: allow to monitor all know groups
Add a special keyword "all" for the group name, which allows genl
to monitor all groups in an existing family
2024-10-07 11:46:32 +02:00
Franco Fichtner
1d7a33888e fetch: correct env var name for --crl option to work
Reviewed by:	grembo
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D46973
2024-10-07 11:37:28 +02:00
Konstantin Belousov
2d84f79c4e vmstat -o: report objects backing SysV shm segments
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46959
2024-10-07 11:22:13 +03:00
Konstantin Belousov
65b832eb6f procstat vm: report SysV shm segment mapping
Also print its key and sequence number.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46959
2024-10-07 11:22:12 +03:00
Konstantin Belousov
6a3fbdc7e9 kinfo_vmobject: report backing object of the SysV shm segments
Use reserved work for kvo_flags.
Mark such object with KVMO_FLAG_SYSVSHM.
Provide segment key in kvo_vn_fileid, vnode never can back shm mapping.
Provide sequence number in kvo_vn_fsid_freebsd11.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46959
2024-10-07 11:22:12 +03:00
Konstantin Belousov
d3dd6bd403 kinfo_vmentry: report mappings of the SysV shm segments
Mark such mappings with the new flag KVME_FLAG_SYSVSHM.
Provide segment key in kve_vn_fileid, vnode never can back shm mapping.
Provide sequence number in kve_vn_fsid_freebsd11.

Reviewed by:	markj (previous version)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46959
2024-10-07 11:22:12 +03:00
Konstantin Belousov
b72029589e sysvshm: add shmobjinfo() function to find key/seq of the segment backed by obj
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46959
2024-10-07 11:22:12 +03:00
Konstantin Belousov
f186252e0d vm_object: add OBJ_SYSVSHM flag to indicate SysV shm backing object
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46959
2024-10-07 11:22:12 +03:00
Konstantin Belousov
34935a6b37 vm_object: reformat flags definitions
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46959
2024-10-07 11:22:12 +03:00
Konstantin Belousov
8771dc950a sysv_ipc: remove sys/cdefs.h include
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46959
2024-10-07 11:22:12 +03:00
Zsolt Udvari
2458957238 Add myself (uzsolt) to the calendar
Reported by:	mckusick
2024-10-07 09:54:00 +02:00
Cy Schubert
5a5c227981 unbound: Vendor import 1.21.1
Release notes at
	https://nlnetlabs.nl/news/2024/Oct/03/unbound-1.21.1-released/

Security:       CVE-2024-8508
MFC After:	3 days

Merge commit '9b8db746ac608ff7cdad3c9ac7ac395319e4ea0f'
2024-10-06 18:45:53 -07:00
Cy Schubert
9b8db746ac unbound: Vendor import 1.21.1
Release notes at
	https://nlnetlabs.nl/news/2024/Oct/03/unbound-1.21.1-released/

Security:	CVE-2024-8508
2024-10-06 18:37:36 -07:00
Mark Johnston
fdd100a715 devctl: Add missing validation to DEV_RESET
As in other ioctls which access the parent bus, we need to check for a
NULL parent here.  Otherwise it's possible to trigger a null pointer
dereference by resetting the root device.

Reported by:	Elliott Mitchell <ehem+freebsd@m5p.com>
Reviewed by:	imp, kib
Differential Revision:	https://reviews.freebsd.org/D46965
2024-10-07 00:16:07 +00:00
Ed Maste
1fc766e3b4 membarrier: Add manual page
Add a minimal membarrier man page that documents the available cmd
values and errors that can be returned.  We can add more information and
iterate on it in the tree.

Reviewed by:	kib
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46967
2024-10-06 19:41:57 -04:00
Mark Johnston
7f1dfd6c33 vm_object: Fix the argument type to vm_object_set_flag()
Reported by:	kib
Fixes:		9d52823bf1 ("vm_object: Widen the flags field")
2024-10-06 22:55:02 +00:00
Doug Moore
9147a0c93b pctrie: don't assign to root
User pctrie_root_store(*, PCTRIE_LOCKED) to change the root value of a
pctrie, to ensure proper synchronization when smr is in use.

Reviewed by:	alc
Differential Revision:	https://reviews.freebsd.org/D46968
2024-10-06 15:10:10 -05:00
Ed Maste
357185a966 membarrier.h: fix typo
Sponsored by:	The FreeBSD Foundation
2024-10-06 13:22:21 -04:00
Chuck Tuffli
b0a24be007 bhyve/nvme: Fix out-of-bounds read in NVMe log page
The function nvme_opc_get_log_page in the file usr.sbin/bhyve/pci_nvme.c
is vulnerable to buffer over-read. The value logoff is user controlled
but never checked against the value of logsize. Thus the difference:
	logsize - logoff
can underflow.

Due to the sc structure layout, an attacker can dump internals fields of
sc and the content of next heap allocation.

Reported by: Synacktiv
Reviewed by:	emaste, jhb
Security: HYP-07
Sponsored by: Alpha-Omega Project, The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D46021
2024-10-06 06:50:28 -07:00
Jeremy Faulkner
7d893fce0d sesutil: Fix a typo in an error message
PR:		281658
MFC after:	1 week
2024-10-06 13:22:33 +00:00
Mark Johnston
9d52823bf1 vm_object: Widen the flags field
Take advantage of a nearby 2-byte hole to avoid growing the struct.
This way, only the offsets of "flags" and "pg_color" change.  Bump
__FreeBSD_version since some out-of-tree kernel modules may access these
fields, though I haven't found any examples so far.

Reviewed by:	kib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D35905
2024-10-06 13:13:30 +00:00
Igor Ostapenko
6bd8d85579 dummymbuf: Fix code style
No functional change intended.

Reviewed by:	kp
Approved by:	kp (mentor)
Differential Revision:	https://reviews.freebsd.org/D46958
2024-10-06 11:34:28 +00:00
Bojan Novković
149e1af6ae vm_kern: Use VM_ALLOC_NOFREE when allocating 'zero_region' page
Allocate the 'zero_region' page using VM_ALLOC_NOFREE since
 it never gets released.

 Differential Revision:  https://reviews.freebsd.org/D46885
 Reviewed by:    alc, markj, kib
2024-10-05 17:05:40 +02:00
Igor Ostapenko
99689201a1 kyua: Do not count skipped as passed in test cmd
It changes output of 'kyua test' CLI command only. Hence, other outputs
like junit are kept intact for CI and other use cases. It's meant to
improve UX of attended use cases.

The issue is that the following can be tricky to interpret:

  222/222 passed (0 failed)

It can be read as all tests are passed, but it might be a summary line
of all tests skipped due to some requirement is not met.

It's reworked to easily distinguish such cases:

  222/222 passed (0 broken, 0 failed, 0 skipped)
  0/222 passed (0 broken, 0 failed, 222 skipped)

The overall formula is:

  <actually passed>/<total> (<details about not actually passed ones>)

Suggested by:	kp
Reviewed by:	ngie, markj
Approved by:	markj (mentor)
Differential Revision:	https://reviews.freebsd.org/D46653
2024-10-05 10:22:22 +00:00
Igor Ostapenko
9f146a81d2 dummymbuf: Validate syntax upon write to net.dummymbuf.rules sysctl
For now, opargs are not validated due to their runtime nature.

Reviewed by:	kp
Approved by:	kp (mentor)
Differential Revision:	https://reviews.freebsd.org/D46496
2024-10-05 08:04:08 +00:00
Brooks Davis
74f6ec6fe3 lib{c,sys}: .note.GNU-stack in syscall stubs
Explicitly disable executable stacks in the syscall stubs on all
architectures.  Previously, aarch64 and riscv64 didn't include the
.note.GNU-stack note due it being disabled by default in those ABIs.

This appears to have been harmless in practice, but better to be clear
in case a different compiler/linker has different defaults.  This also
reduces special cases in the Makefile.

Reported by:	jrtc27
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D44883
2024-10-04 23:01:45 +01:00
Brooks Davis
77fd02501f src.conf.5: regen after diff3 changes
Fixes:		2201f7c49f Build BSD diff3 if GNU diff3 is disabled.
2024-10-04 23:01:03 +01:00
Brooks Davis
d0af970e3c sysv shm: Fix SHM_REMAP flag value
SHM_REMAP was incorrectly defined to 030000 which collides with
SHM_RDONLY and SHM_RND.  Renumber to 040000 (incidentally matching
Linux).

This is an ABI break, but the previous ABI was unusable (SHM_REMAP would
imply SHM_RDONLY and vice versa).  Fortunately SHM_REMAP has very few
consumers in the wild (I spotted openjdk for Linux, libfabric, MIPCH,
and one other MPI thing in Debian code search)

Reviewed by:	kib
Fixes:		ea7e7006db Implement shmat(2) flag SHM_REMAP.
Differential Revision:	https://reviews.freebsd.org/D46825
2024-10-04 21:34:03 +01:00
Florian Walpen
e0c37c160b snd_hdsp(4): Support AO4S-192 and AI4S-192 extension boards.
Create an additional 4 channel pcm device for RME HDSP 9632 sound cards,
to support the optional AO4S-192 and AI4S-192 extension boards. For
simplicity, the <HDSP 9632 [ext]> pcm device is always present, even if
the extension boards are not installed.

Unfortunately I cannot test this with actual hardware, but I made sure
the additional channels do not affect the functionality of the HDSP 9632
as currently in src.

Reviewed by: christos, br
Differential Revision: https://reviews.freebsd.org/D46837
2024-10-04 19:51:49 +01:00