diff options
author | Gvozden Neskovic <[email protected]> | 2017-03-07 21:59:31 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-03-07 12:59:31 -0800 |
commit | 650383f2838d5864f127e9d8595b97ad024c9648 (patch) | |
tree | 95c42019afea06be3e8c0158edc0d0b4860419ca /config | |
parent | 5fc73c46f9f94d2697b77a830dd9fb8a85368d23 (diff) |
[icp] fpu and asm cleanup for linux
Properly annotate functions and data section so that objtool does not complain
when CONFIG_STACK_VALIDATION and CONFIG_FRAME_POINTER are enabled.
Pass KERNELCPPFLAGS to assembler.
Use kfpu_begin()/kfpu_end() to protect SIMD regions in Linux kernel.
Reviewed-by: Tom Caputi <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Gvozden Neskovic <[email protected]>
Closes #5872
Closes #5041
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 |