]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Linux: Remove ZFS_AC_KERNEL_SRC_MODULE_PARAM_CALL_CONST autotools check
authorRichard Yao <richard.yao@alumni.stonybrook.edu>
Sun, 9 Oct 2022 01:29:54 +0000 (21:29 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 1 Nov 2022 19:42:01 +0000 (12:42 -0700)
commit7a1b6c51d0fc79bd5184f7a4177a818cb5339468
tree82fbce31150e821cfca590827fbc12606f2dd858
parent4dd9c3b08e62872580063d2a81d70f567013e77c
Linux: Remove ZFS_AC_KERNEL_SRC_MODULE_PARAM_CALL_CONST autotools check

On older kernels, the definition for `module_param_call()` typecasts
function pointers to `(void *)`, which triggers -Werror, causing the
check to return false when it should return true.

Fixing this breaks the build process on some older kernels because they
define a `__check_old_set_param()` function in their headers that checks
for a non-constified `->set()`. We workaround that through the c
preprocessor by defining `__check_old_set_param(set)` to `(set)`, which
prevents the build failures.

However, it is now apparent that all kernels that we support have
adopted the GRSecurity change, so there is no need to have an explicit
autotools check for it anymore. We therefore remove the autotools check,
while adding the workaround to our headers for the build time
non-constified `->set()` check done by older kernel headers.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Jorgen Lundman <lundman@lundman.net>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #13984
Closes #14004
config/kernel-mod-param.m4 [deleted file]
config/kernel.m4
include/os/linux/kernel/linux/mod_compat.h