On 2018年03月01日 22:53, David Sterba wrote: > On Thu, Mar 01, 2018 at 10:47:43AM +0800, Qu Wenruo wrote: >> Kernel doesn't support dropping range inside inline extent, and prevents >> such thing happening by limiting max inline extent size to >> min(max_inline, sectorsize - 1) in cow_file_range_inline(). >> >> However btrfs-progs only inherit the BTRFS_MAX_INLINE_DATA_SIZE() macro, >> which doesn't have sectorsize check. >> And since btrfs-progs defaults to 16K nodesize, above macro allows large >> inline extent over 15K size. >> >> This leads to unexpected kernel behavior. >> >> The bug exists from the very beginning of btrfs-convert, dating back to >> 2008 when btrfs-convert is first introduced. >> >> Qu Wenruo (4): >> btrfs-progs: Limit inline extent below page size >> btrfs-progs: check/original mode: Check inline extent size >> btrfs-progs: check/lowmem mode: Check inline extent size >> btrfs-progs: test/convert: Add test case for invalid large inline data >> extent > > Thanks, added to devel. Fixes will be added to 4.15.2. Just to mention, since we're checking inline extent size, and kernel can still create such inline extent by symbol linking, I'm afraid we may get some false alerts. (Although it's should be less possible, as symbol link with over 4K size is a little crazy) Thanks, Qu > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html >
Attachment:
signature.asc
Description: OpenPGP digital signature
