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
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
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
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
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
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
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
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
* 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
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")
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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