diff options
author | Darrick J. Wong <[email protected]> | 2018-10-30 10:40:46 +1100 |
---|---|---|
committer | Dave Chinner <[email protected]> | 2018-10-30 10:40:46 +1100 |
commit | 9fd91a90cb9837372af24a804853e15c11aed93e (patch) | |
tree | 28bf526bcccd9d6250a7451e5c2d734a419c70f4 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 2c5773f102c9bb07d5328467f61f0a88f2f2892d (diff) |
vfs: strengthen checking of file range inputs to generic_remap_checks
File range remapping, if allowed to run past the destination file's EOF,
is an optimization on a regular file write. Regular file writes that
extend the file length are subject to various constraints which are not
checked by range cloning.
This is a correctness problem because we're never allowed to touch
ranges that the page cache can't support (s_maxbytes); we're not
supposed to deal with large offsets (MAX_NON_LFS) if O_LARGEFILE isn't
set; and we must obey resource limits (RLIMIT_FSIZE).
Therefore, add these checks to the new generic_remap_checks function so
that we curtail unexpected behavior.
Signed-off-by: Darrick J. Wong <[email protected]>
Reviewed-by: Amir Goldstein <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dave Chinner <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions