Go to file
Andrew Gallatin 13a5a46c49 Fix new users of MAXPHYS and hide it from the kernel namespace
In cd85379104, kib made maxphys a load-time tunable.  This made
the #define MAXPHYS in sys/param.h  almost entirely obsolete, as
it could now be overridden by kern.maxphys at boot time, or by
opt_maxphys.h.

However, decades of tradition have led to several new, incorrect, uses
of MAXPHYS in other parts of the kernel, mostly by seasoned
developers.  I've corrected those uses here in a mechanical fashion,
and verified that it fixes a bug in the md driver that I was
experiencing.

Since using MAXPHYS is such an easy mistake to make, it is best to
hide it from the kernel namespace.  So I've moved its definition to
_maxphys.h, which is now included in param.h only for userspace.

That brings up the fact that lots of userspace programs use MAXPHYS
for different reasons, most of them probably wrong.  Userspace consumers
that really need to know the value of maxphys should probably be
changed to use the kern.maxphys sysctl.  But that's outside the scope
of this change.

Reviewed by: imp, jkim, kib, markj
Fixes: 30038a8b4e ("md: Get rid of the pbuf zone")
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D44986
2024-04-30 15:29:06 -04:00
.cirrus-ci Cirrus-CI: add some timing info on pkg install failure 2021-08-04 15:02:00 -04:00
.github Update vendor/libarchive to 3.7.4 2024-04-26 12:11:59 +02:00
bin date: Correctly check outcome of mktime(). 2024-04-28 19:12:58 +02:00
cddl zfsbootcfg(8), zpool_influxdb(8): move to the zfs package 2024-04-22 23:04:03 -06:00
contrib libarchive: merge bugfixes from vendor branch 2024-04-30 11:55:01 +02:00
crypto heimdal: Fix compiling hdb ldap as a module 2024-04-23 22:54:20 -07:00
etc Remove remnants of portsnap(8) 2024-04-30 22:44:34 +09:00
gnu misc: Remove ancient SCCS tags. 2023-11-26 22:23:27 -07:00
include libthr: add pthread_sigqueue(3) 2024-04-23 19:51:22 +03:00
kerberos5 kerberos5: Mitigate the possibility of using an old libcrypto 2024-01-18 07:12:14 -08:00
lib libsys: don't try to expose freebsd7___semctl 2024-04-30 19:06:10 +01:00
libexec tftpd: Untangle a conditional. 2024-04-30 16:56:17 +02:00
release package: fix dependency generation 2024-04-29 08:31:36 -06:00
rescue rescue: add ipfw, pfctl 2024-04-19 16:54:31 -06:00
sbin pf: convert DIOCGETSTATUS to netlink 2024-04-29 16:32:23 +02:00
secure openssl: don't export nonexistant symbols 2024-04-22 21:28:51 +01:00
share services.5: describe better 2024-04-29 08:22:39 -06:00
stand stand: Install gptboot.efi(8) 2024-04-05 16:53:47 -06:00
sys Fix new users of MAXPHYS and hide it from the kernel namespace 2024-04-30 15:29:06 -04:00
targets Merge llvm-project main llvmorg-17-init-19304-gd0b54bb50e51 2023-12-08 18:34:50 +01:00
tests accept_filter: return different errors for non-listener and a busy socket 2024-04-24 21:55:58 -07:00
tools Remove remnants of portsnap(8) 2024-04-30 22:44:34 +09:00
usr.bin Remove remnants of portsnap(8) 2024-04-30 22:44:34 +09:00
usr.sbin Remove remnants of portsnap(8) 2024-04-30 22:44:34 +09:00
.arcconfig arcanist: use FreeBSD/git project repository instead of FreeBSD/svn 2022-08-23 14:16:41 +00:00
.arclint
.cirrus.yml Cirrus-CI: switch to llvm18 by default 2024-04-07 17:23:25 -04:00
.clang-format Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
.git-blame-ignore-revs Add another commit to .git-blame-ignore-revs 2024-03-15 23:11:52 +00:00
.gitattributes Remove SVN related Git attributes 2023-12-26 10:28:28 -07:00
.gitignore Update vendor/libarchive to 3.7.4 2024-04-26 12:11:59 +02:00
.mailmap mailmap: Translate olce's personal address to olce@FreeBSD.org 2024-01-04 15:59:01 +01:00
CONTRIBUTING.md CONTRIBUTING: request only one submission type per change 2024-04-18 15:13:15 -04:00
COPYRIGHT copyright: Bump the copyright date. 2023-12-31 23:15:43 -07:00
LOCKS Update LOCKS for Git 2023-12-26 10:28:25 -07:00
MAINTAINERS MAINTAINERS: change linuxkpi review Phabricator group. 2024-01-16 19:23:39 +00:00
Makefile build: Order kernel-toolchain and buildkernel targets 2024-03-20 01:32:24 -04:00
Makefile.inc1 showconfig: Set MACHINE for src.opts.mk 2024-04-24 18:17:20 +00:00
Makefile.libcompat build{libcompat}: Pass UNIVERSE_TOOLCHAIN_PATH to the _lc_build-tools submake 2023-08-21 21:00:45 -07:00
Makefile.sys.inc Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
ObsoleteFiles.inc Use MOVED_LIBS for usr/lib/libcxxrt.so.1 ObsoleteFiles.inc entry 2024-04-23 19:40:29 +02:00
README.md Update vendor/libarchive to 3.7.4 2024-04-26 12:11:59 +02:00
RELNOTES RELNOTES: Fix wrong commit hash 2024-04-28 21:59:17 +02:00
UPDATING package: move OpenBSM auditing into its own package 2024-04-28 22:33:06 -06:00

FreeBSD Source:

This is the top level of the FreeBSD source directory.

FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms. A large community has continually developed it for more than thirty years. Its advanced networking, security, and storage features have made FreeBSD the platform of choice for many of the busiest web sites and most pervasive embedded networking and storage devices.

For copyright information, please see the file COPYRIGHT in this directory. Additional copyright information also exists for some sources in this tree - please see the specific source directories for more information.

The Makefile in this directory supports a number of targets for building components (or all) of the FreeBSD source tree. See build(7), config(8), FreeBSD handbook on building userland, and Handbook for kernels for more information, including setting make(1) variables.

For information on the CPU architectures and platforms supported by FreeBSD, see the FreeBSD website's Platforms page.

Source Roadmap:

Directory Description
bin System/user commands.
cddl Various commands and libraries under the Common Development and Distribution License.
contrib Packages contributed by 3rd parties.
crypto Cryptography stuff (see crypto/README).
etc Template files for /etc.
gnu Commands and libraries under the GNU General Public License (GPL) or Lesser General Public License (LGPL). Please see gnu/COPYING and gnu/COPYING.LIB for more information.
include System include files.
kerberos5 Kerberos5 (Heimdal) package.
lib System libraries.
libexec System daemons.
release Release building Makefile & associated tools.
rescue Build system for statically linked /rescue utilities.
sbin System commands.
secure Cryptographic libraries and commands.
share Shared resources.
stand Boot loader sources.
sys Kernel sources (see sys/README.md).
targets Support for experimental DIRDEPS_BUILD
tests Regression tests which can be run by Kyua. See tests/README for additional information.
tools Utilities for regression testing and miscellaneous tasks.
usr.bin User commands.
usr.sbin System administration commands.

For information on synchronizing your source tree with one or more of the FreeBSD Project's development branches, please see FreeBSD Handbook.