mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
c38367c73f
PaX/GrSecurity patched kernels implement a dialect of C that relies on a GCC plugin for enforcement. A basic idea in this dialect is that function pointers in structures should not change during runtime. This causes code that modifies function pointers at runtime to fail to compile in many instances. The autotools checks rely on whether or not small test cases compile against a given kernel. Some autotools checks assume some default case if other cases fail. When one of these autotools checks tests a PaX/GrSecurity patched kernel by modifying a function pointer at runtime, the default case will be used. Early detection of such situations is possible by relying on compiler warnings, which are compiler errors when --enable-debug is used. Unfortunately, very few people build ZFS with --enable-debug. The more common situation is that these issues manifest themselves as runtime failures in the form of NULL pointer exceptions. Previous patches that addressed such issues with PaX/GrSecurity compatibility largely relied on rewriting autotools checks to avoid runtime function pointer modification or the addition of PaX/GrSecurity specific checks. This patch takes the previous work to its logical conclusion by eliminating the use of runtime function pointer modification. This permits the removal of PaX-specific autotools checks in favor of ones that work across all supported kernels. This should resolve issues that were reported to occur with PaX/GrSecurity-patched Linux 3.7.5 kernels on Gentoo Linux. https://bugs.gentoo.org/show_bug.cgi?id=457176 We should be able to prevent future regressions in PaX/GrSecurity compatibility by ensuring that all changes to ZFSOnLinux avoid runtime function pointer modification. At the same time, this does not solve the issue of silent failures triggering default cases in the autotools check, which is what permitted these regressions to become runtime failures in the first place. This will need to be addressed in a future patch. Reported-by: Marcin Mirosław <bug@mejor.pl> Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #1300 |
||
---|---|---|
.. | ||
.gitignore | ||
always-no-unused-but-set-variable.m4 | ||
arch.am | ||
config.awk | ||
deb.am | ||
kernel-automount.m4 | ||
kernel-bdev-block-device-operations.m4 | ||
kernel-bdev-logical-size.m4 | ||
kernel-bdev-physical-size.m4 | ||
kernel-bdi-setup-and-register.m4 | ||
kernel-bdi.m4 | ||
kernel-bio-end-io-t-args.m4 | ||
kernel-bio-failfast.m4 | ||
kernel-bio-rw-syncio.m4 | ||
kernel-blk-end-request.m4 | ||
kernel-blk-fetch-request.m4 | ||
kernel-blk-queue-discard.m4 | ||
kernel-blk-queue-flush.m4 | ||
kernel-blk-queue-io-opt.m4 | ||
kernel-blk-queue-max-hw-sectors.m4 | ||
kernel-blk-queue-max-segments.m4 | ||
kernel-blk-queue-nonrot.m4 | ||
kernel-blk-queue-physical-block-size.m4 | ||
kernel-blk-requeue-request.m4 | ||
kernel-blk-rq-bytes.m4 | ||
kernel-blk-rq-pos.m4 | ||
kernel-blk-rq-sectors.m4 | ||
kernel-blkdev-get-by-path.m4 | ||
kernel-blkdev-get.m4 | ||
kernel-check-disk-size-change.m4 | ||
kernel-clear-inode.m4 | ||
kernel-commit-metadata.m4 | ||
kernel-create-nameidata.m4 | ||
kernel-d-make-root.m4 | ||
kernel-d-obtain-alias.m4 | ||
kernel-dentry-operations.m4 | ||
kernel-dirty-inode.m4 | ||
kernel-discard-granularity.m4 | ||
kernel-elevator-change.m4 | ||
kernel-encode-fh-inode.m4 | ||
kernel-evict-inode.m4 | ||
kernel-fallocate.m4 | ||
kernel-fmode-t.m4 | ||
kernel-fsync.m4 | ||
kernel-get-disk-ro.m4 | ||
kernel-get-gendisk.m4 | ||
kernel-insert-inode-locked.m4 | ||
kernel-invalidate-bdev-args.m4 | ||
kernel-kobj-name-len.m4 | ||
kernel-lookup-bdev.m4 | ||
kernel-lookup-nameidata.m4 | ||
kernel-mkdir-umode-t.m4 | ||
kernel-mount-nodev.m4 | ||
kernel-open-bdev-exclusive.m4 | ||
kernel-rq-for-each_segment.m4 | ||
kernel-rq-is_sync.m4 | ||
kernel-security-inode-init.m4 | ||
kernel-set-nlink.m4 | ||
kernel-sget-args.m4 | ||
kernel-show-options.m4 | ||
kernel-shrink.m4 | ||
kernel-truncate-range.m4 | ||
kernel-truncate-setsize.m4 | ||
kernel-xattr-handler.m4 | ||
kernel.m4 | ||
rpm.am | ||
Rules.am | ||
suppressed-warnings.txt | ||
tgz.am | ||
user-arch.m4 | ||
user-frame-larger-than.m4 | ||
user-ioctl.m4 | ||
user-libblkid.m4 | ||
user-libuuid.m4 | ||
user-selinux.m4 | ||
user-udev.m4 | ||
user-zlib.m4 | ||
user.m4 | ||
zfs-build.m4 | ||
zfs-meta.m4 |