OpenZFS 4185 - add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R
[zfs.git] / config / kernel-mod-param.m4
blobb72be684a44e8a58f8c28b9a01e883c6a1206c25
1 dnl #
2 dnl # Grsecurity kernel API change
3 dnl # constified parameters of module_param_call() methods
4 dnl #
5 AC_DEFUN([ZFS_AC_KERNEL_MODULE_PARAM_CALL_CONST], [
6         AC_MSG_CHECKING([whether module_param_call() is hardened])
7         ZFS_LINUX_TRY_COMPILE([
8                 #include <linux/module.h>
9                 #include <linux/moduleparam.h>
11                 int param_get(char *b, const struct kernel_param *kp)
12                 {
13                         return (0);
14                 }
16                 int param_set(const char *b, const struct kernel_param *kp)
17                 {
18                         return (0);
19                 }
21                 module_param_call(p, param_set, param_get, NULL, 0644);
22         ],[
23         ],[
24                 AC_MSG_RESULT(yes)
25                 AC_DEFINE(MODULE_PARAM_CALL_CONST, 1,
26                     [hardened module_param_call])
27         ],[
28                 AC_MSG_RESULT(no)
29         ])