diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/kernel-objtool.m4 | 19 | ||||
-rw-r--r-- | config/kernel.m4 | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/config/kernel-objtool.m4 b/config/kernel-objtool.m4 new file mode 100644 index 000000000..94e7dda2d --- /dev/null +++ b/config/kernel-objtool.m4 @@ -0,0 +1,19 @@ +dnl # +dnl # 4.6 API for compile-time stack validation +dnl # +AC_DEFUN([ZFS_AC_KERNEL_OBJTOOL], [ + AC_MSG_CHECKING([for compile-time stack validation (objtool)]) + ZFS_LINUX_TRY_COMPILE([ + #undef __ASSEMBLY__ + #include <asm/frame.h> + ],[ + #if !defined(FRAME_BEGIN) + CTASSERT(1); + #endif + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KERNEL_OBJTOOL, 1, [kernel does stack verification]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/config/kernel.m4 b/config/kernel.m4 index b8bd41e08..0b50a54e3 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -5,6 +5,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [ ZFS_AC_KERNEL ZFS_AC_SPL ZFS_AC_TEST_MODULE + ZFS_AC_KERNEL_OBJTOOL ZFS_AC_KERNEL_CONFIG ZFS_AC_KERNEL_DECLARE_EVENT_CLASS ZFS_AC_KERNEL_CURRENT_BIO_TAIL |