Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upstream OSS fix for highmem violations by kmap
During testing of the most recent grsec patchset utilizing strict kmap checks, zfs_uiomove_bvec_impl was found to be capable of kmap-ing more than PAGE_SIZE. Upstream x64 allows this in that it does not crash outright, x86 likely doesn't. This commit addresses the zfs_uiomove_bvec_impl condition, but there may be other such violations such as zfs_copy_bvec directly below in zfs_uio.c which may require a similar approach forcing page-sized kmap calls within a loop. Tests and a test-driven audit would be helpful to find all of these conditions as they are somewhat arbitrarily triggered and the same codepath can work correctly or crash being > PAGE_SIZE. Credits: Open Source Security (Spender, probably Pipacs or Minipli too) Testing: Internal VM tests with ZFS send/recv which used to hard-crash the machine are now completing successfully. Notes: The crash condition didn't occur in the first set of ztests run during evaluation of the 6.6 patchset.
- Loading branch information