diff options
author | Richard Yao <[email protected]> | 2013-09-10 15:13:44 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-09-13 13:30:55 -0700 |
commit | b83e3e48c9b183a80dd00eb6c7431a1cbc7d89c9 (patch) | |
tree | c844900b07c089c6df332198efd4b0fe427cbae3 /config/kernel-bdi.m4 | |
parent | 4cf652e5d4becca29df8c961daaa68f9c9c81245 (diff) |
Stop runtime pointer modifications in autotools checks
c38367c73f592ca9729ba0d5e70b5e3bc67e0745 was meant to eliminate runtime
function pointer modifications in autotools checks because they were
prone to false negatives on kernels hardened by the PaX project.
Unfortunately, I missed the xattr_handler and super_block->s_bdi
autotools checks. Recent changes to PaX constified
xattr_handler->get/set, which lead me to discover this oversight.
Signed-off-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #1433
Diffstat (limited to 'config/kernel-bdi.m4')
-rw-r--r-- | config/kernel-bdi.m4 | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/config/kernel-bdi.m4 b/config/kernel-bdi.m4 index 34ffaabd5..aec7b7347 100644 --- a/config/kernel-bdi.m4 +++ b/config/kernel-bdi.m4 @@ -6,9 +6,12 @@ AC_DEFUN([ZFS_AC_KERNEL_BDI], [ AC_MSG_CHECKING([whether super_block has s_bdi]) ZFS_LINUX_TRY_COMPILE([ #include <linux/fs.h> + + static const struct super_block + sb __attribute__ ((unused)) { + .s_bdi = NULL, + } ],[ - struct super_block sb __attribute__ ((unused)); - sb.s_bdi = NULL; ],[ AC_MSG_RESULT(yes) AC_DEFINE(HAVE_BDI, 1, [struct super_block has s_bdi]) |