]> git.ipfire.org Git - people/ms/linux.git/commit - fs/btrfs/struct-funcs.c
btrfs: add separate bounds checker for set/get helpers
authorDavid Sterba <dsterba@suse.com>
Thu, 30 Apr 2020 21:38:11 +0000 (23:38 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 May 2020 09:25:32 +0000 (11:25 +0200)
commit5e3946890c184a17b4d74baec89c96dce518f002
tree602b0d8827e12450997f4938f35e4d65e8f5ce69
parent870b388db02cac33eebe40a1cbeb056cf13e9f40
btrfs: add separate bounds checker for set/get helpers

The bounds checking is now done in map_private_extent_buffer but that
will be removed in following patches and some sanity checks should still
be done.

There are two separate checks to see the kind of out of bounds access:
partial (start offset is in the buffer) or complete (both start and end
are out).

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/struct-funcs.c