2016-08-21 22:29:49 +03:00
|
|
|
dnl #
|
|
|
|
dnl # Grsecurity kernel API change
|
|
|
|
dnl # constified parameters of module_param_call() methods
|
|
|
|
dnl #
|
2019-10-01 22:50:34 +03:00
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_MODULE_PARAM_CALL_CONST], [
|
|
|
|
ZFS_LINUX_TEST_SRC([module_param_call], [
|
2016-08-21 22:29:49 +03:00
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/moduleparam.h>
|
|
|
|
|
|
|
|
int param_get(char *b, const struct kernel_param *kp)
|
|
|
|
{
|
|
|
|
return (0);
|
|
|
|
}
|
|
|
|
|
|
|
|
int param_set(const char *b, const struct kernel_param *kp)
|
|
|
|
{
|
|
|
|
return (0);
|
|
|
|
}
|
|
|
|
|
|
|
|
module_param_call(p, param_set, param_get, NULL, 0644);
|
2019-10-01 22:50:34 +03:00
|
|
|
],[])
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_MODULE_PARAM_CALL_CONST], [
|
|
|
|
AC_MSG_CHECKING([whether module_param_call() is hardened])
|
|
|
|
ZFS_LINUX_TEST_RESULT([module_param_call], [
|
2016-08-21 22:29:49 +03:00
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(MODULE_PARAM_CALL_CONST, 1,
|
|
|
|
[hardened module_param_call])
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
|
|
|
])
|