[lvc-project] [PATCH] bcachefs: avoid truncating fiemap extent length
Fedor Pchelkin
pchelkin at ispras.ru
Sat Jun 13 14:47:11 MSK 2026
On Wed, 10. Jun 13:55, Mikhail Dmitrichenko wrote:
> bkey sizes are stored in sectors as u32, while fiemap reports byte
> lengths as u64. Shifting k.k->size before widening performs the
> conversion in 32 bits, so an extent of 4 GiB or larger can wrap before
> it is passed to fiemap_fill_next_extent().
>
> Compute the byte length after casting the sector count to u64 and reuse
> it for all bch2_fill_extent() cases.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Signed-off-by: Mikhail Dmitrichenko <mdmitrichenko at astralinux.ru>
> ---
Для ветки 6.12 просьба выслать адаптированную версию патча в
lvc-patches at linuxtesting.org. Текущая не применяется. В теме письма
[PATCH 6.12] ...
Спасибо!
More information about the lvc-project
mailing list