mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Linux compat: Grsecurity kernel
API Change: Module parameter set/get methods take const parameter in Grsecurity kernel v4.7.1 Signed-off-by: Gvozden Neskovic <neskovic@gmail.com> Signed-off-by: Jason Zaman <jason@perfinion.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #4997 Closes #5001
This commit is contained in:
committed by
Brian Behlendorf
parent
2bce8049c3
commit
9cc1844a1d
@@ -0,0 +1,30 @@
|
||||
dnl #
|
||||
dnl # Grsecurity kernel API change
|
||||
dnl # constified parameters of module_param_call() methods
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_MODULE_PARAM_CALL_CONST], [
|
||||
AC_MSG_CHECKING([whether module_param_call() is hardened])
|
||||
ZFS_LINUX_TRY_COMPILE([
|
||||
#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);
|
||||
],[
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(MODULE_PARAM_CALL_CONST, 1,
|
||||
[hardened module_param_call])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
@@ -101,6 +101,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
|
||||
ZFS_AC_KERNEL_GENERIC_IO_ACCT
|
||||
ZFS_AC_KERNEL_FPU
|
||||
ZFS_AC_KERNEL_KUID_HELPERS
|
||||
ZFS_AC_KERNEL_MODULE_PARAM_CALL_CONST
|
||||
|
||||
AS_IF([test "$LINUX_OBJ" != "$LINUX"], [
|
||||
KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ"
|
||||
|
||||
Reference in New Issue
Block a user