aboutsummaryrefslogtreecommitdiff
path: root/libexec/rtld-aout/(developers-only)
diff options
context:
space:
mode:
authorAndrew Gallatin <gallatin@FreeBSD.org>2024-04-29 23:11:56 +0000
committerAndrew Gallatin <gallatin@FreeBSD.org>2024-04-30 19:29:06 +0000
commit13a5a46c49d0ec3e10e5476ad763947f165052e2 (patch)
tree537c7f6af75305e7d69770b9816fce17acaf930a /libexec/rtld-aout/(developers-only)
parent857d74b6340e418396d79a46b264ce0eedd760e4 (diff)
downloadsrc-main.tar.gz
src-main.zip
Fix new users of MAXPHYS and hide it from the kernel namespaceHEADmain
In cd8537910406, 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: 30038a8b4efc ("md: Get rid of the pbuf zone") Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D44986
Diffstat (limited to 'libexec/rtld-aout/(developers-only)')
0 files changed, 0 insertions, 0 deletions