diff options
| author | Eric Biggers <ebiggers@kernel.org> | 2026-02-05 20:59:20 -0800 |
|---|---|---|
| committer | Mikulas Patocka <mpatocka@redhat.com> | 2026-03-09 15:10:48 +0100 |
| commit | 2b14e0bb63cc671120e7791658f5c494fc66d072 (patch) | |
| tree | f4bcd347a5773c0b69b25a65e6f9d0383bde02ca /tools/perf/scripts/python | |
| parent | c20e36b7631d83e7535877f08af8b0af72c44b1a (diff) | |
dm-verity-fec: correctly reject too-small FEC devices
Fix verity_fec_ctr() to reject too-small FEC devices by correctly
computing the number of parity blocks as 'f->rounds * f->roots'.
Previously it incorrectly used 'div64_u64(f->rounds * f->roots,
v->fec->roots << SECTOR_SHIFT)' which is a much smaller value.
Note that the units of 'rounds' are blocks, not bytes. This matches the
units of the value returned by dm_bufio_get_device_size(), which are
also blocks. A later commit will give 'rounds' a clearer name.
Fixes: a739ff3f543a ("dm verity: add support for forward error correction")
Cc: stable@vger.kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
