Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1268567
| From | "Seymour, Shane M" <shane.seymour@hpe.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH] block: create ioctl to discard-or-zeroout a range of blocks |
| Date | 2015-11-13 04:40 +0100 |
| Message-ID | <qudnr-153-1@gated-at.bofh.it> (permalink) |
| References | <qt9vA-JX-11@gated-at.bofh.it> <qtwit-70n-7@gated-at.bofh.it> <qtwVb-7uA-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> I don't have a device large enough to test for signedness errors, since passing > huge values for start and len never make it past the i_size_read check. If you have someone trying to bypass your sanity checks then if start=18446744073709551104 and len=1024 the result of adding them together will be 512 (subtracting an extra 1 in the patched code to get 511 for end). That will pass the i_size_read check won't it? If so that would cause lstart in truncate_inode_pages_range() to be -512. I don't know what truncate_inode_pages_range() will do with a negative lstart value like that but it seems like an unusual value for your code to be willing to pass into truncate_inode_pages_range(). Shane -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] block: create ioctl to discard-or-zeroout a range of blocks "Darrick J. Wong" <darrick.wong@oracle.com> - 2015-11-10 06:20 +0100
RE: [PATCH] block: create ioctl to discard-or-zeroout a range of blocks "Seymour, Shane M" <shane.seymour@hpe.com> - 2015-11-11 06:40 +0100
Re: [PATCH] block: create ioctl to discard-or-zeroout a range of blocks "Darrick J. Wong" <darrick.wong@oracle.com> - 2015-11-11 07:20 +0100
RE: [PATCH] block: create ioctl to discard-or-zeroout a range of blocks "Seymour, Shane M" <shane.seymour@hpe.com> - 2015-11-12 00:40 +0100
RE: [PATCH] block: create ioctl to discard-or-zeroout a range of blocks "Seymour, Shane M" <shane.seymour@hpe.com> - 2015-11-12 02:00 +0100
RE: [PATCH] block: create ioctl to discard-or-zeroout a range of blocks "Seymour, Shane M" <shane.seymour@hpe.com> - 2015-11-13 04:40 +0100
Re: [PATCH] block: create ioctl to discard-or-zeroout a range of blocks Jens Axboe <axboe@kernel.dk> - 2015-11-13 16:50 +0100
Re: [PATCH] block: create ioctl to discard-or-zeroout a range of blocks "Darrick J. Wong" <darrick.wong@oracle.com> - 2015-11-13 22:40 +0100
csiph-web